Skip to content

Commit 5b9ccc0

Browse files
feat(api): api update (#25)
1 parent 6e8da47 commit 5b9ccc0

19 files changed

+856
-23
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 103
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-43a4d1d907fd25faa99fef58ba7afb3dd39fae36f955b29bfe27b4bfdaa0ee54.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-2824cb456b8e3a7ce1ea34aa37a2c8e63d5b70425a5863502ffe1e1b1ef7efaf.yml

lib/orb/models/customers/balance_transaction_create_response.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ class Action < Orb::Enum
137137
CREDIT_NOTE_APPLIED = :credit_note_applied
138138
CREDIT_NOTE_VOIDED = :credit_note_voided
139139
OVERPAYMENT_REFUND = :overpayment_refund
140+
EXTERNAL_PAYMENT = :external_payment
140141

141142
finalize!
142143

lib/orb/models/customers/balance_transaction_list_response.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class Action < Orb::Enum
133133
CREDIT_NOTE_APPLIED = :credit_note_applied
134134
CREDIT_NOTE_VOIDED = :credit_note_voided
135135
OVERPAYMENT_REFUND = :overpayment_refund
136+
EXTERNAL_PAYMENT = :external_payment
136137

137138
finalize!
138139

lib/orb/models/invoice.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ class Action < Orb::Enum
797797
CREDIT_NOTE_APPLIED = :credit_note_applied
798798
CREDIT_NOTE_VOIDED = :credit_note_voided
799799
OVERPAYMENT_REFUND = :overpayment_refund
800+
EXTERNAL_PAYMENT = :external_payment
800801

801802
finalize!
802803

lib/orb/models/invoice_fetch_upcoming_response.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ class Action < Orb::Enum
806806
CREDIT_NOTE_APPLIED = :credit_note_applied
807807
CREDIT_NOTE_VOIDED = :credit_note_voided
808808
OVERPAYMENT_REFUND = :overpayment_refund
809+
EXTERNAL_PAYMENT = :external_payment
809810

810811
finalize!
811812

lib/orb/models/subscription_create_params.rb

Lines changed: 198 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,15 +657,23 @@ class NewMaximum < Orb::BaseModel
657657
# @example
658658
# ```ruby
659659
# add_price => {
660+
# allocation_price: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice,
660661
# discounts: -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateParams::AddPrice::Discount] === _1 },
661662
# end_date: Time,
662663
# external_price_id: String,
663664
# maximum_amount: String,
664-
# minimum_amount: String,
665665
# **_
666666
# }
667667
# ```
668668
class AddPrice < Orb::BaseModel
669+
# @!attribute allocation_price
670+
# The definition of a new allocation price to create and add to the subscription.
671+
#
672+
# @return [Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice, nil]
673+
optional :allocation_price,
674+
-> { Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice },
675+
nil?: true
676+
669677
# @!attribute discounts
670678
# [DEPRECATED] Use add_adjustments instead. The subscription's discounts for this
671679
# price.
@@ -730,6 +738,7 @@ class AddPrice < Orb::BaseModel
730738
optional :start_date, Time, nil?: true
731739

732740
# @!parse
741+
# # @param allocation_price [Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice, nil]
733742
# # @param discounts [Array<Orb::Models::SubscriptionCreateParams::AddPrice::Discount>, nil]
734743
# # @param end_date [Time, nil]
735744
# # @param external_price_id [String, nil]
@@ -741,6 +750,7 @@ class AddPrice < Orb::BaseModel
741750
# # @param start_date [Time, nil]
742751
# #
743752
# def initialize(
753+
# allocation_price: nil,
744754
# discounts: nil,
745755
# end_date: nil,
746756
# external_price_id: nil,
@@ -757,6 +767,95 @@ class AddPrice < Orb::BaseModel
757767

758768
# def initialize: (Hash | Orb::BaseModel) -> void
759769

770+
# @example
771+
# ```ruby
772+
# allocation_price => {
773+
# amount: String,
774+
# cadence: Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence,
775+
# currency: String,
776+
# expires_at_end_of_cadence: Orb::BooleanModel
777+
# }
778+
# ```
779+
class AllocationPrice < Orb::BaseModel
780+
# @!attribute amount
781+
# An amount of the currency to allocate to the customer at the specified cadence.
782+
#
783+
# @return [String]
784+
required :amount, String
785+
786+
# @!attribute cadence
787+
# The cadence at which to allocate the amount to the customer.
788+
#
789+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence]
790+
required :cadence,
791+
enum: -> {
792+
Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence
793+
}
794+
795+
# @!attribute currency
796+
# An ISO 4217 currency string or a custom pricing unit identifier in which to bill
797+
# this price.
798+
#
799+
# @return [String]
800+
required :currency, String
801+
802+
# @!attribute expires_at_end_of_cadence
803+
# Whether the allocated amount should expire at the end of the cadence or roll
804+
# over to the next period.
805+
#
806+
# @return [Boolean]
807+
required :expires_at_end_of_cadence, Orb::BooleanModel
808+
809+
# @!parse
810+
# # The definition of a new allocation price to create and add to the subscription.
811+
# #
812+
# # @param amount [String]
813+
# # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence]
814+
# # @param currency [String]
815+
# # @param expires_at_end_of_cadence [Boolean]
816+
# #
817+
# def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super
818+
819+
# def initialize: (Hash | Orb::BaseModel) -> void
820+
821+
# @abstract
822+
#
823+
# The cadence at which to allocate the amount to the customer.
824+
#
825+
# @example
826+
# ```ruby
827+
# case cadence
828+
# in :one_time
829+
# # ...
830+
# in :monthly
831+
# # ...
832+
# in :quarterly
833+
# # ...
834+
# in :semi_annual
835+
# # ...
836+
# in :annual
837+
# # ...
838+
# in ...
839+
# #...
840+
# end
841+
# ```
842+
class Cadence < Orb::Enum
843+
ONE_TIME = :one_time
844+
MONTHLY = :monthly
845+
QUARTERLY = :quarterly
846+
SEMI_ANNUAL = :semi_annual
847+
ANNUAL = :annual
848+
CUSTOM = :custom
849+
850+
finalize!
851+
852+
# @!parse
853+
# # @return [Array<Symbol>]
854+
# #
855+
# def self.values; end
856+
end
857+
end
858+
760859
# @example
761860
# ```ruby
762861
# discount => {
@@ -7727,10 +7826,10 @@ class NewMaximum < Orb::BaseModel
77277826
# ```ruby
77287827
# replace_price => {
77297828
# replaces_price_id: String,
7829+
# allocation_price: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice,
77307830
# discounts: -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount] === _1 },
77317831
# external_price_id: String,
77327832
# fixed_price_quantity: Float,
7733-
# maximum_amount: String,
77347833
# **_
77357834
# }
77367835
# ```
@@ -7741,6 +7840,14 @@ class ReplacePrice < Orb::BaseModel
77417840
# @return [String]
77427841
required :replaces_price_id, String
77437842

7843+
# @!attribute allocation_price
7844+
# The definition of a new allocation price to create and add to the subscription.
7845+
#
7846+
# @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice, nil]
7847+
optional :allocation_price,
7848+
-> { Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice },
7849+
nil?: true
7850+
77447851
# @!attribute discounts
77457852
# [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the
77467853
# replacement price.
@@ -7790,6 +7897,7 @@ class ReplacePrice < Orb::BaseModel
77907897

77917898
# @!parse
77927899
# # @param replaces_price_id [String]
7900+
# # @param allocation_price [Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice, nil]
77937901
# # @param discounts [Array<Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount>, nil]
77947902
# # @param external_price_id [String, nil]
77957903
# # @param fixed_price_quantity [Float, nil]
@@ -7800,6 +7908,7 @@ class ReplacePrice < Orb::BaseModel
78007908
# #
78017909
# def initialize(
78027910
# replaces_price_id:,
7911+
# allocation_price: nil,
78037912
# discounts: nil,
78047913
# external_price_id: nil,
78057914
# fixed_price_quantity: nil,
@@ -7814,6 +7923,93 @@ class ReplacePrice < Orb::BaseModel
78147923

78157924
# def initialize: (Hash | Orb::BaseModel) -> void
78167925

7926+
# @example
7927+
# ```ruby
7928+
# allocation_price => {
7929+
# amount: String,
7930+
# cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence,
7931+
# currency: String,
7932+
# expires_at_end_of_cadence: Orb::BooleanModel
7933+
# }
7934+
# ```
7935+
class AllocationPrice < Orb::BaseModel
7936+
# @!attribute amount
7937+
# An amount of the currency to allocate to the customer at the specified cadence.
7938+
#
7939+
# @return [String]
7940+
required :amount, String
7941+
7942+
# @!attribute cadence
7943+
# The cadence at which to allocate the amount to the customer.
7944+
#
7945+
# @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence]
7946+
required :cadence,
7947+
enum: -> { Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence }
7948+
7949+
# @!attribute currency
7950+
# An ISO 4217 currency string or a custom pricing unit identifier in which to bill
7951+
# this price.
7952+
#
7953+
# @return [String]
7954+
required :currency, String
7955+
7956+
# @!attribute expires_at_end_of_cadence
7957+
# Whether the allocated amount should expire at the end of the cadence or roll
7958+
# over to the next period.
7959+
#
7960+
# @return [Boolean]
7961+
required :expires_at_end_of_cadence, Orb::BooleanModel
7962+
7963+
# @!parse
7964+
# # The definition of a new allocation price to create and add to the subscription.
7965+
# #
7966+
# # @param amount [String]
7967+
# # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence]
7968+
# # @param currency [String]
7969+
# # @param expires_at_end_of_cadence [Boolean]
7970+
# #
7971+
# def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super
7972+
7973+
# def initialize: (Hash | Orb::BaseModel) -> void
7974+
7975+
# @abstract
7976+
#
7977+
# The cadence at which to allocate the amount to the customer.
7978+
#
7979+
# @example
7980+
# ```ruby
7981+
# case cadence
7982+
# in :one_time
7983+
# # ...
7984+
# in :monthly
7985+
# # ...
7986+
# in :quarterly
7987+
# # ...
7988+
# in :semi_annual
7989+
# # ...
7990+
# in :annual
7991+
# # ...
7992+
# in ...
7993+
# #...
7994+
# end
7995+
# ```
7996+
class Cadence < Orb::Enum
7997+
ONE_TIME = :one_time
7998+
MONTHLY = :monthly
7999+
QUARTERLY = :quarterly
8000+
SEMI_ANNUAL = :semi_annual
8001+
ANNUAL = :annual
8002+
CUSTOM = :custom
8003+
8004+
finalize!
8005+
8006+
# @!parse
8007+
# # @return [Array<Symbol>]
8008+
# #
8009+
# def self.values; end
8010+
end
8011+
end
8012+
78178013
# @example
78188014
# ```ruby
78198015
# discount => {

0 commit comments

Comments
 (0)