recurly 3.10.0 → 3.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -2
  3. data/CHANGELOG.md +64 -2
  4. data/CODE_OF_CONDUCT.md +130 -0
  5. data/CONTRIBUTING.md +4 -0
  6. data/GETTING_STARTED.md +1 -1
  7. data/README.md +3 -0
  8. data/lib/recurly/client.rb +7 -2
  9. data/lib/recurly/client/operations.rb +173 -0
  10. data/lib/recurly/errors/api_errors.rb +2 -0
  11. data/lib/recurly/requests/add_on_create.rb +10 -2
  12. data/lib/recurly/requests/add_on_update.rb +8 -0
  13. data/lib/recurly/requests/billing_info_create.rb +4 -0
  14. data/lib/recurly/requests/coupon_create.rb +9 -1
  15. data/lib/recurly/requests/invoice_collect.rb +4 -0
  16. data/lib/recurly/requests/item_create.rb +8 -0
  17. data/lib/recurly/requests/item_update.rb +8 -0
  18. data/lib/recurly/requests/line_item_create.rb +9 -1
  19. data/lib/recurly/requests/plan_create.rb +8 -0
  20. data/lib/recurly/requests/plan_update.rb +8 -0
  21. data/lib/recurly/requests/shipping_purchase.rb +1 -1
  22. data/lib/recurly/requests/subscription_add_on_create.rb +2 -2
  23. data/lib/recurly/requests/subscription_change_create.rb +5 -1
  24. data/lib/recurly/requests/subscription_update.rb +4 -0
  25. data/lib/recurly/resources/add_on.rb +8 -0
  26. data/lib/recurly/resources/billing_info.rb +4 -0
  27. data/lib/recurly/resources/coupon.rb +17 -1
  28. data/lib/recurly/resources/export_dates.rb +18 -0
  29. data/lib/recurly/resources/export_file.rb +22 -0
  30. data/lib/recurly/resources/export_files.rb +18 -0
  31. data/lib/recurly/resources/invoice.rb +4 -0
  32. data/lib/recurly/resources/item.rb +8 -0
  33. data/lib/recurly/resources/line_item.rb +8 -0
  34. data/lib/recurly/resources/plan.rb +8 -0
  35. data/lib/recurly/resources/subscription.rb +4 -0
  36. data/lib/recurly/resources/subscription_change.rb +4 -0
  37. data/lib/recurly/resources/subscription_change_preview.rb +4 -0
  38. data/lib/recurly/resources/unique_coupon_code.rb +8 -0
  39. data/lib/recurly/resources/usage.rb +8 -0
  40. data/lib/recurly/version.rb +1 -1
  41. data/openapi/api.yaml +924 -45
  42. metadata +10 -6
@@ -26,6 +26,8 @@ module Recurly
26
26
 
27
27
  class InternalServerError < ServerError; end
28
28
 
29
+ class ServiceNotAvailableError < InternalServerError; end
30
+
29
31
  class BadGatewayError < ServerError; end
30
32
 
31
33
  class ServiceUnavailableError < ServerError; end
@@ -14,6 +14,14 @@ module Recurly
14
14
  # @return [String] Whether the add-on type is fixed, or usage-based.
15
15
  define_attribute :add_on_type, String
16
16
 
17
+ # @!attribute avalara_service_type
18
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent.
19
+ define_attribute :avalara_service_type, Integer
20
+
21
+ # @!attribute avalara_transaction_type
22
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent.
23
+ define_attribute :avalara_transaction_type, Integer
24
+
17
25
  # @!attribute code
18
26
  # @return [String] The unique identifier for the add-on within its plan. If `item_code`/`item_id` is part of the request then `code` must be absent. If `item_code`/`item_id` is not present `code` is required.
19
27
  define_attribute :code, String
@@ -67,7 +75,7 @@ module Recurly
67
75
  define_attribute :tax_code, String
68
76
 
69
77
  # @!attribute tier_type
70
- # @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based).
78
+ # @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://developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
71
79
  define_attribute :tier_type, String
72
80
 
73
81
  # @!attribute tiers
@@ -79,7 +87,7 @@ module Recurly
79
87
  define_attribute :usage_percentage, Float
80
88
 
81
89
  # @!attribute usage_type
82
- # @return [String] Type of usage, required if `add_on_type` is `usage`.
90
+ # @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.
83
91
  define_attribute :usage_type, String
84
92
  end
85
93
  end
@@ -10,6 +10,14 @@ module Recurly
10
10
  # @return [String] Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If an `Item` is associated to the `AddOn` then `accounting code` must be absent.
11
11
  define_attribute :accounting_code, String
12
12
 
13
+ # @!attribute avalara_service_type
14
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent.
15
+ define_attribute :avalara_service_type, Integer
16
+
17
+ # @!attribute avalara_transaction_type
18
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent.
19
+ define_attribute :avalara_transaction_type, Integer
20
+
13
21
  # @!attribute code
14
22
  # @return [String] The unique identifier for the add-on within its plan. If an `Item` is associated to the `AddOn` then `code` must be absent.
15
23
  define_attribute :code, String
@@ -74,6 +74,10 @@ module Recurly
74
74
  # @return [String] PayPal billing agreement ID
75
75
  define_attribute :paypal_billing_agreement_id, String
76
76
 
77
+ # @!attribute primary_payment_method
78
+ # @return [Boolean] The `primary_payment_method` indicator is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` indicator. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.
79
+ define_attribute :primary_payment_method, :Boolean
80
+
77
81
  # @!attribute routing_number
78
82
  # @return [String] The bank's rounting number. (ACH only)
79
83
  define_attribute :routing_number, String
@@ -6,6 +6,10 @@ module Recurly
6
6
  module Requests
7
7
  class CouponCreate < Request
8
8
 
9
+ # @!attribute applies_to_all_items
10
+ # @return [Boolean] To apply coupon to Items in your Catalog, include a list of `item_codes` in the request that the coupon will apply to. Or set value to true to apply to all Items in your Catalog. The following values are not permitted when `applies_to_all_items` is included: `free_trial_amount` and `free_trial_unit`.
11
+ define_attribute :applies_to_all_items, :Boolean
12
+
9
13
  # @!attribute applies_to_all_plans
10
14
  # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` and `plans_names` will list the applicable plans.
11
15
  define_attribute :applies_to_all_plans, :Boolean
@@ -54,6 +58,10 @@ module Recurly
54
58
  # @return [String] Description of the coupon on the invoice.
55
59
  define_attribute :invoice_description, String
56
60
 
61
+ # @!attribute item_codes
62
+ # @return [Array[String]] List of item codes to which this coupon applies. Sending `item_codes` is only permitted when `applies_to_all_items` is set to false. The following values are not permitted when `item_codes` is included: `free_trial_amount` and `free_trial_unit`.
63
+ define_attribute :item_codes, Array, { :item_type => String }
64
+
57
65
  # @!attribute max_redemptions
58
66
  # @return [Integer] A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.
59
67
  define_attribute :max_redemptions, Integer
@@ -67,7 +75,7 @@ module Recurly
67
75
  define_attribute :name, String
68
76
 
69
77
  # @!attribute plan_codes
70
- # @return [Array[String]] List of plan codes to which this coupon applies. See `applies_to_all_plans`
78
+ # @return [Array[String]] List of plan codes to which this coupon applies. Required if `applies_to_all_plans` is false. Overrides `applies_to_all_plans` when `applies_to_all_plans` is true.
71
79
  define_attribute :plan_codes, Array, { :item_type => String }
72
80
 
73
81
  # @!attribute redeem_by_date
@@ -6,6 +6,10 @@ module Recurly
6
6
  module Requests
7
7
  class InvoiceCollect < Request
8
8
 
9
+ # @!attribute billing_info_id
10
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
11
+ define_attribute :billing_info_id, String
12
+
9
13
  # @!attribute three_d_secure_action_result_token_id
10
14
  # @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
11
15
  define_attribute :three_d_secure_action_result_token_id, String
@@ -10,6 +10,14 @@ module Recurly
10
10
  # @return [String] Accounting code for invoice line items.
11
11
  define_attribute :accounting_code, String
12
12
 
13
+ # @!attribute avalara_service_type
14
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
15
+ define_attribute :avalara_service_type, Integer
16
+
17
+ # @!attribute avalara_transaction_type
18
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
19
+ define_attribute :avalara_transaction_type, Integer
20
+
13
21
  # @!attribute code
14
22
  # @return [String] Unique code to identify the item.
15
23
  define_attribute :code, String
@@ -10,6 +10,14 @@ module Recurly
10
10
  # @return [String] Accounting code for invoice line items.
11
11
  define_attribute :accounting_code, String
12
12
 
13
+ # @!attribute avalara_service_type
14
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
15
+ define_attribute :avalara_service_type, Integer
16
+
17
+ # @!attribute avalara_transaction_type
18
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
19
+ define_attribute :avalara_transaction_type, Integer
20
+
13
21
  # @!attribute code
14
22
  # @return [String] Unique code to identify the item.
15
23
  define_attribute :code, String
@@ -10,6 +10,14 @@ module Recurly
10
10
  # @return [String] Accounting Code for the `LineItem`. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent.
11
11
  define_attribute :accounting_code, String
12
12
 
13
+ # @!attribute avalara_service_type
14
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `LineItem`, then the `avalara_service_type` must be absent.
15
+ define_attribute :avalara_service_type, Integer
16
+
17
+ # @!attribute avalara_transaction_type
18
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `LineItem`, then the `avalara_transaction_type` must be absent.
19
+ define_attribute :avalara_transaction_type, Integer
20
+
13
21
  # @!attribute credit_reason_code
14
22
  # @return [String] The reason the credit was given when line item is `type=credit`. When the Credit Invoices feature is enabled, the value can be set and will default to `general`. When the Credit Invoices feature is not enabled, the value will always be `null`.
15
23
  define_attribute :credit_reason_code, String
@@ -35,7 +43,7 @@ module Recurly
35
43
  define_attribute :item_id, String
36
44
 
37
45
  # @!attribute origin
38
- # @return [String] Only allowed if the Gift Cards feature is enabled on your site and `type` is `credit`. Can only have a value of `external_gift_card`. Set this value in order to track gift card credits from external gift cards (like InComm). It also skips billing information requirements.
46
+ # @return [String] Origin `external_gift_card` is allowed if the Gift Cards feature is enabled on your site and `type` is `credit`. Set this value in order to track gift card credits from external gift cards (like InComm). It also skips billing information requirements. Origin `prepayment` is only allowed if `type` is `charge` and `tax_exempt` is left blank or set to true. This origin creates a charge and opposite credit on the account to be used for future invoices.
39
47
  define_attribute :origin, String
40
48
 
41
49
  # @!attribute product_code
@@ -22,6 +22,14 @@ module Recurly
22
22
  # @return [Boolean] Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.
23
23
  define_attribute :auto_renew, :Boolean
24
24
 
25
+ # @!attribute avalara_service_type
26
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
27
+ define_attribute :avalara_service_type, Integer
28
+
29
+ # @!attribute avalara_transaction_type
30
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
31
+ define_attribute :avalara_transaction_type, Integer
32
+
25
33
  # @!attribute code
26
34
  # @return [String] Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
27
35
  define_attribute :code, String
@@ -22,6 +22,14 @@ module Recurly
22
22
  # @return [Boolean] Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.
23
23
  define_attribute :auto_renew, :Boolean
24
24
 
25
+ # @!attribute avalara_service_type
26
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
27
+ define_attribute :avalara_service_type, Integer
28
+
29
+ # @!attribute avalara_transaction_type
30
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
31
+ define_attribute :avalara_transaction_type, Integer
32
+
25
33
  # @!attribute code
26
34
  # @return [String] Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
27
35
  define_attribute :code, String
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :address, :ShippingAddressCreate
12
12
 
13
13
  # @!attribute address_id
14
- # @return [String] Assign a shipping address from the account's existing shipping addresses. If this and `shipping_address` are both present, `shipping_address` will take precedence.
14
+ # @return [String] Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence.
15
15
  define_attribute :address_id, String
16
16
 
17
17
  # @!attribute fees
@@ -23,7 +23,7 @@ module Recurly
23
23
  define_attribute :revenue_schedule_type, String
24
24
 
25
25
  # @!attribute tiers
26
- # @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 with an `ending_quantity` of 999999999 which is the default if not provided.
26
+ # @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 with an `ending_quantity` of 999999999 which is the default if not provided. See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
27
27
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
28
28
 
29
29
  # @!attribute unit_amount
@@ -31,7 +31,7 @@ module Recurly
31
31
  define_attribute :unit_amount, Float
32
32
 
33
33
  # @!attribute usage_percentage
34
- # @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.
34
+ # @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://developers.recurly.com/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons.
35
35
  define_attribute :usage_percentage, Float
36
36
  end
37
37
  end
@@ -7,7 +7,7 @@ module Recurly
7
7
  class SubscriptionChangeCreate < Request
8
8
 
9
9
  # @!attribute add_ons
10
- # @return [Array[SubscriptionAddOnUpdate]] If you provide a value for this field it will replace any existing add-ons. So, when adding or modifying an add-on, you need to include the existing subscription add-ons. Unchanged add-ons can be included just using the subscription add-on's ID: `{"id": "abc123"}`. If a subscription add-on's `code` is supplied without the `id`, `{"code": "def456"}`, the subscription add-on attributes will be set to the current values of the plan add-on unless provided in the request. - If an `id` is passed, any attributes not passed in will pull from the existing subscription add-on - If a `code` is passed, any attributes not passed in will pull from the current values of the plan add-on - Attributes passed in as part of the request will override either of the above scenarios
10
+ # @return [Array[SubscriptionAddOnUpdate]] If this value is omitted your existing add-ons will be removed. If you provide a value for this field it will replace any existing add-ons. So, when adding or modifying an add-on, you need to include the existing subscription add-ons. Unchanged add-ons can be included just using the subscription add-on's ID: `{"id": "abc123"}`. If a subscription add-on's `code` is supplied without the `id`, `{"code": "def456"}`, the subscription add-on attributes will be set to the current values of the plan add-on unless provided in the request. - If an `id` is passed, any attributes not passed in will pull from the existing subscription add-on - If a `code` is passed, any attributes not passed in will pull from the current values of the plan add-on - Attributes passed in as part of the request will override either of the above scenarios
11
11
  define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnUpdate }
12
12
 
13
13
  # @!attribute collection_method
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [Array[String]] A list of coupon_codes to be redeemed on the subscription during the change. Only allowed if timeframe is now and you change something about the subscription that creates an invoice.
19
19
  define_attribute :coupon_codes, Array, { :item_type => String }
20
20
 
21
+ # @!attribute custom_fields
22
+ # @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.
23
+ define_attribute :custom_fields, Array, { :item_type => :CustomField }
24
+
21
25
  # @!attribute net_terms
22
26
  # @return [Integer] Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
23
27
  define_attribute :net_terms, Integer
@@ -10,6 +10,10 @@ module Recurly
10
10
  # @return [Boolean] Whether the subscription renews at the end of its term.
11
11
  define_attribute :auto_renew, :Boolean
12
12
 
13
+ # @!attribute billing_info_id
14
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
15
+ define_attribute :billing_info_id, String
16
+
13
17
  # @!attribute collection_method
14
18
  # @return [String] Change collection method
15
19
  define_attribute :collection_method, String
@@ -14,6 +14,14 @@ module Recurly
14
14
  # @return [String] Whether the add-on type is fixed, or usage-based.
15
15
  define_attribute :add_on_type, String
16
16
 
17
+ # @!attribute avalara_service_type
18
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
19
+ define_attribute :avalara_service_type, Integer
20
+
21
+ # @!attribute avalara_transaction_type
22
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
23
+ define_attribute :avalara_transaction_type, Integer
24
+
17
25
  # @!attribute code
18
26
  # @return [String] The unique identifier for the add-on within its plan.
19
27
  define_attribute :code, String
@@ -46,6 +46,10 @@ module Recurly
46
46
  # @return [PaymentMethod]
47
47
  define_attribute :payment_method, :PaymentMethod
48
48
 
49
+ # @!attribute primary_payment_method
50
+ # @return [Boolean] The `primary_payment_method` indicator is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` indicator. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.
51
+ define_attribute :primary_payment_method, :Boolean
52
+
49
53
  # @!attribute updated_at
50
54
  # @return [DateTime] When the billing information was last changed.
51
55
  define_attribute :updated_at, DateTime
@@ -6,6 +6,10 @@ module Recurly
6
6
  module Resources
7
7
  class Coupon < Resource
8
8
 
9
+ # @!attribute applies_to_all_items
10
+ # @return [Boolean] The coupon is valid for all items if true. If false then `items` will list the applicable items.
11
+ define_attribute :applies_to_all_items, :Boolean
12
+
9
13
  # @!attribute applies_to_all_plans
10
14
  # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` and `plans_names` will list the applicable plans.
11
15
  define_attribute :applies_to_all_plans, :Boolean
@@ -14,6 +18,14 @@ module Recurly
14
18
  # @return [Boolean] The coupon is valid for one-time, non-plan charges if true.
15
19
  define_attribute :applies_to_non_plan_charges, :Boolean
16
20
 
21
+ # @!attribute bulk_coupon_code
22
+ # @return [String] The Coupon code of the parent Bulk Coupon
23
+ define_attribute :bulk_coupon_code, String
24
+
25
+ # @!attribute bulk_coupon_id
26
+ # @return [String] The Coupon ID of the parent Bulk Coupon
27
+ define_attribute :bulk_coupon_id, String
28
+
17
29
  # @!attribute code
18
30
  # @return [String] The code the customer enters to redeem the coupon.
19
31
  define_attribute :code, String
@@ -58,6 +70,10 @@ module Recurly
58
70
  # @return [String] Description of the coupon on the invoice.
59
71
  define_attribute :invoice_description, String
60
72
 
73
+ # @!attribute items
74
+ # @return [Array[ItemMini]] A list of items for which this coupon applies. This will be `null` if `applies_to_all_items=true`.
75
+ define_attribute :items, Array, { :item_type => :ItemMini }
76
+
61
77
  # @!attribute max_redemptions
62
78
  # @return [Integer] A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.
63
79
  define_attribute :max_redemptions, Integer
@@ -79,7 +95,7 @@ module Recurly
79
95
  define_attribute :plans, Array, { :item_type => :PlanMini }
80
96
 
81
97
  # @!attribute plans_names
82
- # @return [Array[String]] TODO
98
+ # @return [Array[String]] A list of plan names for which this coupon applies.
83
99
  define_attribute :plans_names, Array, { :item_type => String }
84
100
 
85
101
  # @!attribute redeem_by
@@ -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 Resources
7
+ class ExportDates < Resource
8
+
9
+ # @!attribute dates
10
+ # @return [Array[String]] An array of dates that have available exports.
11
+ define_attribute :dates, Array, { :item_type => String }
12
+
13
+ # @!attribute object
14
+ # @return [String] Object type
15
+ define_attribute :object, String
16
+ end
17
+ end
18
+ 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 ExportFile < Resource
8
+
9
+ # @!attribute href
10
+ # @return [String] A presigned link to download the export file.
11
+ define_attribute :href, String
12
+
13
+ # @!attribute md5sum
14
+ # @return [String] MD5 hash of the export file.
15
+ define_attribute :md5sum, String
16
+
17
+ # @!attribute name
18
+ # @return [String] Name of the export file.
19
+ define_attribute :name, String
20
+ end
21
+ end
22
+ end
@@ -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 Resources
7
+ class ExportFiles < Resource
8
+
9
+ # @!attribute files
10
+ # @return [Array[ExportFile]]
11
+ define_attribute :files, Array, { :item_type => :ExportFile }
12
+
13
+ # @!attribute object
14
+ # @return [String] Object type
15
+ define_attribute :object, String
16
+ end
17
+ end
18
+ end
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [Float] The outstanding balance remaining on this invoice.
19
19
  define_attribute :balance, Float
20
20
 
21
+ # @!attribute billing_info_id
22
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
23
+ define_attribute :billing_info_id, String
24
+
21
25
  # @!attribute closed_at
22
26
  # @return [DateTime] Date invoice was marked paid or failed.
23
27
  define_attribute :closed_at, DateTime
@@ -10,6 +10,14 @@ module Recurly
10
10
  # @return [String] Accounting code for invoice line items.
11
11
  define_attribute :accounting_code, String
12
12
 
13
+ # @!attribute avalara_service_type
14
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
15
+ define_attribute :avalara_service_type, Integer
16
+
17
+ # @!attribute avalara_transaction_type
18
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
19
+ define_attribute :avalara_transaction_type, Integer
20
+
13
21
  # @!attribute code
14
22
  # @return [String] Unique code to identify the item.
15
23
  define_attribute :code, String
@@ -26,6 +26,14 @@ module Recurly
26
26
  # @return [Float] `(quantity * unit_amount) - (discount + tax)`
27
27
  define_attribute :amount, Float
28
28
 
29
+ # @!attribute avalara_service_type
30
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
31
+ define_attribute :avalara_service_type, Integer
32
+
33
+ # @!attribute avalara_transaction_type
34
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
35
+ define_attribute :avalara_transaction_type, Integer
36
+
29
37
  # @!attribute created_at
30
38
  # @return [DateTime] When the line item was created.
31
39
  define_attribute :created_at, DateTime
@@ -18,6 +18,14 @@ module Recurly
18
18
  # @return [Boolean] Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.
19
19
  define_attribute :auto_renew, :Boolean
20
20
 
21
+ # @!attribute avalara_service_type
22
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
23
+ define_attribute :avalara_service_type, Integer
24
+
25
+ # @!attribute avalara_transaction_type
26
+ # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
27
+ define_attribute :avalara_transaction_type, Integer
28
+
21
29
  # @!attribute code
22
30
  # @return [String] Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
23
31
  define_attribute :code, String