diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fd0ccba9..000572ec 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.12" + ".": "0.1.0-alpha.13" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index fb35dc35..1847c9b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 103 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-097aa5c0e1408d7bd31c15caded400b84f45c0296aebdf67a1dc1a4013f371dd.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-26c7b0375aaf9218b32f9af29242d38e67a8318f3ae3e8cc5d1cd86c60e89e51.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 70e0b435..6082c30d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.1.0-alpha.13 (2025-02-21) + +Full Changelog: [v0.1.0-alpha.12...v0.1.0-alpha.13](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.12...v0.1.0-alpha.13) + +### Features + +* **api:** api update ([#67](https://github.com/orbcorp/orb-ruby/issues/67)) ([5c5c429](https://github.com/orbcorp/orb-ruby/commit/5c5c42934b7146ddeb9b33ed8bf95527442ef983)) + + +### Chores + +* **internal:** version bump ([#65](https://github.com/orbcorp/orb-ruby/issues/65)) ([546b5c4](https://github.com/orbcorp/orb-ruby/commit/546b5c4ecea2d86738bd9dd2548658ece35358bb)) + ## 0.1.0-alpha.12 (2025-02-21) Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.11...v0.1.0-alpha.12) diff --git a/Gemfile.lock b/Gemfile.lock index 4e7a3d04..afc97c30 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - orb (0.1.0.pre.alpha.12) + orb (0.1.0.pre.alpha.13) connection_pool GEM diff --git a/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb b/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb index b04bd321..788df8c5 100644 --- a/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +++ b/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb @@ -42,6 +42,13 @@ class TopUpCreateByExternalIDParams < Orb::BaseModel # @return [String] required :threshold, String + # @!attribute active_from + # The date from which the top-up is active. If unspecified, the top-up is active + # immediately. + # + # @return [Time, nil] + optional :active_from, Time, nil?: true + # @!attribute expires_after # The number of days or months after which the top-up expires. If unspecified, it # does not expire. @@ -63,6 +70,7 @@ class TopUpCreateByExternalIDParams < Orb::BaseModel # # @param invoice_settings [Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings] # # @param per_unit_cost_basis [String] # # @param threshold [String] + # # @param active_from [Time, nil] # # @param expires_after [Integer, nil] # # @param expires_after_unit [Symbol, Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::ExpiresAfterUnit, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] @@ -73,6 +81,7 @@ class TopUpCreateByExternalIDParams < Orb::BaseModel # invoice_settings:, # per_unit_cost_basis:, # threshold:, + # active_from: nil, # expires_after: nil, # expires_after_unit: nil, # request_options: {}, diff --git a/lib/orb/models/customers/credits/top_up_create_params.rb b/lib/orb/models/customers/credits/top_up_create_params.rb index 7b9db5b5..fbb133b6 100644 --- a/lib/orb/models/customers/credits/top_up_create_params.rb +++ b/lib/orb/models/customers/credits/top_up_create_params.rb @@ -41,6 +41,13 @@ class TopUpCreateParams < Orb::BaseModel # @return [String] required :threshold, String + # @!attribute active_from + # The date from which the top-up is active. If unspecified, the top-up is active + # immediately. + # + # @return [Time, nil] + optional :active_from, Time, nil?: true + # @!attribute expires_after # The number of days or months after which the top-up expires. If unspecified, it # does not expire. @@ -62,6 +69,7 @@ class TopUpCreateParams < Orb::BaseModel # # @param invoice_settings [Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings] # # @param per_unit_cost_basis [String] # # @param threshold [String] + # # @param active_from [Time, nil] # # @param expires_after [Integer, nil] # # @param expires_after_unit [Symbol, Orb::Models::Customers::Credits::TopUpCreateParams::ExpiresAfterUnit, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] @@ -72,6 +80,7 @@ class TopUpCreateParams < Orb::BaseModel # invoice_settings:, # per_unit_cost_basis:, # threshold:, + # active_from: nil, # expires_after: nil, # expires_after_unit: nil, # request_options: {}, diff --git a/lib/orb/resources/customers/credits/top_ups.rb b/lib/orb/resources/customers/credits/top_ups.rb index 5b5bd93a..aff7e957 100644 --- a/lib/orb/resources/customers/credits/top_ups.rb +++ b/lib/orb/resources/customers/credits/top_ups.rb @@ -29,6 +29,9 @@ class TopUps # @option params [String] :threshold The threshold at which to trigger the top-up. If the balance is at or below this # threshold, the top-up will be triggered. # + # @option params [Time, nil] :active_from The date from which the top-up is active. If unspecified, the top-up is active + # immediately. + # # @option params [Integer, nil] :expires_after The number of days or months after which the top-up expires. If unspecified, it # does not expire. # @@ -125,6 +128,9 @@ def delete(top_up_id, params) # @option params [String] :threshold The threshold at which to trigger the top-up. If the balance is at or below this # threshold, the top-up will be triggered. # + # @option params [Time, nil] :active_from The date from which the top-up is active. If unspecified, the top-up is active + # immediately. + # # @option params [Integer, nil] :expires_after The number of days or months after which the top-up expires. If unspecified, it # does not expire. # diff --git a/lib/orb/resources/invoices.rb b/lib/orb/resources/invoices.rb index 77432d19..4608840f 100644 --- a/lib/orb/resources/invoices.rb +++ b/lib/orb/resources/invoices.rb @@ -286,6 +286,10 @@ def pay(invoice_id, params = {}) # invoice used $10 of customer balance, that amount will be added back to the # customer balance upon voiding. # + # If the invoice was used to purchase a credit block, but the invoice is not yet + # paid, the credit block will be voided. If the invoice was created due to a + # top-up, the top-up will be disabled. + # # @param invoice_id [String] # # @param params [Orb::Models::InvoiceVoidParams, Hash{Symbol=>Object}] . diff --git a/lib/orb/version.rb b/lib/orb/version.rb index 4353c86f..d0634dc4 100644 --- a/lib/orb/version.rb +++ b/lib/orb/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Orb - VERSION = "0.1.0-alpha.12" + VERSION = "0.1.0-alpha.13" end diff --git a/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi b/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi index fbc8d6f5..18579423 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi @@ -51,6 +51,14 @@ module Orb def threshold=(_) end + sig { returns(T.nilable(Time)) } + def active_from + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def active_from=(_) + end + sig { returns(T.nilable(Integer)) } def expires_after end @@ -74,6 +82,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: T.nilable(Time), expires_after: T.nilable(Integer), expires_after_unit: T.nilable(Symbol), request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) @@ -86,6 +95,7 @@ module Orb invoice_settings:, per_unit_cost_basis:, threshold:, + active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {} @@ -101,6 +111,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: T.nilable(Time), expires_after: T.nilable(Integer), expires_after_unit: T.nilable(Symbol), request_options: Orb::RequestOptions diff --git a/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi b/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi index 06002b29..617f11c0 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi @@ -51,6 +51,14 @@ module Orb def threshold=(_) end + sig { returns(T.nilable(Time)) } + def active_from + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def active_from=(_) + end + sig { returns(T.nilable(Integer)) } def expires_after end @@ -74,6 +82,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: T.nilable(Time), expires_after: T.nilable(Integer), expires_after_unit: T.nilable(Symbol), request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) @@ -86,6 +95,7 @@ module Orb invoice_settings:, per_unit_cost_basis:, threshold:, + active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {} @@ -101,6 +111,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: T.nilable(Time), expires_after: T.nilable(Integer), expires_after_unit: T.nilable(Symbol), request_options: Orb::RequestOptions diff --git a/rbi/lib/orb/resources/customers/credits/top_ups.rbi b/rbi/lib/orb/resources/customers/credits/top_ups.rbi index e7f0a47d..6cd83ef3 100644 --- a/rbi/lib/orb/resources/customers/credits/top_ups.rbi +++ b/rbi/lib/orb/resources/customers/credits/top_ups.rbi @@ -13,6 +13,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: T.nilable(Time), expires_after: T.nilable(Integer), expires_after_unit: T.nilable(Symbol), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) @@ -26,6 +27,7 @@ module Orb invoice_settings:, per_unit_cost_basis:, threshold:, + active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {} @@ -63,6 +65,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: T.nilable(Time), expires_after: T.nilable(Integer), expires_after_unit: T.nilable(Symbol), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) @@ -76,6 +79,7 @@ module Orb invoice_settings:, per_unit_cost_basis:, threshold:, + active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {} diff --git a/rbi/lib/orb/version.rbi b/rbi/lib/orb/version.rbi index 208fca1d..bdd83c88 100644 --- a/rbi/lib/orb/version.rbi +++ b/rbi/lib/orb/version.rbi @@ -1,5 +1,5 @@ # typed: strong module Orb - VERSION = "0.1.0-alpha.12" + VERSION = "0.1.0-alpha.13" end diff --git a/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs b/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs index d97b12b7..ee49dd67 100644 --- a/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +++ b/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs @@ -9,6 +9,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: Time?, expires_after: Integer?, expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::expires_after_unit? } @@ -28,6 +29,8 @@ module Orb attr_accessor threshold: String + attr_accessor active_from: Time? + attr_accessor expires_after: Integer? attr_accessor expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::expires_after_unit? @@ -39,6 +42,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: Time?, expires_after: Integer?, expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::expires_after_unit?, request_options: Orb::request_opts diff --git a/sig/orb/models/customers/credits/top_up_create_params.rbs b/sig/orb/models/customers/credits/top_up_create_params.rbs index e92aead1..57fc8b45 100644 --- a/sig/orb/models/customers/credits/top_up_create_params.rbs +++ b/sig/orb/models/customers/credits/top_up_create_params.rbs @@ -9,6 +9,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: Time?, expires_after: Integer?, expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateParams::expires_after_unit? } @@ -28,6 +29,8 @@ module Orb attr_accessor threshold: String + attr_accessor active_from: Time? + attr_accessor expires_after: Integer? attr_accessor expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateParams::expires_after_unit? @@ -39,6 +42,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: Time?, expires_after: Integer?, expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateParams::expires_after_unit?, request_options: Orb::request_opts diff --git a/sig/orb/resources/customers/credits/top_ups.rbs b/sig/orb/resources/customers/credits/top_ups.rbs index 3d434d55..d517047b 100644 --- a/sig/orb/resources/customers/credits/top_ups.rbs +++ b/sig/orb/resources/customers/credits/top_ups.rbs @@ -16,6 +16,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: Time?, expires_after: Integer?, expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateParams::expires_after_unit?, request_options: Orb::request_opts @@ -59,6 +60,7 @@ module Orb invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings, per_unit_cost_basis: String, threshold: String, + active_from: Time?, expires_after: Integer?, expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::expires_after_unit?, request_options: Orb::request_opts diff --git a/sig/orb/version.rbs b/sig/orb/version.rbs index f0503064..49036e0f 100644 --- a/sig/orb/version.rbs +++ b/sig/orb/version.rbs @@ -1,3 +1,3 @@ module Orb - VERSION: "0.1.0-alpha.11" + VERSION: "0.1.0-alpha.12" end