recurly 4.24.0 → 4.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/CHANGELOG.md +23 -0
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/client/operations.rb +104 -9
- data/lib/recurly/requests/add_on_create.rb +6 -2
- data/lib/recurly/requests/add_on_update.rb +4 -0
- data/lib/recurly/requests/billing_info_create.rb +1 -1
- data/lib/recurly/requests/plan_create.rb +4 -0
- data/lib/recurly/requests/plan_update.rb +4 -0
- data/lib/recurly/requests/subscription_add_on_create.rb +2 -2
- data/lib/recurly/resources/account_balance_amount.rb +4 -0
- data/lib/recurly/resources/add_on.rb +5 -1
- data/lib/recurly/resources/external_product.rb +38 -0
- data/lib/recurly/resources/external_product_reference_mini.rb +34 -0
- data/lib/recurly/resources/external_resource_mini.rb +22 -0
- data/lib/recurly/resources/external_subscription.rb +62 -0
- data/lib/recurly/resources/plan.rb +4 -0
- data/lib/recurly/resources/subscription_add_on.rb +5 -1
- data/lib/recurly/resources/usage.rb +1 -1
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +519 -90
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 389eea1b74d78e485eb08e34495178d7a383a9ac748e7e7f9f94ff7361520603
|
4
|
+
data.tar.gz: 22d328b1f98319385cde050be1199a3ec8d7b5f41ab833d7a9013ba87761ff72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a76f723999341f4e174891b7b17033ffdf21c563cabdd8709d648de76f51bb7374a8293b3ac255d95b571f92a1a1e889a07e9cedea9626fe7e659fbc90b165c2
|
7
|
+
data.tar.gz: 703c91e9c0f5ca8e76f04dd3bf74f81d2355d205dcd92d90a03d3f2bac48ff84ded8b09c63b55b885856f06d123814f83674142a532ec572f132bffaead3ab3e
|
data/.bumpversion.cfg
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [4.26.0](https://github.com/recurly/recurly-client-ruby/tree/4.26.0) (2022-11-17)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.25.0...4.26.0)
|
6
|
+
|
7
|
+
|
8
|
+
**Merged Pull Requests**
|
9
|
+
|
10
|
+
- Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#811](https://github.com/recurly/recurly-client-ruby/pull/811) ([recurly-integrations](https://github.com/recurly-integrations))
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [4.25.0](https://github.com/recurly/recurly-client-ruby/tree/4.25.0) (2022-11-15)
|
15
|
+
|
16
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.24.0...4.25.0)
|
17
|
+
|
18
|
+
|
19
|
+
**Merged Pull Requests**
|
20
|
+
|
21
|
+
- Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#809](https://github.com/recurly/recurly-client-ruby/pull/809) ([recurly-integrations](https://github.com/recurly-integrations))
|
22
|
+
- Generated Latest Changes for v2021-02-25 [#807](https://github.com/recurly/recurly-client-ruby/pull/807) ([recurly-integrations](https://github.com/recurly-integrations))
|
23
|
+
|
24
|
+
|
25
|
+
|
3
26
|
## [4.24.0](https://github.com/recurly/recurly-client-ruby/tree/4.24.0) (2022-11-03)
|
4
27
|
|
5
28
|
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.23.0...4.24.0)
|
data/GETTING_STARTED.md
CHANGED
@@ -5,7 +5,7 @@ This repository houses the official ruby client for Recurly's V3 API.
|
|
5
5
|
In your Gemfile, add `recurly` as a dependency.
|
6
6
|
|
7
7
|
```ruby
|
8
|
-
gem 'recurly', '~> 4.
|
8
|
+
gem 'recurly', '~> 4.26'
|
9
9
|
```
|
10
10
|
|
11
11
|
> *Note*: We try to follow [semantic versioning](https://semver.org/) and will only apply breaking changes to major versions.
|
@@ -588,7 +588,7 @@ module Recurly
|
|
588
588
|
delete(path, **options)
|
589
589
|
end
|
590
590
|
|
591
|
-
#
|
591
|
+
# List the coupon redemptions for an account
|
592
592
|
#
|
593
593
|
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_coupon_redemptions list_account_coupon_redemptions api documentation}
|
594
594
|
#
|
@@ -636,7 +636,7 @@ module Recurly
|
|
636
636
|
pager(path, **options)
|
637
637
|
end
|
638
638
|
|
639
|
-
#
|
639
|
+
# List the coupon redemptions that are active on an account
|
640
640
|
#
|
641
641
|
# {https://developers.recurly.com/api/v2021-02-25#operation/list_active_coupon_redemptions list_active_coupon_redemptions api documentation}
|
642
642
|
#
|
@@ -950,7 +950,7 @@ module Recurly
|
|
950
950
|
post(path, body, Requests::LineItemCreate, **options)
|
951
951
|
end
|
952
952
|
|
953
|
-
#
|
953
|
+
# List an account's notes
|
954
954
|
#
|
955
955
|
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_notes list_account_notes api documentation}
|
956
956
|
#
|
@@ -2046,6 +2046,68 @@ module Recurly
|
|
2046
2046
|
delete(path, **options)
|
2047
2047
|
end
|
2048
2048
|
|
2049
|
+
# List a site's external products
|
2050
|
+
#
|
2051
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_external_products list_external_products api documentation}
|
2052
|
+
#
|
2053
|
+
# @param params [Hash] Optional query string parameters:
|
2054
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2055
|
+
# order. In descending order updated records will move behind the cursor and could
|
2056
|
+
# prevent some records from being returned.
|
2057
|
+
#
|
2058
|
+
#
|
2059
|
+
# @return [Pager<Resources::ExternalProduct>] A list of the the external_products on a site.
|
2060
|
+
#
|
2061
|
+
def list_external_products(**options)
|
2062
|
+
path = "/external_products"
|
2063
|
+
pager(path, **options)
|
2064
|
+
end
|
2065
|
+
|
2066
|
+
# Fetch an external product
|
2067
|
+
#
|
2068
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_external_product get_external_product api documentation}
|
2069
|
+
#
|
2070
|
+
# @param external_product_id [String] External product id
|
2071
|
+
# @param params [Hash] Optional query string parameters:
|
2072
|
+
#
|
2073
|
+
# @return [Resources::ExternalProduct] Settings for an external product.
|
2074
|
+
#
|
2075
|
+
def get_external_product(external_product_id:, **options)
|
2076
|
+
path = interpolate_path("/external_products/{external_product_id}", external_product_id: external_product_id)
|
2077
|
+
get(path, **options)
|
2078
|
+
end
|
2079
|
+
|
2080
|
+
# List a site's external subscriptions
|
2081
|
+
#
|
2082
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscriptions list_external_subscriptions api documentation}
|
2083
|
+
#
|
2084
|
+
# @param params [Hash] Optional query string parameters:
|
2085
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2086
|
+
# order. In descending order updated records will move behind the cursor and could
|
2087
|
+
# prevent some records from being returned.
|
2088
|
+
#
|
2089
|
+
#
|
2090
|
+
# @return [Pager<Resources::ExternalSubscription>] A list of the the external_subscriptions on a site.
|
2091
|
+
#
|
2092
|
+
def list_external_subscriptions(**options)
|
2093
|
+
path = "/external_subscriptions"
|
2094
|
+
pager(path, **options)
|
2095
|
+
end
|
2096
|
+
|
2097
|
+
# Fetch an external subscription
|
2098
|
+
#
|
2099
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription get_external_subscription api documentation}
|
2100
|
+
#
|
2101
|
+
# @param external_subscription_id [String] External subscription id
|
2102
|
+
# @param params [Hash] Optional query string parameters:
|
2103
|
+
#
|
2104
|
+
# @return [Resources::ExternalSubscription] Settings for an external subscription.
|
2105
|
+
#
|
2106
|
+
def get_external_subscription(external_subscription_id:, **options)
|
2107
|
+
path = interpolate_path("/external_subscriptions/{external_subscription_id}", external_subscription_id: external_subscription_id)
|
2108
|
+
get(path, **options)
|
2109
|
+
end
|
2110
|
+
|
2049
2111
|
# List a site's invoices
|
2050
2112
|
#
|
2051
2113
|
# {https://developers.recurly.com/api/v2021-02-25#operation/list_invoices list_invoices api documentation}
|
@@ -2174,6 +2236,21 @@ module Recurly
|
|
2174
2236
|
get(path, **options)
|
2175
2237
|
end
|
2176
2238
|
|
2239
|
+
# Apply available credit to a pending or past due charge invoice
|
2240
|
+
#
|
2241
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/apply_credit_balance apply_credit_balance api documentation}
|
2242
|
+
#
|
2243
|
+
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2244
|
+
# @param params [Hash] Optional query string parameters:
|
2245
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2246
|
+
#
|
2247
|
+
# @return [Resources::Invoice] The updated invoice.
|
2248
|
+
#
|
2249
|
+
def apply_credit_balance(invoice_id:, **options)
|
2250
|
+
path = interpolate_path("/invoices/{invoice_id}/apply_credit_balance", invoice_id: invoice_id)
|
2251
|
+
put(path, **options)
|
2252
|
+
end
|
2253
|
+
|
2177
2254
|
# Collect a pending or past due, automatic invoice
|
2178
2255
|
#
|
2179
2256
|
# {https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice collect_invoice api documentation}
|
@@ -2357,7 +2434,7 @@ module Recurly
|
|
2357
2434
|
pager(path, **options)
|
2358
2435
|
end
|
2359
2436
|
|
2360
|
-
#
|
2437
|
+
# List the coupon redemptions applied to an invoice
|
2361
2438
|
#
|
2362
2439
|
# {https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_coupon_redemptions list_invoice_coupon_redemptions api documentation}
|
2363
2440
|
#
|
@@ -3586,7 +3663,7 @@ module Recurly
|
|
3586
3663
|
pager(path, **options)
|
3587
3664
|
end
|
3588
3665
|
|
3589
|
-
#
|
3666
|
+
# List the coupon redemptions for a subscription
|
3590
3667
|
#
|
3591
3668
|
# {https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_coupon_redemptions list_subscription_coupon_redemptions api documentation}
|
3592
3669
|
#
|
@@ -4015,7 +4092,7 @@ module Recurly
|
|
4015
4092
|
get(path, **options)
|
4016
4093
|
end
|
4017
4094
|
|
4018
|
-
#
|
4095
|
+
# List the dunning campaigns for a site
|
4019
4096
|
#
|
4020
4097
|
# {https://developers.recurly.com/api/v2021-02-25#operation/list_dunning_campaigns list_dunning_campaigns api documentation}
|
4021
4098
|
#
|
@@ -4032,7 +4109,7 @@ module Recurly
|
|
4032
4109
|
pager(path, **options)
|
4033
4110
|
end
|
4034
4111
|
|
4035
|
-
#
|
4112
|
+
# Fetch a dunning campaign
|
4036
4113
|
#
|
4037
4114
|
# {https://developers.recurly.com/api/v2021-02-25#operation/get_dunning_campaign get_dunning_campaign api documentation}
|
4038
4115
|
#
|
@@ -4078,7 +4155,7 @@ module Recurly
|
|
4078
4155
|
pager(path, **options)
|
4079
4156
|
end
|
4080
4157
|
|
4081
|
-
#
|
4158
|
+
# Fetch an invoice template
|
4082
4159
|
#
|
4083
4160
|
# {https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_template get_invoice_template api documentation}
|
4084
4161
|
#
|
@@ -4092,7 +4169,7 @@ module Recurly
|
|
4092
4169
|
get(path, **options)
|
4093
4170
|
end
|
4094
4171
|
|
4095
|
-
#
|
4172
|
+
# List entitlements granted to an account
|
4096
4173
|
#
|
4097
4174
|
# {https://developers.recurly.com/api/v2021-02-25#operation/list_entitlements list_entitlements api documentation}
|
4098
4175
|
#
|
@@ -4110,5 +4187,23 @@ module Recurly
|
|
4110
4187
|
path = interpolate_path("/accounts/{account_id}/entitlements", account_id: account_id)
|
4111
4188
|
pager(path, **options)
|
4112
4189
|
end
|
4190
|
+
|
4191
|
+
# List an account's external subscriptions
|
4192
|
+
#
|
4193
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_subscriptions list_account_external_subscriptions api documentation}
|
4194
|
+
#
|
4195
|
+
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
4196
|
+
# @param params [Hash] Optional query string parameters:
|
4197
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
4198
|
+
# order. In descending order updated records will move behind the cursor and could
|
4199
|
+
# prevent some records from being returned.
|
4200
|
+
#
|
4201
|
+
#
|
4202
|
+
# @return [Pager<Resources::ExternalSubscription>] A list of the the external_subscriptions on an account.
|
4203
|
+
#
|
4204
|
+
def list_account_external_subscriptions(account_id:, **options)
|
4205
|
+
path = interpolate_path("/accounts/{account_id}/external_subscriptions", account_id: account_id)
|
4206
|
+
pager(path, **options)
|
4207
|
+
end
|
4113
4208
|
end
|
4114
4209
|
end
|
@@ -79,13 +79,17 @@ module Recurly
|
|
79
79
|
define_attribute :tax_code, String
|
80
80
|
|
81
81
|
# @!attribute tier_type
|
82
|
-
# @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://
|
82
|
+
# @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
|
83
83
|
define_attribute :tier_type, String
|
84
84
|
|
85
85
|
# @!attribute tiers
|
86
86
|
# @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier.
|
87
87
|
define_attribute :tiers, Array, { :item_type => :Tier }
|
88
88
|
|
89
|
+
# @!attribute usage_calculation_type
|
90
|
+
# @return [String] The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.
|
91
|
+
define_attribute :usage_calculation_type, String
|
92
|
+
|
89
93
|
# @!attribute usage_percentage
|
90
94
|
# @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.
|
91
95
|
define_attribute :usage_percentage, Float
|
@@ -95,7 +99,7 @@ module Recurly
|
|
95
99
|
define_attribute :usage_timeframe, String
|
96
100
|
|
97
101
|
# @!attribute usage_type
|
98
|
-
# @return [String] Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://
|
102
|
+
# @return [String] Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons.
|
99
103
|
define_attribute :usage_type, String
|
100
104
|
end
|
101
105
|
end
|
@@ -70,6 +70,10 @@ module Recurly
|
|
70
70
|
# @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier.
|
71
71
|
define_attribute :tiers, Array, { :item_type => :Tier }
|
72
72
|
|
73
|
+
# @!attribute usage_calculation_type
|
74
|
+
# @return [String] The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.
|
75
|
+
define_attribute :usage_calculation_type, String
|
76
|
+
|
73
77
|
# @!attribute usage_percentage
|
74
78
|
# @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.
|
75
79
|
define_attribute :usage_percentage, Float
|
@@ -115,7 +115,7 @@ module Recurly
|
|
115
115
|
define_attribute :three_d_secure_action_result_token_id, String
|
116
116
|
|
117
117
|
# @!attribute token_id
|
118
|
-
# @return [String] A token [generated by Recurly.js](https://
|
118
|
+
# @return [String] A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
|
119
119
|
define_attribute :token_id, String
|
120
120
|
|
121
121
|
# @!attribute transaction_type
|
@@ -38,6 +38,10 @@ module Recurly
|
|
38
38
|
# @return [Array[PlanPricing]] Pricing
|
39
39
|
define_attribute :currencies, Array, { :item_type => :PlanPricing }
|
40
40
|
|
41
|
+
# @!attribute custom_fields
|
42
|
+
# @return [Array[CustomField]] The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
|
43
|
+
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
44
|
+
|
41
45
|
# @!attribute description
|
42
46
|
# @return [String] Optional description, not displayed.
|
43
47
|
define_attribute :description, String
|
@@ -34,6 +34,10 @@ module Recurly
|
|
34
34
|
# @return [Array[PlanPricing]] Optional when the pricing model is 'ramp'.
|
35
35
|
define_attribute :currencies, Array, { :item_type => :PlanPricing }
|
36
36
|
|
37
|
+
# @!attribute custom_fields
|
38
|
+
# @return [Array[CustomField]] The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
|
39
|
+
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
40
|
+
|
37
41
|
# @!attribute description
|
38
42
|
# @return [String] Optional description, not displayed.
|
39
43
|
define_attribute :description, String
|
@@ -27,7 +27,7 @@ module Recurly
|
|
27
27
|
define_attribute :revenue_schedule_type, String
|
28
28
|
|
29
29
|
# @!attribute tiers
|
30
|
-
# @return [Array[SubscriptionAddOnTier]] If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier without an `ending_quantity` value which represents the final tier. See our [Guide](https://
|
30
|
+
# @return [Array[SubscriptionAddOnTier]] If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier without an `ending_quantity` value which represents the final tier. See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
|
31
31
|
define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
|
32
32
|
|
33
33
|
# @!attribute unit_amount
|
@@ -39,7 +39,7 @@ module Recurly
|
|
39
39
|
define_attribute :unit_amount_decimal, String
|
40
40
|
|
41
41
|
# @!attribute usage_percentage
|
42
|
-
# @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. Must be omitted otherwise. `usage_percentage` does not support tiers. See our [Guide](https://
|
42
|
+
# @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. Must be omitted otherwise. `usage_percentage` does not support tiers. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons.
|
43
43
|
define_attribute :usage_percentage, Float
|
44
44
|
end
|
45
45
|
end
|
@@ -10,6 +10,10 @@ module Recurly
|
|
10
10
|
# @return [Float] Total amount the account is past due.
|
11
11
|
define_attribute :amount, Float
|
12
12
|
|
13
|
+
# @!attribute available_credit_amount
|
14
|
+
# @return [Float] Total amount of the open balances on credit invoices for the account.
|
15
|
+
define_attribute :available_credit_amount, Float
|
16
|
+
|
13
17
|
# @!attribute currency
|
14
18
|
# @return [String] 3-letter ISO 4217 currency code.
|
15
19
|
define_attribute :currency, String
|
@@ -95,7 +95,7 @@ module Recurly
|
|
95
95
|
define_attribute :tax_code, String
|
96
96
|
|
97
97
|
# @!attribute tier_type
|
98
|
-
# @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://
|
98
|
+
# @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
|
99
99
|
define_attribute :tier_type, String
|
100
100
|
|
101
101
|
# @!attribute tiers
|
@@ -106,6 +106,10 @@ module Recurly
|
|
106
106
|
# @return [DateTime] Last updated at
|
107
107
|
define_attribute :updated_at, DateTime
|
108
108
|
|
109
|
+
# @!attribute usage_calculation_type
|
110
|
+
# @return [String] The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.
|
111
|
+
define_attribute :usage_calculation_type, String
|
112
|
+
|
109
113
|
# @!attribute usage_percentage
|
110
114
|
# @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.
|
111
115
|
define_attribute :usage_percentage, Float
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# This file is automatically created by Recurly's OpenAPI generation process
|
2
|
+
# and thus any edits you make by hand will be lost. If you wish to make a
|
3
|
+
# change to this file, please create a Github issue explaining the changes you
|
4
|
+
# need and we will usher them to the appropriate places.
|
5
|
+
module Recurly
|
6
|
+
module Resources
|
7
|
+
class ExternalProduct < Resource
|
8
|
+
|
9
|
+
# @!attribute created_at
|
10
|
+
# @return [DateTime] When the external product was created in Recurly.
|
11
|
+
define_attribute :created_at, DateTime
|
12
|
+
|
13
|
+
# @!attribute external_product_references
|
14
|
+
# @return [Array[ExternalProductReferenceMini]] List of external product references of the external product.
|
15
|
+
define_attribute :external_product_references, Array, { :item_type => :ExternalProductReferenceMini }
|
16
|
+
|
17
|
+
# @!attribute id
|
18
|
+
# @return [String] System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`.
|
19
|
+
define_attribute :id, String
|
20
|
+
|
21
|
+
# @!attribute name
|
22
|
+
# @return [String] Name to identify the external product in Recurly.
|
23
|
+
define_attribute :name, String
|
24
|
+
|
25
|
+
# @!attribute object
|
26
|
+
# @return [String] Object type
|
27
|
+
define_attribute :object, String
|
28
|
+
|
29
|
+
# @!attribute plan
|
30
|
+
# @return [PlanMini] Just the important parts.
|
31
|
+
define_attribute :plan, :PlanMini
|
32
|
+
|
33
|
+
# @!attribute updated_at
|
34
|
+
# @return [DateTime] When the external product was updated in Recurly.
|
35
|
+
define_attribute :updated_at, DateTime
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# This file is automatically created by Recurly's OpenAPI generation process
|
2
|
+
# and thus any edits you make by hand will be lost. If you wish to make a
|
3
|
+
# change to this file, please create a Github issue explaining the changes you
|
4
|
+
# need and we will usher them to the appropriate places.
|
5
|
+
module Recurly
|
6
|
+
module Resources
|
7
|
+
class ExternalProductReferenceMini < Resource
|
8
|
+
|
9
|
+
# @!attribute created_at
|
10
|
+
# @return [DateTime] When the external product was created in Recurly.
|
11
|
+
define_attribute :created_at, DateTime
|
12
|
+
|
13
|
+
# @!attribute external_connection_type
|
14
|
+
# @return [String] Source connection platform.
|
15
|
+
define_attribute :external_connection_type, String
|
16
|
+
|
17
|
+
# @!attribute id
|
18
|
+
# @return [String] System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`.
|
19
|
+
define_attribute :id, String
|
20
|
+
|
21
|
+
# @!attribute object
|
22
|
+
# @return [String] object
|
23
|
+
define_attribute :object, String
|
24
|
+
|
25
|
+
# @!attribute reference_code
|
26
|
+
# @return [String] A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store.
|
27
|
+
define_attribute :reference_code, String
|
28
|
+
|
29
|
+
# @!attribute updated_at
|
30
|
+
# @return [DateTime] When the external product was updated in Recurly.
|
31
|
+
define_attribute :updated_at, DateTime
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file is automatically created by Recurly's OpenAPI generation process
|
2
|
+
# and thus any edits you make by hand will be lost. If you wish to make a
|
3
|
+
# change to this file, please create a Github issue explaining the changes you
|
4
|
+
# need and we will usher them to the appropriate places.
|
5
|
+
module Recurly
|
6
|
+
module Resources
|
7
|
+
class ExternalResourceMini < Resource
|
8
|
+
|
9
|
+
# @!attribute external_object_reference
|
10
|
+
# @return [String] Identifier or URL reference where the resource is canonically available in the external platform.
|
11
|
+
define_attribute :external_object_reference, String
|
12
|
+
|
13
|
+
# @!attribute id
|
14
|
+
# @return [String] System-generated unique identifier for an external resource ID, e.g. `e28zov4fw0v2`.
|
15
|
+
define_attribute :id, String
|
16
|
+
|
17
|
+
# @!attribute object
|
18
|
+
# @return [String] Object type
|
19
|
+
define_attribute :object, String
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# This file is automatically created by Recurly's OpenAPI generation process
|
2
|
+
# and thus any edits you make by hand will be lost. If you wish to make a
|
3
|
+
# change to this file, please create a Github issue explaining the changes you
|
4
|
+
# need and we will usher them to the appropriate places.
|
5
|
+
module Recurly
|
6
|
+
module Resources
|
7
|
+
class ExternalSubscription < Resource
|
8
|
+
|
9
|
+
# @!attribute account
|
10
|
+
# @return [AccountMini] Account mini details
|
11
|
+
define_attribute :account, :AccountMini
|
12
|
+
|
13
|
+
# @!attribute activated_at
|
14
|
+
# @return [DateTime] When the external subscription was activated in the external platform.
|
15
|
+
define_attribute :activated_at, DateTime
|
16
|
+
|
17
|
+
# @!attribute app_identifier
|
18
|
+
# @return [String] Identifier of the app that generated the external subscription.
|
19
|
+
define_attribute :app_identifier, String
|
20
|
+
|
21
|
+
# @!attribute auto_renew
|
22
|
+
# @return [Boolean] An indication of whether or not the external subscription will auto-renew at the expiration date.
|
23
|
+
define_attribute :auto_renew, :Boolean
|
24
|
+
|
25
|
+
# @!attribute created_at
|
26
|
+
# @return [DateTime] When the external subscription was created in Recurly.
|
27
|
+
define_attribute :created_at, DateTime
|
28
|
+
|
29
|
+
# @!attribute expires_at
|
30
|
+
# @return [DateTime] When the external subscription expires in the external platform.
|
31
|
+
define_attribute :expires_at, DateTime
|
32
|
+
|
33
|
+
# @!attribute external_product_reference
|
34
|
+
# @return [ExternalProductReferenceMini] External Product Reference details
|
35
|
+
define_attribute :external_product_reference, :ExternalProductReferenceMini
|
36
|
+
|
37
|
+
# @!attribute external_resource
|
38
|
+
# @return [ExternalResourceMini] External Resource mini details
|
39
|
+
define_attribute :external_resource, :ExternalResourceMini
|
40
|
+
|
41
|
+
# @!attribute id
|
42
|
+
# @return [String] System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`.
|
43
|
+
define_attribute :id, String
|
44
|
+
|
45
|
+
# @!attribute last_purchased
|
46
|
+
# @return [DateTime] When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade.
|
47
|
+
define_attribute :last_purchased, DateTime
|
48
|
+
|
49
|
+
# @!attribute object
|
50
|
+
# @return [String] Object type
|
51
|
+
define_attribute :object, String
|
52
|
+
|
53
|
+
# @!attribute quantity
|
54
|
+
# @return [Integer] An indication of the quantity of a subscribed item's quantity.
|
55
|
+
define_attribute :quantity, Integer
|
56
|
+
|
57
|
+
# @!attribute updated_at
|
58
|
+
# @return [DateTime] When the external subscription was updated in Recurly.
|
59
|
+
define_attribute :updated_at, DateTime
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -38,6 +38,10 @@ module Recurly
|
|
38
38
|
# @return [Array[PlanPricing]] Pricing
|
39
39
|
define_attribute :currencies, Array, { :item_type => :PlanPricing }
|
40
40
|
|
41
|
+
# @!attribute custom_fields
|
42
|
+
# @return [Array[CustomField]] The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
|
43
|
+
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
44
|
+
|
41
45
|
# @!attribute deleted_at
|
42
46
|
# @return [DateTime] Deleted at
|
43
47
|
define_attribute :deleted_at, DateTime
|
@@ -47,7 +47,7 @@ module Recurly
|
|
47
47
|
define_attribute :subscription_id, String
|
48
48
|
|
49
49
|
# @!attribute tier_type
|
50
|
-
# @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://
|
50
|
+
# @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
|
51
51
|
define_attribute :tier_type, String
|
52
52
|
|
53
53
|
# @!attribute tiers
|
@@ -66,6 +66,10 @@ module Recurly
|
|
66
66
|
# @return [DateTime] Updated at
|
67
67
|
define_attribute :updated_at, DateTime
|
68
68
|
|
69
|
+
# @!attribute usage_calculation_type
|
70
|
+
# @return [String] The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.
|
71
|
+
define_attribute :usage_calculation_type, String
|
72
|
+
|
69
73
|
# @!attribute usage_percentage
|
70
74
|
# @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.
|
71
75
|
define_attribute :usage_percentage, Float
|
@@ -43,7 +43,7 @@ module Recurly
|
|
43
43
|
define_attribute :recording_timestamp, DateTime
|
44
44
|
|
45
45
|
# @!attribute tier_type
|
46
|
-
# @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://
|
46
|
+
# @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
|
47
47
|
define_attribute :tier_type, String
|
48
48
|
|
49
49
|
# @!attribute tiers
|
data/lib/recurly/version.rb
CHANGED