Skip to content

Commit

Permalink
Merge pull request #766 from recurly/v3-v2021-02-25-1650043414
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2021-02-25
  • Loading branch information
judith authored Apr 15, 2022
2 parents 88411cb + 12a6af4 commit caf00fc
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/recurly/requests/add_on_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ class AddOnCreate < Request
# @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise.
define_attribute :usage_percentage, Float

# @!attribute usage_timeframe
# @return [String] The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods.
define_attribute :usage_timeframe, String

# @!attribute usage_type
# @return [String] Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://developers.recurly.com/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons.
define_attribute :usage_type, String
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/resources/add_on.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ class AddOn < Resource
# @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.
define_attribute :usage_percentage, Float

# @!attribute usage_timeframe
# @return [String] The time at which usage totals are reset for billing purposes.
define_attribute :usage_timeframe, String

# @!attribute usage_type
# @return [String] Type of usage, returns usage type if `add_on_type` is `usage`.
define_attribute :usage_type, String
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/resources/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class Subscription < Resource
# @return [DateTime] Activated at
define_attribute :activated_at, DateTime

# @!attribute active_invoice_id
# @return [String] The invoice ID of the latest invoice created for an active subscription.
define_attribute :active_invoice_id, String

# @!attribute add_ons
# @return [Array[SubscriptionAddOn]] Add-ons
define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/resources/subscription_add_on.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ class SubscriptionAddOn < Resource
# @!attribute usage_percentage
# @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage and usage_type is percentage.
define_attribute :usage_percentage, Float

# @!attribute usage_timeframe
# @return [String] The time at which usage totals are reset for billing purposes.
define_attribute :usage_timeframe, String
end
end
end
32 changes: 32 additions & 0 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16265,6 +16265,8 @@ components:
readOnly: true
tier_type:
"$ref": "#/components/schemas/TierTypeEnum"
usage_timeframe:
"$ref": "#/components/schemas/UsageTimeframeEnum"
tiers:
type: array
title: Tiers
Expand Down Expand Up @@ -16443,6 +16445,8 @@ components:
* Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.
tier_type:
"$ref": "#/components/schemas/TierTypeEnum"
usage_timeframe:
"$ref": "#/components/schemas/UsageTimeframeCreateEnum"
tiers:
type: array
title: Tiers
Expand Down Expand Up @@ -20059,6 +20063,13 @@ components:
type: string
title: Billing Info ID
description: Billing Info ID.
active_invoice_id:
type: string
title: Active invoice ID
description: The invoice ID of the latest invoice created for an active
subscription.
maxLength: 13
readOnly: true
SubscriptionAddOn:
type: object
title: Subscription Add-on
Expand Down Expand Up @@ -20098,6 +20109,8 @@ components:
"$ref": "#/components/schemas/RevenueScheduleTypeEnum"
tier_type:
"$ref": "#/components/schemas/TierTypeEnum"
usage_timeframe:
"$ref": "#/components/schemas/UsageTimeframeEnum"
tiers:
type: array
title: Tiers
Expand Down Expand Up @@ -22176,6 +22189,25 @@ components:
- tiered
- stairstep
- volume
UsageTimeframeEnum:
type: string
title: Usage Timeframe
description: The time at which usage totals are reset for billing purposes.
enum:
- billing_period
- subscription_term
default: billing_period
UsageTimeframeCreateEnum:
type: string
title: Usage Timeframe
description: |
The time at which usage totals are reset for billing purposes.
Allows for `tiered` add-ons to accumulate usage over the course of multiple
billing periods.
enum:
- billing_period
- subscription_term
default: billing_period
CreditPaymentActionEnum:
type: string
enum:
Expand Down

0 comments on commit caf00fc

Please sign in to comment.