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.11"
".": "0.1.0-alpha.12"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-99ab2def905df4700d0555a61c3e6f3e378664df85756fc0ff604aed8f8c5f8b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-097aa5c0e1408d7bd31c15caded400b84f45c0296aebdf67a1dc1a4013f371dd.yml
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 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)

### Features

* **api:** api update ([#64](https://github.com/orbcorp/orb-ruby/issues/64)) ([d32e004](https://github.com/orbcorp/orb-ruby/commit/d32e00419803bd61930782859f50c90223688b86))


### Chores

* **internal:** version bump ([#61](https://github.com/orbcorp/orb-ruby/issues/61)) ([e75cd95](https://github.com/orbcorp/orb-ruby/commit/e75cd95f6ad3bd68ae4eeb43a2b3af86664b5d7e))
* sort imports via topological dependency & file path ([#63](https://github.com/orbcorp/orb-ruby/issues/63)) ([ae2296e](https://github.com/orbcorp/orb-ruby/commit/ae2296e987462259283f548724b46200c50cc752))

## 0.1.0-alpha.11 (2025-02-20)

Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)
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.1.0.pre.alpha.11)
orb (0.1.0.pre.alpha.12)
connection_pool

GEM
Expand Down
232 changes: 116 additions & 116 deletions lib/orb.rb

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions lib/orb/models/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ class Customer < Orb::BaseModel
# @return [String, nil]
required :external_customer_id, String, nil?: true

# @!attribute hierarchy
# The hierarchical relationships for this customer.
#
# @return [Orb::Models::Customer::Hierarchy]
required :hierarchy, -> { Orb::Models::Customer::Hierarchy }

# @!attribute metadata
# User specified key-value pairs for the resource. If not present, this defaults
# to an empty dictionary. Individual keys can be removed by setting the value to
Expand Down Expand Up @@ -266,6 +272,7 @@ class Customer < Orb::BaseModel
# # @param email_delivery [Boolean]
# # @param exempt_from_automated_tax [Boolean, nil]
# # @param external_customer_id [String, nil]
# # @param hierarchy [Orb::Models::Customer::Hierarchy]
# # @param metadata [Hash{Symbol=>String}]
# # @param name [String]
# # @param payment_provider [Symbol, Orb::Models::Customer::PaymentProvider, nil]
Expand All @@ -289,6 +296,7 @@ class Customer < Orb::BaseModel
# email_delivery:,
# exempt_from_automated_tax:,
# external_customer_id:,
# hierarchy:,
# metadata:,
# name:,
# payment_provider:,
Expand Down Expand Up @@ -350,6 +358,68 @@ class BillingAddress < Orb::BaseModel
# def initialize: (Hash | Orb::BaseModel) -> void
end

class Hierarchy < Orb::BaseModel
# @!attribute children
#
# @return [Array<Orb::Models::Customer::Hierarchy::Child>]
required :children, -> { Orb::ArrayOf[Orb::Models::Customer::Hierarchy::Child] }

# @!attribute parent
#
# @return [Orb::Models::Customer::Hierarchy::Parent, nil]
required :parent, -> { Orb::Models::Customer::Hierarchy::Parent }, nil?: true

# @!parse
# # The hierarchical relationships for this customer.
# #
# # @param children [Array<Orb::Models::Customer::Hierarchy::Child>]
# # @param parent [Orb::Models::Customer::Hierarchy::Parent, nil]
# #
# def initialize(children:, parent:, **) = super

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

class Child < Orb::BaseModel
# @!attribute id
#
# @return [String]
required :id, String

# @!attribute external_customer_id
#
# @return [String, nil]
required :external_customer_id, String, nil?: true

# @!parse
# # @param id [String]
# # @param external_customer_id [String, nil]
# #
# def initialize(id:, external_customer_id:, **) = super

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

class Parent < Orb::BaseModel
# @!attribute id
#
# @return [String]
required :id, String

# @!attribute external_customer_id
#
# @return [String, nil]
required :external_customer_id, String, nil?: true

# @!parse
# # @param id [String]
# # @param external_customer_id [String, nil]
# #
# def initialize(id:, external_customer_id:, **) = super

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

# @abstract
#
# This is used for creating charges or invoices in an external system via Orb.
Expand Down
38 changes: 38 additions & 0 deletions lib/orb/models/customer_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ class CustomerCreateParams < Orb::BaseModel
# @return [String, nil]
optional :external_customer_id, String, nil?: true

# @!attribute hierarchy
# The hierarchical relationships for this customer.
#
# @return [Orb::Models::CustomerCreateParams::Hierarchy, nil]
optional :hierarchy, -> { Orb::Models::CustomerCreateParams::Hierarchy }, nil?: true

# @!attribute metadata
# User-specified key/value pairs for the resource. Individual keys can be removed
# by setting the value to `null`, and the entire metadata mapping can be cleared
Expand Down Expand Up @@ -236,6 +242,7 @@ class CustomerCreateParams < Orb::BaseModel
# # @param currency [String, nil]
# # @param email_delivery [Boolean, nil]
# # @param external_customer_id [String, nil]
# # @param hierarchy [Orb::Models::CustomerCreateParams::Hierarchy, nil]
# # @param metadata [Hash{Symbol=>String, nil}, nil]
# # @param payment_provider [Symbol, Orb::Models::CustomerCreateParams::PaymentProvider, nil]
# # @param payment_provider_id [String, nil]
Expand All @@ -256,6 +263,7 @@ class CustomerCreateParams < Orb::BaseModel
# currency: nil,
# email_delivery: nil,
# external_customer_id: nil,
# hierarchy: nil,
# metadata: nil,
# payment_provider: nil,
# payment_provider_id: nil,
Expand Down Expand Up @@ -358,6 +366,36 @@ class BillingAddress < Orb::BaseModel
# def initialize: (Hash | Orb::BaseModel) -> void
end

class Hierarchy < Orb::BaseModel
# @!attribute [r] child_customer_ids
# A list of child customer IDs to add to the hierarchy. The desired child
# customers must not already be part of another hierarchy.
#
# @return [Array<String>, nil]
optional :child_customer_ids, Orb::ArrayOf[String]

# @!parse
# # @return [Array<String>]
# attr_writer :child_customer_ids

# @!attribute parent_customer_id
# The ID of the parent customer in the hierarchy. The desired parent customer must
# not be a child of another customer.
#
# @return [String, nil]
optional :parent_customer_id, String, nil?: true

# @!parse
# # The hierarchical relationships for this customer.
# #
# # @param child_customer_ids [Array<String>]
# # @param parent_customer_id [String, nil]
# #
# def initialize(child_customer_ids: nil, parent_customer_id: nil, **) = super

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

# @abstract
#
# This is used for creating charges or invoices in an external system via Orb.
Expand Down
38 changes: 38 additions & 0 deletions lib/orb/models/customer_update_by_external_id_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ class CustomerUpdateByExternalIDParams < Orb::BaseModel
# @return [String, nil]
optional :external_customer_id, String, nil?: true

# @!attribute hierarchy
# The hierarchical relationships for this customer.
#
# @return [Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy, nil]
optional :hierarchy, -> { Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy }, nil?: true

# @!attribute metadata
# User-specified key/value pairs for the resource. Individual keys can be removed
# by setting the value to `null`, and the entire metadata mapping can be cleared
Expand Down Expand Up @@ -236,6 +242,7 @@ class CustomerUpdateByExternalIDParams < Orb::BaseModel
# # @param email [String, nil]
# # @param email_delivery [Boolean, nil]
# # @param external_customer_id [String, nil]
# # @param hierarchy [Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy, nil]
# # @param metadata [Hash{Symbol=>String, nil}, nil]
# # @param name [String, nil]
# # @param payment_provider [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::PaymentProvider, nil]
Expand All @@ -255,6 +262,7 @@ class CustomerUpdateByExternalIDParams < Orb::BaseModel
# email: nil,
# email_delivery: nil,
# external_customer_id: nil,
# hierarchy: nil,
# metadata: nil,
# name: nil,
# payment_provider: nil,
Expand Down Expand Up @@ -357,6 +365,36 @@ class BillingAddress < Orb::BaseModel
# def initialize: (Hash | Orb::BaseModel) -> void
end

class Hierarchy < Orb::BaseModel
# @!attribute [r] child_customer_ids
# A list of child customer IDs to add to the hierarchy. The desired child
# customers must not already be part of another hierarchy.
#
# @return [Array<String>, nil]
optional :child_customer_ids, Orb::ArrayOf[String]

# @!parse
# # @return [Array<String>]
# attr_writer :child_customer_ids

# @!attribute parent_customer_id
# The ID of the parent customer in the hierarchy. The desired parent customer must
# not be a child of another customer.
#
# @return [String, nil]
optional :parent_customer_id, String, nil?: true

# @!parse
# # The hierarchical relationships for this customer.
# #
# # @param child_customer_ids [Array<String>]
# # @param parent_customer_id [String, nil]
# #
# def initialize(child_customer_ids: nil, parent_customer_id: nil, **) = super

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

# @abstract
#
# This is used for creating charges or invoices in an external system via Orb.
Expand Down
38 changes: 38 additions & 0 deletions lib/orb/models/customer_update_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ class CustomerUpdateParams < Orb::BaseModel
# @return [String, nil]
optional :external_customer_id, String, nil?: true

# @!attribute hierarchy
# The hierarchical relationships for this customer.
#
# @return [Orb::Models::CustomerUpdateParams::Hierarchy, nil]
optional :hierarchy, -> { Orb::Models::CustomerUpdateParams::Hierarchy }, nil?: true

# @!attribute metadata
# User-specified key/value pairs for the resource. Individual keys can be removed
# by setting the value to `null`, and the entire metadata mapping can be cleared
Expand Down Expand Up @@ -228,6 +234,7 @@ class CustomerUpdateParams < Orb::BaseModel
# # @param email [String, nil]
# # @param email_delivery [Boolean, nil]
# # @param external_customer_id [String, nil]
# # @param hierarchy [Orb::Models::CustomerUpdateParams::Hierarchy, nil]
# # @param metadata [Hash{Symbol=>String, nil}, nil]
# # @param name [String, nil]
# # @param payment_provider [Symbol, Orb::Models::CustomerUpdateParams::PaymentProvider, nil]
Expand All @@ -247,6 +254,7 @@ class CustomerUpdateParams < Orb::BaseModel
# email: nil,
# email_delivery: nil,
# external_customer_id: nil,
# hierarchy: nil,
# metadata: nil,
# name: nil,
# payment_provider: nil,
Expand Down Expand Up @@ -349,6 +357,36 @@ class BillingAddress < Orb::BaseModel
# def initialize: (Hash | Orb::BaseModel) -> void
end

class Hierarchy < Orb::BaseModel
# @!attribute [r] child_customer_ids
# A list of child customer IDs to add to the hierarchy. The desired child
# customers must not already be part of another hierarchy.
#
# @return [Array<String>, nil]
optional :child_customer_ids, Orb::ArrayOf[String]

# @!parse
# # @return [Array<String>]
# attr_writer :child_customer_ids

# @!attribute parent_customer_id
# The ID of the parent customer in the hierarchy. The desired parent customer must
# not be a child of another customer.
#
# @return [String, nil]
optional :parent_customer_id, String, nil?: true

# @!parse
# # The hierarchical relationships for this customer.
# #
# # @param child_customer_ids [Array<String>]
# # @param parent_customer_id [String, nil]
# #
# def initialize(child_customer_ids: nil, parent_customer_id: nil, **) = super

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

# @abstract
#
# This is used for creating charges or invoices in an external system via Orb.
Expand Down
13 changes: 13 additions & 0 deletions lib/orb/models/subscription_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,17 @@ class SubscriptionCreateParams < Orb::BaseModel
# @return [Integer, nil]
optional :trial_duration_days, Integer, nil?: true

# @!attribute usage_customer_ids
# A list of customer IDs whose usage events will be aggregated and billed under
# this subscription. By default, a subscription only considers usage events
# associated with its attached customer's customer_id. When usage_customer_ids is
# provided, the subscription includes usage events from the specified customers
# only. Provided usage_customer_ids must be either the customer for this
# subscription itself, or any of that customer's children.
#
# @return [Array<String>, nil]
optional :usage_customer_ids, Orb::ArrayOf[String], nil?: true

# @!parse
# # @param add_adjustments [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment>, nil]
# # @param add_prices [Array<Orb::Models::SubscriptionCreateParams::AddPrice>, nil]
Expand Down Expand Up @@ -251,6 +262,7 @@ class SubscriptionCreateParams < Orb::BaseModel
# # @param replace_prices [Array<Orb::Models::SubscriptionCreateParams::ReplacePrice>, nil]
# # @param start_date [Time, nil]
# # @param trial_duration_days [Integer, nil]
# # @param usage_customer_ids [Array<String>, nil]
# # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
# #
# def initialize(
Expand Down Expand Up @@ -284,6 +296,7 @@ class SubscriptionCreateParams < Orb::BaseModel
# replace_prices: nil,
# start_date: nil,
# trial_duration_days: nil,
# usage_customer_ids: nil,
# request_options: {},
# **
# )
Expand Down
Loading
Loading