diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e8285b71..4f9005ea 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.5" + ".": "0.1.0-alpha.6" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 8070692c..4de92a98 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-43a4d1d907fd25faa99fef58ba7afb3dd39fae36f955b29bfe27b4bfdaa0ee54.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-2824cb456b8e3a7ce1ea34aa37a2c8e63d5b70425a5863502ffe1e1b1ef7efaf.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 65ddab21..fbe2f049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.1.0-alpha.6 (2025-02-11) + +Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.5...v0.1.0-alpha.6) + +### Features + +* **api:** api update ([#25](https://github.com/orbcorp/orb-ruby/issues/25)) ([5b9ccc0](https://github.com/orbcorp/orb-ruby/commit/5b9ccc0cdf609ccf737a5a34c33a401156c14aec)) + + +### Chores + +* **internal:** codegen related update ([#23](https://github.com/orbcorp/orb-ruby/issues/23)) ([bc60b57](https://github.com/orbcorp/orb-ruby/commit/bc60b57689b51660c5b740acec4555acb2f045d8)) +* **internal:** codegen related update ([#24](https://github.com/orbcorp/orb-ruby/issues/24)) ([6e8da47](https://github.com/orbcorp/orb-ruby/commit/6e8da47d5be16544f8656f1dc3998b7b9deb32fe)) +* **internal:** version bump ([#21](https://github.com/orbcorp/orb-ruby/issues/21)) ([a85c7c7](https://github.com/orbcorp/orb-ruby/commit/a85c7c76d45acf6060bbc15097d6b535e36ab6da)) + ## 0.1.0-alpha.5 (2025-02-07) Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.4...v0.1.0-alpha.5) diff --git a/Gemfile.lock b/Gemfile.lock index 1b96df13..1990090c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - orb (0.1.0.pre.alpha.4) + orb (0.1.0.pre.alpha.5) connection_pool GEM @@ -80,9 +80,9 @@ GEM parser (>= 3.3.1.0) ruby-progressbar (1.13.0) securerandom (0.4.1) - sorbet (0.5.11810) - sorbet-static (= 0.5.11810) - sorbet-static (0.5.11810-x86_64-linux) + sorbet (0.5.11813) + sorbet-static (= 0.5.11813) + sorbet-static (0.5.11813-x86_64-linux) steep (1.9.4) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) diff --git a/lib/orb/models/customers/balance_transaction_create_response.rb b/lib/orb/models/customers/balance_transaction_create_response.rb index f583a218..f024521f 100644 --- a/lib/orb/models/customers/balance_transaction_create_response.rb +++ b/lib/orb/models/customers/balance_transaction_create_response.rb @@ -137,6 +137,7 @@ class Action < Orb::Enum CREDIT_NOTE_APPLIED = :credit_note_applied CREDIT_NOTE_VOIDED = :credit_note_voided OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment finalize! diff --git a/lib/orb/models/customers/balance_transaction_list_response.rb b/lib/orb/models/customers/balance_transaction_list_response.rb index a724528a..bce8754a 100644 --- a/lib/orb/models/customers/balance_transaction_list_response.rb +++ b/lib/orb/models/customers/balance_transaction_list_response.rb @@ -133,6 +133,7 @@ class Action < Orb::Enum CREDIT_NOTE_APPLIED = :credit_note_applied CREDIT_NOTE_VOIDED = :credit_note_voided OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment finalize! diff --git a/lib/orb/models/invoice.rb b/lib/orb/models/invoice.rb index 5335150a..295ddfc8 100644 --- a/lib/orb/models/invoice.rb +++ b/lib/orb/models/invoice.rb @@ -797,6 +797,7 @@ class Action < Orb::Enum CREDIT_NOTE_APPLIED = :credit_note_applied CREDIT_NOTE_VOIDED = :credit_note_voided OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment finalize! diff --git a/lib/orb/models/invoice_fetch_upcoming_response.rb b/lib/orb/models/invoice_fetch_upcoming_response.rb index 7711bd81..abcaf71a 100644 --- a/lib/orb/models/invoice_fetch_upcoming_response.rb +++ b/lib/orb/models/invoice_fetch_upcoming_response.rb @@ -806,6 +806,7 @@ class Action < Orb::Enum CREDIT_NOTE_APPLIED = :credit_note_applied CREDIT_NOTE_VOIDED = :credit_note_voided OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment finalize! diff --git a/lib/orb/models/subscription_create_params.rb b/lib/orb/models/subscription_create_params.rb index aa2acd0a..29ce759b 100644 --- a/lib/orb/models/subscription_create_params.rb +++ b/lib/orb/models/subscription_create_params.rb @@ -657,15 +657,23 @@ class NewMaximum < Orb::BaseModel # @example # ```ruby # add_price => { + # allocation_price: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice, # discounts: -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateParams::AddPrice::Discount] === _1 }, # end_date: Time, # external_price_id: String, # maximum_amount: String, - # minimum_amount: String, # **_ # } # ``` class AddPrice < Orb::BaseModel + # @!attribute allocation_price + # The definition of a new allocation price to create and add to the subscription. + # + # @return [Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice, nil] + optional :allocation_price, + -> { Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice }, + nil?: true + # @!attribute discounts # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for this # price. @@ -730,6 +738,7 @@ class AddPrice < Orb::BaseModel optional :start_date, Time, nil?: true # @!parse + # # @param allocation_price [Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice, nil] # # @param discounts [Array, nil] # # @param end_date [Time, nil] # # @param external_price_id [String, nil] @@ -741,6 +750,7 @@ class AddPrice < Orb::BaseModel # # @param start_date [Time, nil] # # # def initialize( + # allocation_price: nil, # discounts: nil, # end_date: nil, # external_price_id: nil, @@ -757,6 +767,95 @@ class AddPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + # @example + # ```ruby + # allocation_price => { + # amount: String, + # cadence: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence, + # currency: String, + # expires_at_end_of_cadence: Orb::BooleanModel + # } + # ``` + class AllocationPrice < Orb::BaseModel + # @!attribute amount + # An amount of the currency to allocate to the customer at the specified cadence. + # + # @return [String] + required :amount, String + + # @!attribute cadence + # The cadence at which to allocate the amount to the customer. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence] + required :cadence, + enum: -> { + Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence + } + + # @!attribute currency + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. + # + # @return [String] + required :currency, String + + # @!attribute expires_at_end_of_cadence + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. + # + # @return [Boolean] + required :expires_at_end_of_cadence, Orb::BooleanModel + + # @!parse + # # The definition of a new allocation price to create and add to the subscription. + # # + # # @param amount [String] + # # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence] + # # @param currency [String] + # # @param expires_at_end_of_cadence [Boolean] + # # + # def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence at which to allocate the amount to the customer. + # + # @example + # ```ruby + # case cadence + # in :one_time + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :semi_annual + # # ... + # in :annual + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @example # ```ruby # discount => { @@ -7727,10 +7826,10 @@ class NewMaximum < Orb::BaseModel # ```ruby # replace_price => { # replaces_price_id: String, + # allocation_price: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice, # discounts: -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount] === _1 }, # external_price_id: String, # fixed_price_quantity: Float, - # maximum_amount: String, # **_ # } # ``` @@ -7741,6 +7840,14 @@ class ReplacePrice < Orb::BaseModel # @return [String] required :replaces_price_id, String + # @!attribute allocation_price + # The definition of a new allocation price to create and add to the subscription. + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice, nil] + optional :allocation_price, + -> { Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice }, + nil?: true + # @!attribute discounts # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the # replacement price. @@ -7790,6 +7897,7 @@ class ReplacePrice < Orb::BaseModel # @!parse # # @param replaces_price_id [String] + # # @param allocation_price [Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice, nil] # # @param discounts [Array, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] @@ -7800,6 +7908,7 @@ class ReplacePrice < Orb::BaseModel # # # def initialize( # replaces_price_id:, + # allocation_price: nil, # discounts: nil, # external_price_id: nil, # fixed_price_quantity: nil, @@ -7814,6 +7923,93 @@ class ReplacePrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + # @example + # ```ruby + # allocation_price => { + # amount: String, + # cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence, + # currency: String, + # expires_at_end_of_cadence: Orb::BooleanModel + # } + # ``` + class AllocationPrice < Orb::BaseModel + # @!attribute amount + # An amount of the currency to allocate to the customer at the specified cadence. + # + # @return [String] + required :amount, String + + # @!attribute cadence + # The cadence at which to allocate the amount to the customer. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. + # + # @return [String] + required :currency, String + + # @!attribute expires_at_end_of_cadence + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. + # + # @return [Boolean] + required :expires_at_end_of_cadence, Orb::BooleanModel + + # @!parse + # # The definition of a new allocation price to create and add to the subscription. + # # + # # @param amount [String] + # # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence] + # # @param currency [String] + # # @param expires_at_end_of_cadence [Boolean] + # # + # def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence at which to allocate the amount to the customer. + # + # @example + # ```ruby + # case cadence + # in :one_time + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :semi_annual + # # ... + # in :annual + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @example # ```ruby # discount => { diff --git a/lib/orb/models/subscription_schedule_plan_change_params.rb b/lib/orb/models/subscription_schedule_plan_change_params.rb index e43bfacf..a4d58b52 100644 --- a/lib/orb/models/subscription_schedule_plan_change_params.rb +++ b/lib/orb/models/subscription_schedule_plan_change_params.rb @@ -648,15 +648,23 @@ class NewMaximum < Orb::BaseModel # @example # ```ruby # add_price => { + # allocation_price: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice, # discounts: -> { Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Discount] === _1 }, # end_date: Time, # external_price_id: String, # maximum_amount: String, - # minimum_amount: String, # **_ # } # ``` class AddPrice < Orb::BaseModel + # @!attribute allocation_price + # The definition of a new allocation price to create and add to the subscription. + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice, nil] + optional :allocation_price, + -> { Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice }, + nil?: true + # @!attribute discounts # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for this # price. @@ -723,6 +731,7 @@ class AddPrice < Orb::BaseModel optional :start_date, Time, nil?: true # @!parse + # # @param allocation_price [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice, nil] # # @param discounts [Array, nil] # # @param end_date [Time, nil] # # @param external_price_id [String, nil] @@ -734,6 +743,7 @@ class AddPrice < Orb::BaseModel # # @param start_date [Time, nil] # # # def initialize( + # allocation_price: nil, # discounts: nil, # end_date: nil, # external_price_id: nil, @@ -750,6 +760,95 @@ class AddPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + # @example + # ```ruby + # allocation_price => { + # amount: String, + # cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::Cadence, + # currency: String, + # expires_at_end_of_cadence: Orb::BooleanModel + # } + # ``` + class AllocationPrice < Orb::BaseModel + # @!attribute amount + # An amount of the currency to allocate to the customer at the specified cadence. + # + # @return [String] + required :amount, String + + # @!attribute cadence + # The cadence at which to allocate the amount to the customer. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::Cadence] + required :cadence, + enum: -> { + Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::Cadence + } + + # @!attribute currency + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. + # + # @return [String] + required :currency, String + + # @!attribute expires_at_end_of_cadence + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. + # + # @return [Boolean] + required :expires_at_end_of_cadence, Orb::BooleanModel + + # @!parse + # # The definition of a new allocation price to create and add to the subscription. + # # + # # @param amount [String] + # # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::Cadence] + # # @param currency [String] + # # @param expires_at_end_of_cadence [Boolean] + # # + # def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence at which to allocate the amount to the customer. + # + # @example + # ```ruby + # case cadence + # in :one_time + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :semi_annual + # # ... + # in :annual + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @example # ```ruby # discount => { @@ -7713,10 +7812,10 @@ class NewMaximum < Orb::BaseModel # ```ruby # replace_price => { # replaces_price_id: String, + # allocation_price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice, # discounts: -> { Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Discount] === _1 }, # external_price_id: String, # fixed_price_quantity: Float, - # maximum_amount: String, # **_ # } # ``` @@ -7727,6 +7826,14 @@ class ReplacePrice < Orb::BaseModel # @return [String] required :replaces_price_id, String + # @!attribute allocation_price + # The definition of a new allocation price to create and add to the subscription. + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice, nil] + optional :allocation_price, + -> { Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice }, + nil?: true + # @!attribute discounts # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the # replacement price. @@ -7780,6 +7887,7 @@ class ReplacePrice < Orb::BaseModel # @!parse # # @param replaces_price_id [String] + # # @param allocation_price [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice, nil] # # @param discounts [Array, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] @@ -7790,6 +7898,7 @@ class ReplacePrice < Orb::BaseModel # # # def initialize( # replaces_price_id:, + # allocation_price: nil, # discounts: nil, # external_price_id: nil, # fixed_price_quantity: nil, @@ -7804,6 +7913,95 @@ class ReplacePrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + # @example + # ```ruby + # allocation_price => { + # amount: String, + # cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::Cadence, + # currency: String, + # expires_at_end_of_cadence: Orb::BooleanModel + # } + # ``` + class AllocationPrice < Orb::BaseModel + # @!attribute amount + # An amount of the currency to allocate to the customer at the specified cadence. + # + # @return [String] + required :amount, String + + # @!attribute cadence + # The cadence at which to allocate the amount to the customer. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::Cadence] + required :cadence, + enum: -> { + Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::Cadence + } + + # @!attribute currency + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. + # + # @return [String] + required :currency, String + + # @!attribute expires_at_end_of_cadence + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. + # + # @return [Boolean] + required :expires_at_end_of_cadence, Orb::BooleanModel + + # @!parse + # # The definition of a new allocation price to create and add to the subscription. + # # + # # @param amount [String] + # # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::Cadence] + # # @param currency [String] + # # @param expires_at_end_of_cadence [Boolean] + # # + # def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence at which to allocate the amount to the customer. + # + # @example + # ```ruby + # case cadence + # in :one_time + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :semi_annual + # # ... + # in :annual + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @example # ```ruby # discount => { diff --git a/lib/orb/version.rb b/lib/orb/version.rb index f194cbd4..dd589a92 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.5" + VERSION = "0.1.0-alpha.6" end diff --git a/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi b/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi index b30ce401..920c1c8a 100644 --- a/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +++ b/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi @@ -92,6 +92,7 @@ module Orb CREDIT_NOTE_APPLIED = :credit_note_applied CREDIT_NOTE_VOIDED = :credit_note_voided OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment sig { override.returns(T::Array[Symbol]) } def self.values diff --git a/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi b/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi index d5fb7e0b..6af5a50a 100644 --- a/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +++ b/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi @@ -92,6 +92,7 @@ module Orb CREDIT_NOTE_APPLIED = :credit_note_applied CREDIT_NOTE_VOIDED = :credit_note_voided OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment sig { override.returns(T::Array[Symbol]) } def self.values diff --git a/rbi/lib/orb/models/invoice.rbi b/rbi/lib/orb/models/invoice.rbi index 5a9e1b35..cc9913c7 100644 --- a/rbi/lib/orb/models/invoice.rbi +++ b/rbi/lib/orb/models/invoice.rbi @@ -526,6 +526,7 @@ module Orb CREDIT_NOTE_APPLIED = :credit_note_applied CREDIT_NOTE_VOIDED = :credit_note_voided OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment sig { override.returns(T::Array[Symbol]) } def self.values diff --git a/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi b/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi index c780e20e..db0760f3 100644 --- a/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +++ b/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi @@ -530,6 +530,7 @@ module Orb CREDIT_NOTE_APPLIED = :credit_note_applied CREDIT_NOTE_VOIDED = :credit_note_voided OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment sig { override.returns(T::Array[Symbol]) } def self.values diff --git a/rbi/lib/orb/models/subscription_create_params.rbi b/rbi/lib/orb/models/subscription_create_params.rbi index 12476ba4..e1e20d00 100644 --- a/rbi/lib/orb/models/subscription_create_params.rbi +++ b/rbi/lib/orb/models/subscription_create_params.rbi @@ -526,6 +526,9 @@ module Orb end class AddPrice < Orb::BaseModel + sig { returns(T.nilable(Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice)) } + attr_accessor :allocation_price + sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Discount])) } attr_accessor :discounts @@ -580,6 +583,7 @@ module Orb sig do params( + allocation_price: T.nilable(Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice), discounts: T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Discount]), end_date: T.nilable(Time), external_price_id: T.nilable(String), @@ -596,6 +600,7 @@ module Orb ).void end def initialize( + allocation_price: nil, discounts: nil, end_date: nil, external_price_id: nil, @@ -611,6 +616,7 @@ module Orb sig do override.returns( { + allocation_price: T.nilable(Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice), discounts: T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Discount]), end_date: T.nilable(Time), external_price_id: T.nilable(String), @@ -619,24 +625,7 @@ module Orb plan_phase_order: T.nilable(Integer), price: T.nilable( T.any( - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackagePrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredBpsPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBpsPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkBpsPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPackagePrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice + Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice ) ), price_id: T.nilable(String), @@ -647,6 +636,59 @@ module Orb def to_hash end + class AllocationPrice < Orb::BaseModel + sig { returns(String) } + attr_accessor :amount + + sig { returns(Symbol) } + attr_accessor :cadence + + sig { returns(String) } + attr_accessor :currency + + sig { returns(T::Boolean) } + attr_accessor :expires_at_end_of_cadence + + sig do + params( + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + ).void + end + def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:) + end + + sig do + override.returns( + { + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Discount < Orb::BaseModel sig { returns(Symbol) } attr_accessor :discount_type @@ -4831,6 +4873,9 @@ module Orb sig { returns(String) } attr_accessor :replaces_price_id + sig { returns(T.nilable(Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice)) } + attr_accessor :allocation_price + sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount])) } attr_accessor :discounts @@ -4863,6 +4908,7 @@ module Orb sig do params( replaces_price_id: String, + allocation_price: T.nilable(Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice), discounts: T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount]), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), @@ -4878,6 +4924,7 @@ module Orb end def initialize( replaces_price_id:, + allocation_price: nil, discounts: nil, external_price_id: nil, fixed_price_quantity: nil, @@ -4892,6 +4939,7 @@ module Orb override.returns( { replaces_price_id: String, + allocation_price: T.nilable(Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice), discounts: T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount]), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), @@ -4926,6 +4974,59 @@ module Orb def to_hash end + class AllocationPrice < Orb::BaseModel + sig { returns(String) } + attr_accessor :amount + + sig { returns(Symbol) } + attr_accessor :cadence + + sig { returns(String) } + attr_accessor :currency + + sig { returns(T::Boolean) } + attr_accessor :expires_at_end_of_cadence + + sig do + params( + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + ).void + end + def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:) + end + + sig do + override.returns( + { + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Discount < Orb::BaseModel sig { returns(Symbol) } attr_accessor :discount_type diff --git a/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi b/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi index f00a8c23..ab693332 100644 --- a/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +++ b/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi @@ -512,6 +512,11 @@ module Orb end class AddPrice < Orb::BaseModel + sig do + returns(T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice)) + end + attr_accessor :allocation_price + sig do returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Discount])) end @@ -551,6 +556,7 @@ module Orb sig do params( + allocation_price: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice), discounts: T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Discount]), end_date: T.nilable(Time), external_price_id: T.nilable(String), @@ -567,6 +573,7 @@ module Orb ).void end def initialize( + allocation_price: nil, discounts: nil, end_date: nil, external_price_id: nil, @@ -582,6 +589,7 @@ module Orb sig do override.returns( { + allocation_price: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice), discounts: T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Discount]), end_date: T.nilable(Time), external_price_id: T.nilable(String), @@ -601,6 +609,59 @@ module Orb def to_hash end + class AllocationPrice < Orb::BaseModel + sig { returns(String) } + attr_accessor :amount + + sig { returns(Symbol) } + attr_accessor :cadence + + sig { returns(String) } + attr_accessor :currency + + sig { returns(T::Boolean) } + attr_accessor :expires_at_end_of_cadence + + sig do + params( + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + ).void + end + def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:) + end + + sig do + override.returns( + { + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Discount < Orb::BaseModel sig { returns(Symbol) } attr_accessor :discount_type @@ -4805,6 +4866,11 @@ module Orb sig { returns(String) } attr_accessor :replaces_price_id + sig do + returns(T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice)) + end + attr_accessor :allocation_price + sig do returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Discount])) end @@ -4839,6 +4905,7 @@ module Orb sig do params( replaces_price_id: String, + allocation_price: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice), discounts: T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Discount]), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), @@ -4854,6 +4921,7 @@ module Orb end def initialize( replaces_price_id:, + allocation_price: nil, discounts: nil, external_price_id: nil, fixed_price_quantity: nil, @@ -4868,6 +4936,7 @@ module Orb override.returns( { replaces_price_id: String, + allocation_price: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice), discounts: T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Discount]), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), @@ -4885,6 +4954,59 @@ module Orb def to_hash end + class AllocationPrice < Orb::BaseModel + sig { returns(String) } + attr_accessor :amount + + sig { returns(Symbol) } + attr_accessor :cadence + + sig { returns(String) } + attr_accessor :currency + + sig { returns(T::Boolean) } + attr_accessor :expires_at_end_of_cadence + + sig do + params( + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + ).void + end + def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:) + end + + sig do + override.returns( + { + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Discount < Orb::BaseModel sig { returns(Symbol) } attr_accessor :discount_type diff --git a/rbi/lib/orb/version.rbi b/rbi/lib/orb/version.rbi index 55cdb2fa..93e9dc4d 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.4" + VERSION = "0.1.0-alpha.5" end diff --git a/sig/orb/models/customers/balance_transaction_create_response.rbs b/sig/orb/models/customers/balance_transaction_create_response.rbs index 66650171..d664fddd 100644 --- a/sig/orb/models/customers/balance_transaction_create_response.rbs +++ b/sig/orb/models/customers/balance_transaction_create_response.rbs @@ -65,6 +65,7 @@ module Orb | :credit_note_applied | :credit_note_voided | :overpayment_refund + | :external_payment class Action < Orb::Enum APPLIED_TO_INVOICE: :applied_to_invoice @@ -75,6 +76,7 @@ module Orb CREDIT_NOTE_APPLIED: :credit_note_applied CREDIT_NOTE_VOIDED: :credit_note_voided OVERPAYMENT_REFUND: :overpayment_refund + EXTERNAL_PAYMENT: :external_payment def self.values: -> ::Array[Orb::Models::Customers::BalanceTransactionCreateResponse::action] end diff --git a/sig/orb/models/customers/balance_transaction_list_response.rbs b/sig/orb/models/customers/balance_transaction_list_response.rbs index e8818967..3300dc9a 100644 --- a/sig/orb/models/customers/balance_transaction_list_response.rbs +++ b/sig/orb/models/customers/balance_transaction_list_response.rbs @@ -65,6 +65,7 @@ module Orb | :credit_note_applied | :credit_note_voided | :overpayment_refund + | :external_payment class Action < Orb::Enum APPLIED_TO_INVOICE: :applied_to_invoice @@ -75,6 +76,7 @@ module Orb CREDIT_NOTE_APPLIED: :credit_note_applied CREDIT_NOTE_VOIDED: :credit_note_voided OVERPAYMENT_REFUND: :overpayment_refund + EXTERNAL_PAYMENT: :external_payment def self.values: -> ::Array[Orb::Models::Customers::BalanceTransactionListResponse::action] end diff --git a/sig/orb/models/invoice.rbs b/sig/orb/models/invoice.rbs index 4fe100fe..b40d9e3a 100644 --- a/sig/orb/models/invoice.rbs +++ b/sig/orb/models/invoice.rbs @@ -365,6 +365,7 @@ module Orb | :credit_note_applied | :credit_note_voided | :overpayment_refund + | :external_payment class Action < Orb::Enum APPLIED_TO_INVOICE: :applied_to_invoice @@ -375,6 +376,7 @@ module Orb CREDIT_NOTE_APPLIED: :credit_note_applied CREDIT_NOTE_VOIDED: :credit_note_voided OVERPAYMENT_REFUND: :overpayment_refund + EXTERNAL_PAYMENT: :external_payment def self.values: -> ::Array[Orb::Models::Invoice::CustomerBalanceTransaction::action] end diff --git a/sig/orb/models/invoice_fetch_upcoming_response.rbs b/sig/orb/models/invoice_fetch_upcoming_response.rbs index e2ffbe1c..45e8247c 100644 --- a/sig/orb/models/invoice_fetch_upcoming_response.rbs +++ b/sig/orb/models/invoice_fetch_upcoming_response.rbs @@ -375,6 +375,7 @@ module Orb | :credit_note_applied | :credit_note_voided | :overpayment_refund + | :external_payment class Action < Orb::Enum APPLIED_TO_INVOICE: :applied_to_invoice @@ -385,6 +386,7 @@ module Orb CREDIT_NOTE_APPLIED: :credit_note_applied CREDIT_NOTE_VOIDED: :credit_note_voided OVERPAYMENT_REFUND: :overpayment_refund + EXTERNAL_PAYMENT: :external_payment def self.values: -> ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::action] end diff --git a/sig/orb/models/subscription_create_params.rbs b/sig/orb/models/subscription_create_params.rbs index bb35ec07..0be2c603 100644 --- a/sig/orb/models/subscription_create_params.rbs +++ b/sig/orb/models/subscription_create_params.rbs @@ -360,6 +360,7 @@ module Orb type add_price = { + allocation_price: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Discount]?, end_date: Time?, external_price_id: String?, @@ -372,6 +373,8 @@ module Orb } class AddPrice < Orb::BaseModel + attr_accessor allocation_price: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice? + attr_accessor discounts: ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Discount]? attr_accessor end_date: Time? @@ -392,6 +395,7 @@ module Orb def initialize: ( + allocation_price: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Discount]?, end_date: Time?, external_price_id: String?, @@ -409,6 +413,52 @@ module Orb def to_hash: -> Orb::Models::SubscriptionCreateParams::add_price + type allocation_price = + { + amount: String, + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + } + + class AllocationPrice < Orb::BaseModel + attr_accessor amount: String + + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor expires_at_end_of_cadence: bool + + def initialize: + ( + amount: String, + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + ) -> void + | ( + ?Orb::Models::SubscriptionCreateParams::AddPrice::allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateParams::AddPrice::allocation_price + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::cadence] + end + end + type discount = { discount_type: Orb::Models::SubscriptionCreateParams::AddPrice::Discount::discount_type, @@ -4000,6 +4050,7 @@ module Orb type replace_price = { replaces_price_id: String, + allocation_price: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount]?, external_price_id: String?, fixed_price_quantity: Float?, @@ -4012,6 +4063,8 @@ module Orb class ReplacePrice < Orb::BaseModel attr_accessor replaces_price_id: String + attr_accessor allocation_price: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice? + attr_accessor discounts: ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount]? attr_accessor external_price_id: String? @@ -4029,6 +4082,7 @@ module Orb def initialize: ( replaces_price_id: String, + allocation_price: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount]?, external_price_id: String?, fixed_price_quantity: Float?, @@ -4044,6 +4098,52 @@ module Orb def to_hash: -> Orb::Models::SubscriptionCreateParams::replace_price + type allocation_price = + { + amount: String, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + } + + class AllocationPrice < Orb::BaseModel + attr_accessor amount: String + + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor expires_at_end_of_cadence: bool + + def initialize: + ( + amount: String, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + ) -> void + | ( + ?Orb::Models::SubscriptionCreateParams::ReplacePrice::allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateParams::ReplacePrice::allocation_price + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::cadence] + end + end + type discount = { discount_type: Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount::discount_type, diff --git a/sig/orb/models/subscription_schedule_plan_change_params.rbs b/sig/orb/models/subscription_schedule_plan_change_params.rbs index 423972f8..bc311d28 100644 --- a/sig/orb/models/subscription_schedule_plan_change_params.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_params.rbs @@ -350,6 +350,7 @@ module Orb type add_price = { + allocation_price: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Discount]?, end_date: Time?, external_price_id: String?, @@ -362,6 +363,8 @@ module Orb } class AddPrice < Orb::BaseModel + attr_accessor allocation_price: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice? + attr_accessor discounts: ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Discount]? attr_accessor end_date: Time? @@ -382,6 +385,7 @@ module Orb def initialize: ( + allocation_price: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Discount]?, end_date: Time?, external_price_id: String?, @@ -399,6 +403,52 @@ module Orb def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeParams::add_price + type allocation_price = + { + amount: String, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + } + + class AllocationPrice < Orb::BaseModel + attr_accessor amount: String + + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor expires_at_end_of_cadence: bool + + def initialize: + ( + amount: String, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::allocation_price + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::cadence] + end + end + type discount = { discount_type: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Discount::discount_type, @@ -3991,6 +4041,7 @@ module Orb type replace_price = { replaces_price_id: String, + allocation_price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Discount]?, external_price_id: String?, fixed_price_quantity: Float?, @@ -4003,6 +4054,8 @@ module Orb class ReplacePrice < Orb::BaseModel attr_accessor replaces_price_id: String + attr_accessor allocation_price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice? + attr_accessor discounts: ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Discount]? attr_accessor external_price_id: String? @@ -4020,6 +4073,7 @@ module Orb def initialize: ( replaces_price_id: String, + allocation_price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Discount]?, external_price_id: String?, fixed_price_quantity: Float?, @@ -4035,6 +4089,52 @@ module Orb def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeParams::replace_price + type allocation_price = + { + amount: String, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + } + + class AllocationPrice < Orb::BaseModel + attr_accessor amount: String + + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor expires_at_end_of_cadence: bool + + def initialize: + ( + amount: String, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::allocation_price + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::cadence] + end + end + type discount = { discount_type: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Discount::discount_type, diff --git a/sig/orb/version.rbs b/sig/orb/version.rbs index 009a8e19..9d3fdb0c 100644 --- a/sig/orb/version.rbs +++ b/sig/orb/version.rbs @@ -1,3 +1,3 @@ module Orb - VERSION: "0.1.0-alpha.4" + VERSION: "0.1.0-alpha.5" end