recurly 3.19.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.github/workflows/docs.yml +1 -1
  4. data/.github_changelog_generator +8 -0
  5. data/.travis.yml +0 -3
  6. data/CHANGELOG.md +202 -268
  7. data/CONTRIBUTING.md +0 -4
  8. data/GETTING_STARTED.md +20 -17
  9. data/README.md +0 -3
  10. data/lib/recurly/client/operations.rb +774 -630
  11. data/lib/recurly/client.rb +44 -28
  12. data/lib/recurly/errors/api_errors.rb +3 -2
  13. data/lib/recurly/errors.rb +5 -23
  14. data/lib/recurly/pager.rb +5 -15
  15. data/lib/recurly/requests/{account_acquisition_updatable.rb → account_acquisition_update.rb} +1 -1
  16. data/lib/recurly/requests/account_create.rb +2 -6
  17. data/lib/recurly/requests/account_purchase.rb +2 -6
  18. data/lib/recurly/requests/account_update.rb +0 -4
  19. data/lib/recurly/requests/add_on_create.rb +2 -2
  20. data/lib/recurly/requests/add_on_pricing.rb +5 -5
  21. data/lib/recurly/requests/add_on_update.rb +2 -2
  22. data/lib/recurly/requests/address.rb +1 -9
  23. data/lib/recurly/requests/billing_info_create.rb +2 -30
  24. data/lib/recurly/requests/coupon_create.rb +1 -1
  25. data/lib/recurly/requests/external_transaction.rb +1 -1
  26. data/lib/recurly/requests/invoice_address.rb +1 -1
  27. data/lib/recurly/requests/invoice_collect.rb +1 -1
  28. data/lib/recurly/requests/{invoice_updatable.rb → invoice_update.rb} +1 -1
  29. data/lib/recurly/requests/line_item_create.rb +2 -6
  30. data/lib/recurly/requests/plan_create.rb +0 -4
  31. data/lib/recurly/requests/plan_pricing.rb +0 -4
  32. data/lib/recurly/requests/plan_update.rb +0 -4
  33. data/lib/recurly/requests/pricing.rb +0 -4
  34. data/lib/recurly/requests/purchase_create.rb +1 -1
  35. data/lib/recurly/requests/shipping_address_create.rb +1 -1
  36. data/lib/recurly/requests/shipping_address_update.rb +1 -1
  37. data/lib/recurly/requests/subscription_add_on_create.rb +6 -2
  38. data/lib/recurly/requests/subscription_add_on_tier.rb +5 -1
  39. data/lib/recurly/requests/subscription_add_on_update.rb +6 -2
  40. data/lib/recurly/requests/subscription_change_create.rb +1 -9
  41. data/lib/recurly/requests/subscription_create.rb +5 -9
  42. data/lib/recurly/requests/subscription_pause.rb +1 -1
  43. data/lib/recurly/requests/subscription_purchase.rb +2 -6
  44. data/lib/recurly/requests/subscription_update.rb +1 -5
  45. data/lib/recurly/requests/tier.rb +2 -2
  46. data/lib/recurly/requests/tier_pricing.rb +22 -0
  47. data/lib/recurly/resources/account.rb +0 -4
  48. data/lib/recurly/resources/account_mini.rb +0 -4
  49. data/lib/recurly/resources/add_on.rb +1 -1
  50. data/lib/recurly/resources/add_on_pricing.rb +5 -5
  51. data/lib/recurly/resources/address.rb +1 -9
  52. data/lib/recurly/resources/address_with_name.rb +46 -0
  53. data/lib/recurly/resources/billing_info.rb +1 -5
  54. data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
  55. data/lib/recurly/resources/coupon.rb +5 -17
  56. data/lib/recurly/resources/invoice.rb +7 -7
  57. data/lib/recurly/resources/invoice_address.rb +1 -1
  58. data/lib/recurly/resources/line_item.rb +7 -7
  59. data/lib/recurly/resources/payment_method.rb +0 -4
  60. data/lib/recurly/resources/plan.rb +1 -5
  61. data/lib/recurly/resources/plan_pricing.rb +0 -4
  62. data/lib/recurly/resources/pricing.rb +0 -4
  63. data/lib/recurly/resources/shipping_address.rb +1 -1
  64. data/lib/recurly/resources/subscription.rb +0 -4
  65. data/lib/recurly/resources/subscription_add_on.rb +6 -2
  66. data/lib/recurly/resources/subscription_add_on_tier.rb +5 -1
  67. data/lib/recurly/resources/subscription_change.rb +0 -12
  68. data/lib/recurly/resources/tax_info.rb +0 -4
  69. data/lib/recurly/resources/tier.rb +2 -2
  70. data/lib/recurly/resources/tier_pricing.rb +22 -0
  71. data/lib/recurly/resources/transaction.rb +3 -7
  72. data/lib/recurly/resources/unique_coupon_code_params.rb +26 -0
  73. data/lib/recurly/resources/usage.rb +5 -1
  74. data/lib/recurly/version.rb +1 -1
  75. data/openapi/api.yaml +1949 -2573
  76. data/scripts/build +2 -2
  77. data/scripts/bump +11 -0
  78. data/scripts/changelog +14 -0
  79. data/scripts/format +2 -2
  80. data/scripts/prepare-release +29 -43
  81. data/scripts/release +20 -5
  82. metadata +15 -22
  83. data/.changelog_config.yaml +0 -11
  84. data/CODE_OF_CONDUCT.md +0 -130
  85. data/lib/recurly/errors/network_errors.rb +0 -10
  86. data/lib/recurly/requests/billing_info_verify.rb +0 -14
  87. data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +0 -18
  88. data/lib/recurly/requests/subscription_change_billing_info_create.rb +0 -14
  89. data/lib/recurly/resources/dunning_campaign.rb +0 -50
  90. data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +0 -18
  91. data/lib/recurly/resources/dunning_cycle.rb +0 -58
  92. data/lib/recurly/resources/dunning_interval.rb +0 -18
  93. data/lib/recurly/resources/line_item_list.rb +0 -26
  94. data/lib/recurly/resources/subscription_change_billing_info.rb +0 -14
  95. data/lib/recurly/resources/subscription_change_preview.rb +0 -86
  96. data/lib/recurly/resources/tax_detail.rb +0 -26
@@ -43,7 +43,7 @@ module Recurly
43
43
  define_attribute :subscription_id, String
44
44
 
45
45
  # @!attribute tier_type
46
- # @return [String] The type of tiering used by the Add-on.
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://developers.recurly.com/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
@@ -51,9 +51,13 @@ module Recurly
51
51
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
52
52
 
53
53
  # @!attribute unit_amount
54
- # @return [Float] This is priced in the subscription's currency.
54
+ # @return [Float] Supports up to 2 decimal places.
55
55
  define_attribute :unit_amount, Float
56
56
 
57
+ # @!attribute unit_amount_decimal
58
+ # @return [String] Supports up to 9 decimal places.
59
+ define_attribute :unit_amount_decimal, String
60
+
57
61
  # @!attribute updated_at
58
62
  # @return [DateTime] Updated at
59
63
  define_attribute :updated_at, DateTime
@@ -11,8 +11,12 @@ module Recurly
11
11
  define_attribute :ending_quantity, Integer
12
12
 
13
13
  # @!attribute unit_amount
14
- # @return [Float] Unit amount
14
+ # @return [Float] Allows up to 2 decimal places. Optionally, override the tiers' default unit amount.
15
15
  define_attribute :unit_amount, Float
16
+
17
+ # @!attribute unit_amount_decimal
18
+ # @return [String] Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
19
+ define_attribute :unit_amount_decimal, String
16
20
  end
17
21
  end
18
22
  end
@@ -18,10 +18,6 @@ module Recurly
18
18
  # @return [Array[SubscriptionAddOn]] These add-ons will be used when the subscription renews.
19
19
  define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
20
20
 
21
- # @!attribute billing_info
22
- # @return [SubscriptionChangeBillingInfo] Accept nested attributes for three_d_secure_action_result_token_id
23
- define_attribute :billing_info, :SubscriptionChangeBillingInfo
24
-
25
21
  # @!attribute created_at
26
22
  # @return [DateTime] Created at
27
23
  define_attribute :created_at, DateTime
@@ -58,10 +54,6 @@ module Recurly
58
54
  # @return [String] Revenue schedule type
59
55
  define_attribute :revenue_schedule_type, String
60
56
 
61
- # @!attribute setup_fee_revenue_schedule_type
62
- # @return [String] Setup fee revenue schedule type
63
- define_attribute :setup_fee_revenue_schedule_type, String
64
-
65
57
  # @!attribute shipping
66
58
  # @return [SubscriptionShipping] Subscription shipping details
67
59
  define_attribute :shipping, :SubscriptionShipping
@@ -70,10 +62,6 @@ module Recurly
70
62
  # @return [String] The ID of the subscription that is going to be changed.
71
63
  define_attribute :subscription_id, String
72
64
 
73
- # @!attribute tax_inclusive
74
- # @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
75
- define_attribute :tax_inclusive, :Boolean
76
-
77
65
  # @!attribute unit_amount
78
66
  # @return [Float] Unit amount
79
67
  define_attribute :unit_amount, Float
@@ -14,10 +14,6 @@ module Recurly
14
14
  # @return [String] Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST.
15
15
  define_attribute :region, String
16
16
 
17
- # @!attribute tax_details
18
- # @return [Array[TaxDetail]] Provides additional tax details for Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItem.
19
- define_attribute :tax_details, Array, { :item_type => :TaxDetail }
20
-
21
17
  # @!attribute type
22
18
  # @return [String] Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries.
23
19
  define_attribute :type, String
@@ -7,8 +7,8 @@ module Recurly
7
7
  class Tier < Resource
8
8
 
9
9
  # @!attribute currencies
10
- # @return [Array[Pricing]] Tier pricing
11
- define_attribute :currencies, Array, { :item_type => :Pricing }
10
+ # @return [Array[TierPricing]] Tier pricing
11
+ define_attribute :currencies, Array, { :item_type => :TierPricing }
12
12
 
13
13
  # @!attribute ending_quantity
14
14
  # @return [Integer] Ending quantity
@@ -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 TierPricing < Resource
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] Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
15
+ define_attribute :unit_amount, Float
16
+
17
+ # @!attribute unit_amount_decimal
18
+ # @return [String] Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
19
+ define_attribute :unit_amount_decimal, String
20
+ end
21
+ end
22
+ end
@@ -18,13 +18,9 @@ module Recurly
18
18
  # @return [String] When processed, result from checking the overall AVS on the transaction.
19
19
  define_attribute :avs_check, String
20
20
 
21
- # @!attribute backup_payment_method_used
22
- # @return [Boolean] Indicates if the transaction was completed using a backup payment
23
- define_attribute :backup_payment_method_used, :Boolean
24
-
25
21
  # @!attribute billing_address
26
- # @return [Address]
27
- define_attribute :billing_address, :Address
22
+ # @return [AddressWithName]
23
+ define_attribute :billing_address, :AddressWithName
28
24
 
29
25
  # @!attribute collected_at
30
26
  # @return [DateTime] Collected at, or if not collected yet, the time the transaction was created.
@@ -87,7 +83,7 @@ module Recurly
87
83
  define_attribute :invoice, :InvoiceMini
88
84
 
89
85
  # @!attribute ip_address_country
90
- # @return [String] Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly.
86
+ # @return [String] IP address's country
91
87
  define_attribute :ip_address_country, String
92
88
 
93
89
  # @!attribute ip_address_v4
@@ -0,0 +1,26 @@
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 UniqueCouponCodeParams < Resource
8
+
9
+ # @!attribute begin_time
10
+ # @return [DateTime] The date-time to be included when listing UniqueCouponCodes
11
+ define_attribute :begin_time, DateTime
12
+
13
+ # @!attribute limit
14
+ # @return [Integer] The number of UniqueCouponCodes that will be generated
15
+ define_attribute :limit, Integer
16
+
17
+ # @!attribute order
18
+ # @return [String] Sort order to list newly generated UniqueCouponCodes (should always be `asc`)
19
+ define_attribute :order, String
20
+
21
+ # @!attribute sort
22
+ # @return [String] Sort field to list newly generated UniqueCouponCodes (should always be `created_at`)
23
+ define_attribute :sort, String
24
+ end
25
+ end
26
+ end
@@ -39,7 +39,7 @@ module Recurly
39
39
  define_attribute :recording_timestamp, DateTime
40
40
 
41
41
  # @!attribute tier_type
42
- # @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based).
42
+ # @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.
43
43
  define_attribute :tier_type, String
44
44
 
45
45
  # @!attribute tiers
@@ -50,6 +50,10 @@ module Recurly
50
50
  # @return [Float] Unit price
51
51
  define_attribute :unit_amount, Float
52
52
 
53
+ # @!attribute unit_amount_decimal
54
+ # @return [String] Unit price that can optionally support a sub-cent value.
55
+ define_attribute :unit_amount_decimal, String
56
+
53
57
  # @!attribute updated_at
54
58
  # @return [DateTime] When the usage record was billed on an invoice.
55
59
  define_attribute :updated_at, DateTime
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "3.19.0"
2
+ VERSION = "4.0.0"
3
3
  end