recurly 3.0.0.beta.3 → 3.0.0.beta.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -0
- data/.travis.yml +3 -1
- data/README.md +9 -2
- data/lib/recurly/client.rb +42 -13
- data/lib/recurly/client/adapter.rb +9 -18
- data/lib/recurly/client/operations.rb +1179 -78
- data/lib/recurly/errors/api_errors.rb +4 -0
- data/lib/recurly/errors/network_errors.rb +1 -1
- data/lib/recurly/pager.rb +5 -1
- data/lib/recurly/requests/account_acquisition_cost.rb +18 -0
- data/lib/recurly/requests/account_acquisition_updatable.rb +5 -1
- data/lib/recurly/requests/account_create.rb +23 -3
- data/lib/recurly/requests/account_update.rb +22 -2
- data/lib/recurly/requests/add_on_create.rb +7 -3
- data/lib/recurly/requests/add_on_pricing.rb +18 -0
- data/lib/recurly/requests/add_on_update.rb +7 -3
- data/lib/recurly/requests/address.rb +4 -0
- data/lib/recurly/requests/billing_info_create.rb +4 -0
- data/lib/recurly/requests/coupon_bulk_create.rb +4 -0
- data/lib/recurly/requests/coupon_create.rb +13 -9
- data/lib/recurly/requests/coupon_pricing.rb +18 -0
- data/lib/recurly/requests/coupon_redemption_create.rb +4 -0
- data/lib/recurly/requests/coupon_update.rb +4 -0
- data/lib/recurly/requests/external_refund.rb +22 -0
- data/lib/recurly/requests/invoice_address.rb +54 -0
- data/lib/recurly/requests/invoice_create.rb +6 -2
- data/lib/recurly/requests/invoice_refund.rb +7 -3
- data/lib/recurly/requests/invoice_updatable.rb +34 -0
- data/lib/recurly/requests/line_item_create.rb +6 -2
- data/lib/recurly/requests/line_item_refund.rb +4 -0
- data/lib/recurly/requests/plan_create.rb +11 -7
- data/lib/recurly/requests/plan_hosted_pages.rb +26 -0
- data/lib/recurly/requests/plan_pricing.rb +22 -0
- data/lib/recurly/requests/plan_update.rb +11 -7
- data/lib/recurly/requests/shipping_address_create.rb +4 -0
- data/lib/recurly/requests/shipping_address_update.rb +5 -1
- data/lib/recurly/requests/subscription_add_on_create.rb +8 -0
- data/lib/recurly/requests/subscription_change_create.rb +13 -5
- data/lib/recurly/requests/subscription_create.rb +11 -7
- data/lib/recurly/requests/subscription_pause.rb +4 -0
- data/lib/recurly/requests/subscription_update.rb +8 -4
- data/lib/recurly/resource.rb +6 -6
- data/lib/recurly/resources/account.rb +27 -11
- data/lib/recurly/resources/account_acquisition.rb +9 -5
- data/lib/recurly/resources/account_acquisition_cost.rb +18 -0
- data/lib/recurly/resources/account_balance.rb +7 -3
- data/lib/recurly/resources/account_balance_amount.rb +18 -0
- data/lib/recurly/resources/account_mini.rb +18 -2
- data/lib/recurly/resources/account_note.rb +7 -3
- data/lib/recurly/resources/add_on.rb +13 -9
- data/lib/recurly/resources/add_on_mini.rb +6 -2
- data/lib/recurly/resources/add_on_pricing.rb +18 -0
- data/lib/recurly/resources/address.rb +4 -0
- data/lib/recurly/resources/billing_info.rb +12 -8
- data/lib/recurly/resources/billing_info_payment_method.rb +34 -0
- data/lib/recurly/resources/billing_info_updated_by.rb +18 -0
- data/lib/recurly/resources/coupon.rb +21 -13
- data/lib/recurly/resources/coupon_discount.rb +7 -3
- data/lib/recurly/resources/coupon_discount_pricing.rb +18 -0
- data/lib/recurly/resources/coupon_discount_trial.rb +18 -0
- data/lib/recurly/resources/coupon_mini.rb +8 -4
- data/lib/recurly/resources/coupon_redemption.rb +9 -5
- data/lib/recurly/resources/coupon_redemption_mini.rb +8 -4
- data/lib/recurly/resources/credit_payment.rb +8 -4
- data/lib/recurly/resources/custom_field.rb +4 -0
- data/lib/recurly/resources/custom_field_definition.rb +11 -7
- data/lib/recurly/resources/error.rb +6 -2
- data/lib/recurly/resources/error_may_have_transaction.rb +6 -2
- data/lib/recurly/resources/fraud_info.rb +22 -0
- data/lib/recurly/resources/invoice.rb +17 -13
- data/lib/recurly/resources/invoice_address.rb +54 -0
- data/lib/recurly/resources/invoice_collection.rb +5 -1
- data/lib/recurly/resources/invoice_mini.rb +6 -2
- data/lib/recurly/resources/line_item.rb +13 -5
- data/lib/recurly/resources/line_item_list.rb +5 -1
- data/lib/recurly/resources/plan.rb +16 -12
- data/lib/recurly/resources/plan_hosted_pages.rb +26 -0
- data/lib/recurly/resources/plan_mini.rb +6 -2
- data/lib/recurly/resources/plan_pricing.rb +22 -0
- data/lib/recurly/resources/settings.rb +7 -3
- data/lib/recurly/resources/shipping_address.rb +8 -4
- data/lib/recurly/resources/site.rb +16 -8
- data/lib/recurly/resources/subscription.rb +9 -5
- data/lib/recurly/resources/subscription_add_on.rb +4 -0
- data/lib/recurly/resources/subscription_change.rb +9 -5
- data/lib/recurly/resources/tax_info.rb +4 -0
- data/lib/recurly/resources/transaction.rb +16 -8
- data/lib/recurly/resources/transaction_payment_gateway.rb +26 -0
- data/lib/recurly/resources/transaction_payment_method.rb +34 -0
- data/lib/recurly/resources/unique_coupon_code.rb +10 -6
- data/lib/recurly/resources/user.rb +8 -4
- data/lib/recurly/schema/json_deserializer.rb +18 -20
- data/lib/recurly/schema/request_caster.rb +1 -1
- data/lib/recurly/schema/schema_validator.rb +31 -8
- data/lib/recurly/version.rb +1 -1
- data/recurly.gemspec +1 -1
- data/scripts/check-deps +28 -0
- data/scripts/install-deps +44 -0
- metadata +37 -7
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Errors
|
3
7
|
class BadRequestError < Errors::APIError; end
|
data/lib/recurly/pager.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
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 Requests
|
7
|
+
class AccountAcquisitionCost < Request
|
8
|
+
|
9
|
+
# @!attribute amount
|
10
|
+
# @return [Float] The amount of the corresponding currency used to acquire the account.
|
11
|
+
define_attribute :amount, Float
|
12
|
+
|
13
|
+
# @!attribute currency
|
14
|
+
# @return [String] 3-letter ISO 4217 currency code.
|
15
|
+
define_attribute :currency, String
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class AccountAcquisitionUpdatable < Request
|
@@ -8,7 +12,7 @@ module Recurly
|
|
8
12
|
|
9
13
|
# @!attribute channel
|
10
14
|
# @return [String] The channel through which the account was acquired.
|
11
|
-
define_attribute :channel, String, {:enum => ["referral", "social_media", "email", "paid_search", "organic_search", "direct_traffic", "marketing_content", "blog", "events", "outbound_sales", "advertising", "public_relations", "other"]}
|
15
|
+
define_attribute :channel, String, { :enum => ["referral", "social_media", "email", "paid_search", "organic_search", "direct_traffic", "marketing_content", "blog", "events", "outbound_sales", "advertising", "public_relations", "other"] }
|
12
16
|
|
13
17
|
# @!attribute cost
|
14
18
|
# @return [Hash] Account balance
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class AccountCreate < Request
|
@@ -10,6 +14,10 @@ module Recurly
|
|
10
14
|
# @return [Address]
|
11
15
|
define_attribute :address, :Address
|
12
16
|
|
17
|
+
# @!attribute bill_to
|
18
|
+
# @return [String] An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
|
19
|
+
define_attribute :bill_to, String, { :enum => ["self", "parent"] }
|
20
|
+
|
13
21
|
# @!attribute billing_info
|
14
22
|
# @return [BillingInfoCreate]
|
15
23
|
define_attribute :billing_info, :BillingInfoCreate
|
@@ -28,12 +36,16 @@ module Recurly
|
|
28
36
|
|
29
37
|
# @!attribute custom_fields
|
30
38
|
# @return [Array[CustomField]]
|
31
|
-
define_attribute :custom_fields, Array, {:item_type => :CustomField}
|
39
|
+
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
32
40
|
|
33
41
|
# @!attribute email
|
34
42
|
# @return [String] The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
|
35
43
|
define_attribute :email, String
|
36
44
|
|
45
|
+
# @!attribute exemption_certificate
|
46
|
+
# @return [String] The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
|
47
|
+
define_attribute :exemption_certificate, String
|
48
|
+
|
37
49
|
# @!attribute first_name
|
38
50
|
# @return [String]
|
39
51
|
define_attribute :first_name, String
|
@@ -42,13 +54,21 @@ module Recurly
|
|
42
54
|
# @return [String]
|
43
55
|
define_attribute :last_name, String
|
44
56
|
|
57
|
+
# @!attribute parent_account_code
|
58
|
+
# @return [String] The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
|
59
|
+
define_attribute :parent_account_code, String
|
60
|
+
|
61
|
+
# @!attribute parent_account_id
|
62
|
+
# @return [String] The UUID of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
|
63
|
+
define_attribute :parent_account_id, String
|
64
|
+
|
45
65
|
# @!attribute preferred_locale
|
46
66
|
# @return [String] Used to determine the language and locale of emails sent on behalf of the merchant to the customer. The list of locales is restricted to those the merchant has enabled on the site.
|
47
|
-
define_attribute :preferred_locale, String, {:enum => ["da-DK", "de-CH", "de-DE", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "es-ES", "es-MX", "es-US", "fr-CA", "fr-FR", "hi-IN", "ja-JP", "nl-BE", "nl-NL", "pt-BR", "pt-PT", "ru-RU", "tr-TR", "zh-CN"]}
|
67
|
+
define_attribute :preferred_locale, String, { :enum => ["da-DK", "de-CH", "de-DE", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "es-ES", "es-MX", "es-US", "fr-CA", "fr-FR", "hi-IN", "ja-JP", "nl-BE", "nl-NL", "pt-BR", "pt-PT", "ru-RU", "tr-TR", "zh-CN"] }
|
48
68
|
|
49
69
|
# @!attribute shipping_addresses
|
50
70
|
# @return [Array[ShippingAddressCreate]]
|
51
|
-
define_attribute :shipping_addresses, Array, {:item_type => :ShippingAddressCreate}
|
71
|
+
define_attribute :shipping_addresses, Array, { :item_type => :ShippingAddressCreate }
|
52
72
|
|
53
73
|
# @!attribute tax_exempt
|
54
74
|
# @return [Boolean] The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class AccountUpdate < Request
|
@@ -6,6 +10,10 @@ module Recurly
|
|
6
10
|
# @return [Address]
|
7
11
|
define_attribute :address, :Address
|
8
12
|
|
13
|
+
# @!attribute bill_to
|
14
|
+
# @return [String] An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
|
15
|
+
define_attribute :bill_to, String, { :enum => ["self", "parent"] }
|
16
|
+
|
9
17
|
# @!attribute billing_info
|
10
18
|
# @return [BillingInfoCreate]
|
11
19
|
define_attribute :billing_info, :BillingInfoCreate
|
@@ -20,12 +28,16 @@ module Recurly
|
|
20
28
|
|
21
29
|
# @!attribute custom_fields
|
22
30
|
# @return [Array[CustomField]]
|
23
|
-
define_attribute :custom_fields, Array, {:item_type => :CustomField}
|
31
|
+
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
24
32
|
|
25
33
|
# @!attribute email
|
26
34
|
# @return [String] The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
|
27
35
|
define_attribute :email, String
|
28
36
|
|
37
|
+
# @!attribute exemption_certificate
|
38
|
+
# @return [String] The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
|
39
|
+
define_attribute :exemption_certificate, String
|
40
|
+
|
29
41
|
# @!attribute first_name
|
30
42
|
# @return [String]
|
31
43
|
define_attribute :first_name, String
|
@@ -34,9 +46,17 @@ module Recurly
|
|
34
46
|
# @return [String]
|
35
47
|
define_attribute :last_name, String
|
36
48
|
|
49
|
+
# @!attribute parent_account_code
|
50
|
+
# @return [String] The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
|
51
|
+
define_attribute :parent_account_code, String
|
52
|
+
|
53
|
+
# @!attribute parent_account_id
|
54
|
+
# @return [String] The UUID of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
|
55
|
+
define_attribute :parent_account_id, String
|
56
|
+
|
37
57
|
# @!attribute preferred_locale
|
38
58
|
# @return [String] Used to determine the language and locale of emails sent on behalf of the merchant to the customer. The list of locales is restricted to those the merchant has enabled on the site.
|
39
|
-
define_attribute :preferred_locale, String, {:enum => ["da-DK", "de-CH", "de-DE", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "es-ES", "es-MX", "es-US", "fr-CA", "fr-FR", "hi-IN", "ja-JP", "nl-BE", "nl-NL", "pt-BR", "pt-PT", "ru-RU", "tr-TR", "zh-CN"]}
|
59
|
+
define_attribute :preferred_locale, String, { :enum => ["da-DK", "de-CH", "de-DE", "en-AU", "en-CA", "en-GB", "en-NZ", "en-US", "es-ES", "es-MX", "es-US", "fr-CA", "fr-FR", "hi-IN", "ja-JP", "nl-BE", "nl-NL", "pt-BR", "pt-PT", "ru-RU", "tr-TR", "zh-CN"] }
|
40
60
|
|
41
61
|
# @!attribute tax_exempt
|
42
62
|
# @return [Boolean] The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class AddOnCreate < Request
|
@@ -11,8 +15,8 @@ module Recurly
|
|
11
15
|
define_attribute :code, String
|
12
16
|
|
13
17
|
# @!attribute currencies
|
14
|
-
# @return [Array[
|
15
|
-
define_attribute :currencies, Array, {:item_type =>
|
18
|
+
# @return [Array[AddOnPricing]] Add-on pricing
|
19
|
+
define_attribute :currencies, Array, { :item_type => :AddOnPricing }
|
16
20
|
|
17
21
|
# @!attribute default_quantity
|
18
22
|
# @return [Integer] Default quantity for the hosted pages.
|
@@ -28,7 +32,7 @@ module Recurly
|
|
28
32
|
|
29
33
|
# @!attribute [r] plan_id
|
30
34
|
# @return [String] Plan ID
|
31
|
-
define_attribute :plan_id, String, {:read_only => true}
|
35
|
+
define_attribute :plan_id, String, { :read_only => true }
|
32
36
|
|
33
37
|
# @!attribute tax_code
|
34
38
|
# @return [String] Optional field for EU VAT merchants and Avalara AvaTax Pro merchants. If you are using Recurly's EU VAT feature, you can use values of 'unknown', 'physical', or 'digital'. If you have your own AvaTax account configured, you can use Avalara tax codes to assign custom tax rules.
|
@@ -0,0 +1,18 @@
|
|
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 Requests
|
7
|
+
class AddOnPricing < Request
|
8
|
+
|
9
|
+
# @!attribute currency
|
10
|
+
# @return [String] 3-letter ISO 4217 currency code.
|
11
|
+
define_attribute :currency, String
|
12
|
+
|
13
|
+
# @!attribute unit_amount
|
14
|
+
# @return [Float] Unit price
|
15
|
+
define_attribute :unit_amount, Float
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class AddOnUpdate < Request
|
@@ -11,8 +15,8 @@ module Recurly
|
|
11
15
|
define_attribute :code, String
|
12
16
|
|
13
17
|
# @!attribute currencies
|
14
|
-
# @return [Array[
|
15
|
-
define_attribute :currencies, Array, {:item_type =>
|
18
|
+
# @return [Array[AddOnPricing]] Add-on pricing
|
19
|
+
define_attribute :currencies, Array, { :item_type => :AddOnPricing }
|
16
20
|
|
17
21
|
# @!attribute default_quantity
|
18
22
|
# @return [Integer] Default quantity for the hosted pages.
|
@@ -24,7 +28,7 @@ module Recurly
|
|
24
28
|
|
25
29
|
# @!attribute [r] id
|
26
30
|
# @return [String] Add-on ID
|
27
|
-
define_attribute :id, String, {:read_only => true}
|
31
|
+
define_attribute :id, String, { :read_only => true }
|
28
32
|
|
29
33
|
# @!attribute name
|
30
34
|
# @return [String] Describes your add-on and will appear in subscribers' invoices.
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class Address < Request
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class BillingInfoCreate < Request
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class CouponBulkCreate < Request
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class CouponCreate < Request
|
@@ -16,11 +20,11 @@ module Recurly
|
|
16
20
|
|
17
21
|
# @!attribute coupon_type
|
18
22
|
# @return [String] Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.
|
19
|
-
define_attribute :coupon_type, String, {:enum => ["single_code", "bulk"]}
|
23
|
+
define_attribute :coupon_type, String, { :enum => ["single_code", "bulk"] }
|
20
24
|
|
21
25
|
# @!attribute currencies
|
22
|
-
# @return [Array[
|
23
|
-
define_attribute :currencies, Array, {:item_type =>
|
26
|
+
# @return [Array[CouponPricing]] Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values
|
27
|
+
define_attribute :currencies, Array, { :item_type => :CouponPricing }
|
24
28
|
|
25
29
|
# @!attribute discount_percent
|
26
30
|
# @return [Integer] The percent of the price discounted by the coupon. Required if `discount_type` is `percent`.
|
@@ -28,11 +32,11 @@ module Recurly
|
|
28
32
|
|
29
33
|
# @!attribute discount_type
|
30
34
|
# @return [String] The type of discount provided by the coupon (how the amount discounted is calculated)
|
31
|
-
define_attribute :discount_type, String, {:enum => ["percent", "fixed", "free_trial"]}
|
35
|
+
define_attribute :discount_type, String, { :enum => ["percent", "fixed", "free_trial"] }
|
32
36
|
|
33
37
|
# @!attribute duration
|
34
38
|
# @return [String] This field does not apply when the discount_type is `free_trial`. - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. - "forever" coupons will apply to invoices forever.
|
35
|
-
define_attribute :duration, String, {:enum => ["forever", "single_use", "temporal"]}
|
39
|
+
define_attribute :duration, String, { :enum => ["forever", "single_use", "temporal"] }
|
36
40
|
|
37
41
|
# @!attribute free_trial_amount
|
38
42
|
# @return [Integer] Sets the duration of time the `free_trial_unit` is for. Required if `discount_type` is `free_trial`.
|
@@ -40,7 +44,7 @@ module Recurly
|
|
40
44
|
|
41
45
|
# @!attribute free_trial_unit
|
42
46
|
# @return [String] Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`.
|
43
|
-
define_attribute :free_trial_unit, String, {:enum => ["day", "week", "month"]}
|
47
|
+
define_attribute :free_trial_unit, String, { :enum => ["day", "week", "month"] }
|
44
48
|
|
45
49
|
# @!attribute hosted_description
|
46
50
|
# @return [String] This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page.
|
@@ -64,7 +68,7 @@ module Recurly
|
|
64
68
|
|
65
69
|
# @!attribute plan_codes
|
66
70
|
# @return [Array[String]] List of plan codes to which this coupon applies. See `applies_to_all_plans`
|
67
|
-
define_attribute :plan_codes, Array, {:item_type => String}
|
71
|
+
define_attribute :plan_codes, Array, { :item_type => String }
|
68
72
|
|
69
73
|
# @!attribute redeem_by_date
|
70
74
|
# @return [String] The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
|
@@ -72,7 +76,7 @@ module Recurly
|
|
72
76
|
|
73
77
|
# @!attribute redemption_resource
|
74
78
|
# @return [String] Whether the discount is for all eligible charges on the account, or only a specific subscription.
|
75
|
-
define_attribute :redemption_resource, String, {:enum => ["account", "subscription"]}
|
79
|
+
define_attribute :redemption_resource, String, { :enum => ["account", "subscription"] }
|
76
80
|
|
77
81
|
# @!attribute temporal_amount
|
78
82
|
# @return [Integer] If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for.
|
@@ -80,7 +84,7 @@ module Recurly
|
|
80
84
|
|
81
85
|
# @!attribute temporal_unit
|
82
86
|
# @return [String] If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for.
|
83
|
-
define_attribute :temporal_unit, String, {:enum => ["day", "week", "month", "year"]}
|
87
|
+
define_attribute :temporal_unit, String, { :enum => ["day", "week", "month", "year"] }
|
84
88
|
|
85
89
|
# @!attribute unique_code_template
|
86
90
|
# @return [String] On a bulk coupon, the template from which unique coupon codes are generated. - You must start the template with your coupon_code wrapped in single quotes. - Outside of single quotes, use a 9 for a character that you want to be a random number. - Outside of single quotes, use an "x" for a character that you want to be a random letter. - Outside of single quotes, use an * for a character that you want to be a random number or letter. - Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +. For example: "'abc-'****'-def'"
|
@@ -0,0 +1,18 @@
|
|
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 Requests
|
7
|
+
class CouponPricing < Request
|
8
|
+
|
9
|
+
# @!attribute currency
|
10
|
+
# @return [String] 3-letter ISO 4217 currency code.
|
11
|
+
define_attribute :currency, String
|
12
|
+
|
13
|
+
# @!attribute discount
|
14
|
+
# @return [Float] The fixed discount (in dollars) for the corresponding currency.
|
15
|
+
define_attribute :discount, Float
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class CouponRedemptionCreate < Request
|
@@ -1,3 +1,7 @@
|
|
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.
|
1
5
|
module Recurly
|
2
6
|
module Requests
|
3
7
|
class CouponUpdate < Request
|
@@ -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 Requests
|
7
|
+
class ExternalRefund < Request
|
8
|
+
|
9
|
+
# @!attribute description
|
10
|
+
# @return [String] Used as the refund transactions' description.
|
11
|
+
define_attribute :description, String
|
12
|
+
|
13
|
+
# @!attribute payment_method
|
14
|
+
# @return [String] Payment method used for external refund transaction.
|
15
|
+
define_attribute :payment_method, String, { :enum => ["credit_card", "paypal", "amazon", "roku", "ach", "apple_pay", "sepadirectdebit", "eft", "wire_transfer", "money_order", "check", "other"] }
|
16
|
+
|
17
|
+
# @!attribute refunded_at
|
18
|
+
# @return [DateTime] Date the external refund payment was made. Defaults to the current date-time.
|
19
|
+
define_attribute :refunded_at, DateTime
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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 Requests
|
7
|
+
class InvoiceAddress < Request
|
8
|
+
|
9
|
+
# @!attribute city
|
10
|
+
# @return [String] City
|
11
|
+
define_attribute :city, String
|
12
|
+
|
13
|
+
# @!attribute company
|
14
|
+
# @return [String] Company
|
15
|
+
define_attribute :company, String
|
16
|
+
|
17
|
+
# @!attribute country
|
18
|
+
# @return [String] Country, 2-letter ISO code.
|
19
|
+
define_attribute :country, String
|
20
|
+
|
21
|
+
# @!attribute first_name
|
22
|
+
# @return [String] First name
|
23
|
+
define_attribute :first_name, String
|
24
|
+
|
25
|
+
# @!attribute last_name
|
26
|
+
# @return [String] Last name
|
27
|
+
define_attribute :last_name, String
|
28
|
+
|
29
|
+
# @!attribute name_on_account
|
30
|
+
# @return [String] Name on account
|
31
|
+
define_attribute :name_on_account, String
|
32
|
+
|
33
|
+
# @!attribute phone
|
34
|
+
# @return [String] Phone number
|
35
|
+
define_attribute :phone, String
|
36
|
+
|
37
|
+
# @!attribute postal_code
|
38
|
+
# @return [String] Zip or postal code.
|
39
|
+
define_attribute :postal_code, String
|
40
|
+
|
41
|
+
# @!attribute region
|
42
|
+
# @return [String] State or province.
|
43
|
+
define_attribute :region, String
|
44
|
+
|
45
|
+
# @!attribute street1
|
46
|
+
# @return [String] Street 1
|
47
|
+
define_attribute :street1, String
|
48
|
+
|
49
|
+
# @!attribute street2
|
50
|
+
# @return [String] Street 2
|
51
|
+
define_attribute :street2, String
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|