Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.1"
".": "0.1.0-alpha.2"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.1.0-alpha.2 (2025-02-06)

Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)

### Bug Fixes

* update outdated examples ([#5](https://github.com/orbcorp/orb-ruby/issues/5)) ([311b749](https://github.com/orbcorp/orb-ruby/commit/311b749020de437b6434e8af54e88e1b7261daef))


### Chores

* **internal:** version bump ([#3](https://github.com/orbcorp/orb-ruby/issues/3)) ([22794fd](https://github.com/orbcorp/orb-ruby/commit/22794fdb04836b18e1a9e06f507d1b86c907a4c9))

## 0.1.0-alpha.1 (2025-02-06)

Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/orbcorp/orb-ruby/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
orb (0.0.1.pre.alpha.0)
orb (0.1.0.pre.alpha.1)
connection_pool

GEM
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ non-success status code (i.e., 4xx or 5xx response), a subclass of
begin
customer = orb.customers.create(email: "[email protected]", name: "My Customer")
rescue Orb::Error => e
puts(e.code) # 400
puts(e.status) # 400
end
```

Expand Down Expand Up @@ -92,7 +92,11 @@ orb = Orb::Client.new(
)

# Or, configure per-request:
orb.customers.create(email: "[email protected]", name: "My Customer", max_retries: 5)
orb.customers.create(
email: "[email protected]",
name: "My Customer",
request_options: {max_retries: 5}
)
```

### Timeouts
Expand All @@ -110,7 +114,11 @@ orb = Orb::Client.new(
)

# Or, configure per-request:
orb.customers.create(email: "[email protected]", name: "My Customer", timeout: 5)
orb.customers.create(
email: "[email protected]",
name: "My Customer",
request_options: {timeout: 5}
)
```

## Versioning
Expand Down
2 changes: 1 addition & 1 deletion lib/orb/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Orb
VERSION = "0.1.0-alpha.1"
VERSION = "0.1.0-alpha.2"
end
2 changes: 1 addition & 1 deletion rbi/lib/orb/version.rbi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# typed: strong

module Orb
VERSION = "0.0.1-alpha.0"
VERSION = "0.1.0-alpha.1"
end
2 changes: 1 addition & 1 deletion sig/orb/version.rbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Orb
VERSION: "0.0.1-alpha.0"
VERSION: "0.1.0-alpha.1"
end
10 changes: 5 additions & 5 deletions test/orb/resources/alerts_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_retrieve
end

def test_update_required_params
response = @orb.alerts.update("alert_configuration_id", thresholds: [{"value" => 0}])
response = @orb.alerts.update("alert_configuration_id", thresholds: [{value: 0}])

assert_pattern do
response => Orb::Models::Alert
Expand All @@ -42,7 +42,7 @@ def test_list
end

def test_create_for_customer_required_params
response = @orb.alerts.create_for_customer("customer_id", currency: "currency", type: "usage_exceeded")
response = @orb.alerts.create_for_customer("customer_id", currency: "currency", type: :usage_exceeded)

assert_pattern do
response => Orb::Models::Alert
Expand All @@ -53,7 +53,7 @@ def test_create_for_external_customer_required_params
response = @orb.alerts.create_for_external_customer(
"external_customer_id",
currency: "currency",
type: "usage_exceeded"
type: :usage_exceeded
)

assert_pattern do
Expand All @@ -64,8 +64,8 @@ def test_create_for_external_customer_required_params
def test_create_for_subscription_required_params
response = @orb.alerts.create_for_subscription(
"subscription_id",
thresholds: [{"value" => 0}],
type: "usage_exceeded"
thresholds: [{value: 0}],
type: :usage_exceeded
)

assert_pattern do
Expand Down
2 changes: 1 addition & 1 deletion test/orb/resources/coupons_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def before_all

def test_create_required_params
response = @orb.coupons.create(
discount: {"discount_type" => "percentage", "percentage_discount" => 0},
discount: {discount_type: :percentage, percentage_discount: 0},
redemption_code: "HALFOFF"
)

Expand Down
4 changes: 2 additions & 2 deletions test/orb/resources/credit_notes_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def test_create_required_params
response = @orb.credit_notes.create(
line_items: [
{
"amount" => "amount",
"invoice_line_item_id" => "4khy3nwzktxv7"
amount: "amount",
invoice_line_item_id: "4khy3nwzktxv7"
}
]
)
Expand Down
2 changes: 1 addition & 1 deletion test/orb/resources/customers/balance_transactions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def before_all
end

def test_create_required_params
response = @orb.customers.balance_transactions.create("customer_id", amount: "amount", type: "increment")
response = @orb.customers.balance_transactions.create("customer_id", amount: "amount", type: :increment)

assert_pattern do
response => Orb::Models::Customers::BalanceTransactionCreateResponse
Expand Down
4 changes: 2 additions & 2 deletions test/orb/resources/customers/credits/ledger_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_list
def test_create_entry_required_params
response = @orb.customers.credits.ledger.create_entry(
"customer_id",
entry_type: "expiration_change",
entry_type: :expiration_change,
expiry_date: "2019-12-27T18:11:19.117Z",
target_expiry_date: "2019-12-27"
)
Expand All @@ -39,7 +39,7 @@ def test_create_entry_required_params
def test_create_entry_by_external_id_required_params
response = @orb.customers.credits.ledger.create_entry_by_external_id(
"external_customer_id",
entry_type: "expiration_change",
entry_type: :expiration_change,
expiry_date: "2019-12-27T18:11:19.117Z",
target_expiry_date: "2019-12-27"
)
Expand Down
4 changes: 2 additions & 2 deletions test/orb/resources/customers/credits/top_ups_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_create_required_params
"customer_id",
amount: "amount",
currency: "currency",
invoice_settings: {"auto_collection" => true, "net_terms" => 0},
invoice_settings: {auto_collection: true, net_terms: 0},
per_unit_cost_basis: "per_unit_cost_basis",
threshold: "threshold"
)
Expand Down Expand Up @@ -51,7 +51,7 @@ def test_create_by_external_id_required_params
"external_customer_id",
amount: "amount",
currency: "currency",
invoice_settings: {"auto_collection" => true, "net_terms" => 0},
invoice_settings: {auto_collection: true, net_terms: 0},
per_unit_cost_basis: "per_unit_cost_basis",
threshold: "threshold"
)
Expand Down
8 changes: 4 additions & 4 deletions test/orb/resources/events_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_ingest_required_params
response = @orb.events.ingest(
events: [
{
"event_name" => "event_name",
"idempotency_key" => "idempotency_key",
"properties" => {},
"timestamp" => "2020-12-09T16:09:53Z"
event_name: "event_name",
idempotency_key: "idempotency_key",
properties: {},
timestamp: "2020-12-09T16:09:53Z"
}
]
)
Expand Down
14 changes: 7 additions & 7 deletions test/orb/resources/invoices_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ def test_create_required_params
invoice_date: "2019-12-27T18:11:19.117Z",
line_items: [
{
"end_date" => "2023-09-22",
"item_id" => "4khy3nwzktxv7",
"model_type" => "unit",
"name" => "Line Item Name",
"quantity" => 1,
"start_date" => "2023-09-22",
"unit_config" => {"unit_amount" => "unit_amount"}
end_date: "2023-09-22",
item_id: "4khy3nwzktxv7",
model_type: :unit,
name: "Line Item Name",
quantity: 1,
start_date: "2023-09-22",
unit_config: {unit_amount: "unit_amount"}
}
],
net_terms: 0
Expand Down
10 changes: 5 additions & 5 deletions test/orb/resources/plans_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ def test_create_required_params
name: "name",
prices: [
{
"cadence" => "annual",
"item_id" => "item_id",
"model_type" => "unit",
"name" => "Annual fee",
"unit_config" => {"unit_amount" => "unit_amount"}
cadence: :annual,
item_id: "item_id",
model_type: :unit,
name: "Annual fee",
unit_config: {unit_amount: "unit_amount"}
}
]
)
Expand Down
6 changes: 3 additions & 3 deletions test/orb/resources/prices_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ def before_all

def test_create_required_params
response = @orb.prices.create(
cadence: "annual",
cadence: :annual,
currency: "currency",
item_id: "item_id",
model_type: "unit",
model_type: :unit,
name: "Annual fee",
unit_config: {"unit_amount" => "unit_amount"}
unit_config: {unit_amount: "unit_amount"}
)

assert_pattern do
Expand Down
4 changes: 2 additions & 2 deletions test/orb/resources/subscriptions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_list
end

def test_cancel_required_params
response = @orb.subscriptions.cancel("subscription_id", cancel_option: "end_of_subscription_term")
response = @orb.subscriptions.cancel("subscription_id", cancel_option: :end_of_subscription_term)

assert_pattern do
response => Orb::Models::SubscriptionCancelResponse
Expand Down Expand Up @@ -97,7 +97,7 @@ def test_price_intervals
end

def test_schedule_plan_change_required_params
response = @orb.subscriptions.schedule_plan_change("subscription_id", change_option: "requested_date")
response = @orb.subscriptions.schedule_plan_change("subscription_id", change_option: :requested_date)

assert_pattern do
response => Orb::Models::SubscriptionSchedulePlanChangeResponse
Expand Down
Loading