Skip to content

Commit 174bbeb

Browse files
chore(docs): add missing descriptions
1 parent 003ab4e commit 174bbeb

54 files changed

Lines changed: 588 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/orb/client.rb

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,109 @@ class Client < Orb::Internal::Transport::BaseClient
2121
# @return [Orb::Resources::TopLevel]
2222
attr_reader :top_level
2323

24+
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
25+
# subscribed to by a customer. Plans define the billing behavior of the
26+
# subscription. You can see more about how to configure prices in the
27+
# [Price resource](/reference/price).
2428
# @return [Orb::Resources::Beta]
2529
attr_reader :beta
2630

31+
# A coupon represents a reusable discount configuration that can be applied either
32+
# as a fixed or percentage amount to an invoice or subscription. Coupons are
33+
# activated using a redemption code, which applies the discount to a subscription
34+
# or invoice. The duration of a coupon determines how long it remains available
35+
# for use by end users.
2736
# @return [Orb::Resources::Coupons]
2837
attr_reader :coupons
2938

39+
# The [Credit Note](/invoicing/credit-notes) resource represents a credit that has
40+
# been applied to a particular invoice.
3041
# @return [Orb::Resources::CreditNotes]
3142
attr_reader :credit_notes
3243

44+
# A customer is a buyer of your products, and the other party to the billing
45+
# relationship.
46+
#
47+
# In Orb, customers are assigned system generated identifiers automatically, but
48+
# it's often desirable to have these match existing identifiers in your system. To
49+
# avoid having to denormalize Orb ID information, you can pass in an
50+
# `external_customer_id` with your own identifier. See
51+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
52+
# information about how these aliases work in Orb.
53+
#
54+
# In addition to having an identifier in your system, a customer may exist in a
55+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
56+
# `payment_provider` enum field to express this mapping.
57+
#
58+
# A customer also has a timezone (from the standard
59+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
60+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
61+
# information on what this timezone parameter influences within Orb.
3362
# @return [Orb::Resources::Customers]
3463
attr_reader :customers
3564

65+
# The [Event](/core-concepts#event) resource represents a usage event that has
66+
# been created for a customer. Events are the core of Orb's usage-based billing
67+
# model, and are used to calculate the usage charges for a given billing period.
3668
# @return [Orb::Resources::Events]
3769
attr_reader :events
3870

71+
# An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity,
72+
# representing the request for payment for a single subscription. This includes a
73+
# set of line items, which correspond to prices in the subscription's plan and can
74+
# represent fixed recurring fees or usage-based fees. They are generated at the
75+
# end of a billing period, or as the result of an action, such as a cancellation.
3976
# @return [Orb::Resources::InvoiceLineItems]
4077
attr_reader :invoice_line_items
4178

79+
# An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity,
80+
# representing the request for payment for a single subscription. This includes a
81+
# set of line items, which correspond to prices in the subscription's plan and can
82+
# represent fixed recurring fees or usage-based fees. They are generated at the
83+
# end of a billing period, or as the result of an action, such as a cancellation.
4284
# @return [Orb::Resources::Invoices]
4385
attr_reader :invoices
4486

87+
# The Item resource represents a sellable product or good. Items are associated
88+
# with all line items, billable metrics, and prices and are used for defining
89+
# external sync behavior for invoices and tax calculation purposes.
4590
# @return [Orb::Resources::Items]
4691
attr_reader :items
4792

93+
# The Metric resource represents a calculation of a quantity based on events.
94+
# Metrics are defined by the query that transforms raw usage events into
95+
# meaningful values for your customers.
4896
# @return [Orb::Resources::Metrics]
4997
attr_reader :metrics
5098

99+
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
100+
# subscribed to by a customer. Plans define the billing behavior of the
101+
# subscription. You can see more about how to configure prices in the
102+
# [Price resource](/reference/price).
51103
# @return [Orb::Resources::Plans]
52104
attr_reader :plans
53105

106+
# The Price resource represents a price that can be billed on a subscription,
107+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
108+
# take a quantity and determine an amount to bill.
109+
#
110+
# Orb supports a few different pricing models out of the box. Each of these models
111+
# is serialized differently in a given Price object. The model_type field
112+
# determines the key for the configuration object that is present.
113+
#
114+
# For more on the types of prices, see
115+
# [the core concepts documentation](/core-concepts#plan-and-price)
54116
# @return [Orb::Resources::Prices]
55117
attr_reader :prices
56118

57119
# @return [Orb::Resources::Subscriptions]
58120
attr_reader :subscriptions
59121

122+
# [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
123+
# usage, or credit balance and trigger webhooks when a threshold is exceeded.
124+
#
125+
# Alerts created through the API can be scoped to either customers or
126+
# subscriptions.
60127
# @return [Orb::Resources::Alerts]
61128
attr_reader :alerts
62129

@@ -66,9 +133,14 @@ class Client < Orb::Internal::Transport::BaseClient
66133
# @return [Orb::Resources::SubscriptionChanges]
67134
attr_reader :subscription_changes
68135

136+
# The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
137+
# credits within Orb.
69138
# @return [Orb::Resources::CreditBlocks]
70139
attr_reader :credit_blocks
71140

141+
# The LicenseType resource represents a type of license that can be assigned to
142+
# users. License types are used during billing by grouping metrics on the
143+
# configured grouping key.
72144
# @return [Orb::Resources::LicenseTypes]
73145
attr_reader :license_types
74146

lib/orb/resources/alerts.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
module Orb
44
module Resources
5+
# [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
6+
# usage, or credit balance and trigger webhooks when a threshold is exceeded.
7+
#
8+
# Alerts created through the API can be scoped to either customers or
9+
# subscriptions.
510
class Alerts
611
# This endpoint retrieves an alert by its ID.
712
#

lib/orb/resources/beta.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
module Orb
44
module Resources
5+
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
6+
# subscribed to by a customer. Plans define the billing behavior of the
7+
# subscription. You can see more about how to configure prices in the
8+
# [Price resource](/reference/price).
59
class Beta
10+
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
11+
# subscribed to by a customer. Plans define the billing behavior of the
12+
# subscription. You can see more about how to configure prices in the
13+
# [Price resource](/reference/price).
614
# @return [Orb::Resources::Beta::ExternalPlanID]
715
attr_reader :external_plan_id
816

lib/orb/resources/beta/external_plan_id.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
module Orb
44
module Resources
55
class Beta
6+
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
7+
# subscribed to by a customer. Plans define the billing behavior of the
8+
# subscription. You can see more about how to configure prices in the
9+
# [Price resource](/reference/price).
610
class ExternalPlanID
711
# This endpoint allows the creation of a new plan version for an existing plan.
812
#

lib/orb/resources/coupons.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22

33
module Orb
44
module Resources
5+
# A coupon represents a reusable discount configuration that can be applied either
6+
# as a fixed or percentage amount to an invoice or subscription. Coupons are
7+
# activated using a redemption code, which applies the discount to a subscription
8+
# or invoice. The duration of a coupon determines how long it remains available
9+
# for use by end users.
510
class Coupons
11+
# A coupon represents a reusable discount configuration that can be applied either
12+
# as a fixed or percentage amount to an invoice or subscription. Coupons are
13+
# activated using a redemption code, which applies the discount to a subscription
14+
# or invoice. The duration of a coupon determines how long it remains available
15+
# for use by end users.
616
# @return [Orb::Resources::Coupons::Subscriptions]
717
attr_reader :subscriptions
818

lib/orb/resources/coupons/subscriptions.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
module Orb
44
module Resources
55
class Coupons
6+
# A coupon represents a reusable discount configuration that can be applied either
7+
# as a fixed or percentage amount to an invoice or subscription. Coupons are
8+
# activated using a redemption code, which applies the discount to a subscription
9+
# or invoice. The duration of a coupon determines how long it remains available
10+
# for use by end users.
611
class Subscriptions
712
# Some parameter documentations has been truncated, see
813
# {Orb::Models::Coupons::SubscriptionListParams} for more details.

lib/orb/resources/credit_blocks.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
module Orb
44
module Resources
5+
# The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
6+
# credits within Orb.
57
class CreditBlocks
68
# This endpoint returns a credit block identified by its block_id.
79
#

lib/orb/resources/credit_notes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
module Orb
44
module Resources
5+
# The [Credit Note](/invoicing/credit-notes) resource represents a credit that has
6+
# been applied to a particular invoice.
57
class CreditNotes
68
# Some parameter documentations has been truncated, see
79
# {Orb::Models::CreditNoteCreateParams} for more details.

lib/orb/resources/customers.rb

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,69 @@
22

33
module Orb
44
module Resources
5+
# A customer is a buyer of your products, and the other party to the billing
6+
# relationship.
7+
#
8+
# In Orb, customers are assigned system generated identifiers automatically, but
9+
# it's often desirable to have these match existing identifiers in your system. To
10+
# avoid having to denormalize Orb ID information, you can pass in an
11+
# `external_customer_id` with your own identifier. See
12+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
13+
# information about how these aliases work in Orb.
14+
#
15+
# In addition to having an identifier in your system, a customer may exist in a
16+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
17+
# `payment_provider` enum field to express this mapping.
18+
#
19+
# A customer also has a timezone (from the standard
20+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
21+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
22+
# information on what this timezone parameter influences within Orb.
523
class Customers
24+
# A customer is a buyer of your products, and the other party to the billing
25+
# relationship.
26+
#
27+
# In Orb, customers are assigned system generated identifiers automatically, but
28+
# it's often desirable to have these match existing identifiers in your system. To
29+
# avoid having to denormalize Orb ID information, you can pass in an
30+
# `external_customer_id` with your own identifier. See
31+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
32+
# information about how these aliases work in Orb.
33+
#
34+
# In addition to having an identifier in your system, a customer may exist in a
35+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
36+
# `payment_provider` enum field to express this mapping.
37+
#
38+
# A customer also has a timezone (from the standard
39+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
40+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
41+
# information on what this timezone parameter influences within Orb.
642
# @return [Orb::Resources::Customers::Costs]
743
attr_reader :costs
844

45+
# The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
46+
# credits within Orb.
947
# @return [Orb::Resources::Customers::Credits]
1048
attr_reader :credits
1149

50+
# A customer is a buyer of your products, and the other party to the billing
51+
# relationship.
52+
#
53+
# In Orb, customers are assigned system generated identifiers automatically, but
54+
# it's often desirable to have these match existing identifiers in your system. To
55+
# avoid having to denormalize Orb ID information, you can pass in an
56+
# `external_customer_id` with your own identifier. See
57+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
58+
# information about how these aliases work in Orb.
59+
#
60+
# In addition to having an identifier in your system, a customer may exist in a
61+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
62+
# `payment_provider` enum field to express this mapping.
63+
#
64+
# A customer also has a timezone (from the standard
65+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
66+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
67+
# information on what this timezone parameter influences within Orb.
1268
# @return [Orb::Resources::Customers::BalanceTransactions]
1369
attr_reader :balance_transactions
1470

lib/orb/resources/customers/balance_transactions.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
module Orb
44
module Resources
55
class Customers
6+
# A customer is a buyer of your products, and the other party to the billing
7+
# relationship.
8+
#
9+
# In Orb, customers are assigned system generated identifiers automatically, but
10+
# it's often desirable to have these match existing identifiers in your system. To
11+
# avoid having to denormalize Orb ID information, you can pass in an
12+
# `external_customer_id` with your own identifier. See
13+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
14+
# information about how these aliases work in Orb.
15+
#
16+
# In addition to having an identifier in your system, a customer may exist in a
17+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
18+
# `payment_provider` enum field to express this mapping.
19+
#
20+
# A customer also has a timezone (from the standard
21+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
22+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
23+
# information on what this timezone parameter influences within Orb.
624
class BalanceTransactions
725
# Creates an immutable balance transaction that updates the customer's balance and
826
# returns back the newly created transaction.

0 commit comments

Comments
 (0)