recurly 3.0.0.beta.5 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +5 -5
  2. data/.bumpversion.cfg +12 -0
  3. data/.travis.yml +2 -2
  4. data/.yardopts +3 -0
  5. data/CONTRIBUTING.md +102 -0
  6. data/GETTING_STARTED.md +266 -0
  7. data/README.md +12 -194
  8. data/benchmark.rb +16 -0
  9. data/lib/recurly.rb +4 -7
  10. data/lib/recurly/client.rb +60 -60
  11. data/lib/recurly/client/operations.rb +498 -340
  12. data/lib/recurly/errors.rb +4 -0
  13. data/lib/recurly/http.rb +43 -0
  14. data/lib/recurly/pager.rb +4 -10
  15. data/lib/recurly/request.rb +6 -6
  16. data/lib/recurly/requests.rb +8 -0
  17. data/lib/recurly/requests/account_acquisition_updatable.rb +2 -2
  18. data/lib/recurly/requests/billing_info_create.rb +4 -0
  19. data/lib/recurly/requests/custom_field.rb +18 -0
  20. data/lib/recurly/requests/invoice_create.rb +0 -4
  21. data/lib/recurly/requests/invoice_refund.rb +2 -2
  22. data/lib/recurly/requests/line_item_create.rb +4 -0
  23. data/lib/recurly/requests/purchase_create.rb +3 -7
  24. data/lib/recurly/requests/shipping_fee_create.rb +22 -0
  25. data/lib/recurly/requests/shipping_purchase.rb +22 -0
  26. data/lib/recurly/requests/subscription_add_on_create.rb +2 -6
  27. data/lib/recurly/requests/subscription_add_on_update.rb +26 -0
  28. data/lib/recurly/requests/subscription_change_create.rb +7 -3
  29. data/lib/recurly/requests/subscription_change_shipping_create.rb +22 -0
  30. data/lib/recurly/requests/subscription_create.rb +4 -8
  31. data/lib/recurly/requests/subscription_shipping_create.rb +30 -0
  32. data/lib/recurly/requests/subscription_shipping_update.rb +22 -0
  33. data/lib/recurly/requests/subscription_update.rb +3 -7
  34. data/lib/recurly/resource.rb +14 -1
  35. data/lib/recurly/resources.rb +17 -0
  36. data/lib/recurly/resources/account_acquisition.rb +2 -2
  37. data/lib/recurly/resources/add_on.rb +1 -1
  38. data/lib/recurly/resources/billing_info.rb +6 -6
  39. data/lib/recurly/resources/coupon.rb +1 -1
  40. data/lib/recurly/resources/coupon_discount.rb +2 -2
  41. data/lib/recurly/resources/coupon_redemption.rb +2 -2
  42. data/lib/recurly/resources/coupon_redemption_mini.rb +2 -2
  43. data/lib/recurly/resources/error_may_have_transaction.rb +2 -2
  44. data/lib/recurly/resources/invoice.rb +4 -0
  45. data/lib/recurly/resources/line_item.rb +1 -1
  46. data/lib/recurly/resources/{billing_info_payment_method.rb → payment_method.rb} +18 -2
  47. data/lib/recurly/resources/plan.rb +1 -1
  48. data/lib/recurly/resources/shipping_method.rb +42 -0
  49. data/lib/recurly/resources/shipping_method_mini.rb +26 -0
  50. data/lib/recurly/resources/subscription.rb +3 -3
  51. data/lib/recurly/resources/subscription_change.rb +4 -0
  52. data/lib/recurly/resources/subscription_shipping.rb +26 -0
  53. data/lib/recurly/resources/transaction.rb +4 -4
  54. data/lib/recurly/resources/transaction_error.rb +30 -0
  55. data/lib/recurly/schema.rb +85 -49
  56. data/lib/recurly/schema/json_parser.rb +16 -8
  57. data/lib/recurly/schema/request_caster.rb +10 -16
  58. data/lib/recurly/schema/resource_caster.rb +48 -0
  59. data/lib/recurly/schema/schema_factory.rb +0 -2
  60. data/lib/recurly/schema/schema_validator.rb +11 -14
  61. data/lib/recurly/version.rb +1 -1
  62. data/recurly.gemspec +6 -6
  63. data/scripts/build +1 -0
  64. data/scripts/bump +4 -0
  65. data/scripts/format +2 -0
  66. data/scripts/release +11 -0
  67. data/scripts/test +1 -0
  68. metadata +38 -20
  69. data/.ruby-version +0 -1
  70. data/lib/recurly/resources/transaction_payment_method.rb +0 -34
  71. data/lib/recurly/schema/json_deserializer.rb +0 -56
@@ -26,6 +26,10 @@ module Recurly
26
26
  def status_code
27
27
  @response.status
28
28
  end
29
+
30
+ def get_response
31
+ @response
32
+ end
29
33
  end
30
34
  end
31
35
 
@@ -0,0 +1,43 @@
1
+ module Recurly
2
+ module HTTP
3
+ class Response
4
+ attr_accessor :status, :body, :request,
5
+ :request_id, :rate_limit, :rate_limit_remaining,
6
+ :rate_limit_reset, :date, :proxy_metadata
7
+
8
+ def initialize(resp, request)
9
+ @request = request
10
+ @status = resp.status
11
+ @request_id = resp.headers["x-request-id"]
12
+ @rate_limit = resp.headers["x-ratelimit-limit"].to_i
13
+ @rate_limit_remaining = resp.headers["x-ratelimit-remaining"].to_i
14
+ @rate_limit_reset = Time.at(resp.headers["x-ratelimit-reset"].to_i).to_datetime
15
+ if resp.body && !resp.body.empty?
16
+ @body = resp.body
17
+ else
18
+ @body = nil
19
+ end
20
+ end
21
+ end
22
+
23
+ class Request
24
+ attr_accessor :method, :path, :body
25
+
26
+ def initialize(method, path, body = nil)
27
+ @method = method
28
+ @path = path
29
+ if body && !body.empty?
30
+ @body = body
31
+ else
32
+ @body = nil
33
+ end
34
+ end
35
+
36
+ def ==(other)
37
+ method == other.method \
38
+ && path == other.path \
39
+ && body == other.body
40
+ end
41
+ end
42
+ end
43
+ end
@@ -71,14 +71,6 @@ module Recurly
71
71
 
72
72
  private
73
73
 
74
- def from_json(data)
75
- @data = data["data"].map do |resource_data|
76
- JSONParser.from_json(resource_data)
77
- end
78
- @next = data["next"]
79
- @has_more = data["has_more"]
80
- end
81
-
82
74
  def item_enumerator
83
75
  Enumerator.new do |yielder|
84
76
  page_enumerator.each do |data|
@@ -103,8 +95,10 @@ module Recurly
103
95
  end
104
96
 
105
97
  def fetch_next!
106
- response = @client.next_page(self)
107
- from_json(JSON.parse(response.body))
98
+ page = @client.next_page(self)
99
+ @data = page.data.map { |d| JSONParser.from_json(d) }
100
+ @has_more = page.has_more
101
+ @next = page.next
108
102
  end
109
103
 
110
104
  def rewind!
@@ -5,7 +5,7 @@ module Recurly
5
5
  class Request
6
6
  extend Schema::SchemaFactory
7
7
  extend Schema::RequestCaster
8
- extend Schema::JsonDeserializer
8
+ extend Schema::ResourceCaster
9
9
  include Schema::SchemaValidator
10
10
 
11
11
  attr_reader :attributes
@@ -14,14 +14,14 @@ module Recurly
14
14
  self.attributes == other_resource.attributes
15
15
  end
16
16
 
17
+ def to_s
18
+ self.inspect
19
+ end
20
+
17
21
  protected
18
22
 
19
23
  def initialize(attributes = {})
20
- @attributes = self.class.cast(attributes.clone)
21
- end
22
-
23
- def to_s
24
- self.inspect
24
+ @attributes = self.class.cast_request(attributes)
25
25
  end
26
26
 
27
27
  def schema
@@ -0,0 +1,8 @@
1
+ # Include all request files
2
+ resources = File.join(File.dirname(__FILE__), "requests", "*.rb")
3
+ Dir.glob(resources, &method(:require))
4
+
5
+ module Recurly
6
+ module Requests
7
+ end
8
+ end
@@ -15,8 +15,8 @@ module Recurly
15
15
  define_attribute :channel, String
16
16
 
17
17
  # @!attribute cost
18
- # @return [Hash] Account balance
19
- define_attribute :cost, Hash
18
+ # @return [AccountAcquisitionCost]
19
+ define_attribute :cost, :AccountAcquisitionCost
20
20
 
21
21
  # @!attribute subchannel
22
22
  # @return [String] An arbitrary subchannel string representing a distinction/subcategory within a broader channel.
@@ -26,6 +26,10 @@ module Recurly
26
26
  # @return [String] First name
27
27
  define_attribute :first_name, String
28
28
 
29
+ # @!attribute fraud_session_id
30
+ # @return [String] Fraud Session ID
31
+ define_attribute :fraud_session_id, String
32
+
29
33
  # @!attribute ip_address
30
34
  # @return [String] *STRONGLY RECOMMENDED* Customer's IP address when updating their billing information.
31
35
  define_attribute :ip_address, String
@@ -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 CustomField < Request
8
+
9
+ # @!attribute name
10
+ # @return [String] Fields must be created in the UI before values can be assigned to them.
11
+ define_attribute :name, String
12
+
13
+ # @!attribute value
14
+ # @return [String] Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
15
+ define_attribute :value, String
16
+ end
17
+ end
18
+ end
@@ -34,10 +34,6 @@ module Recurly
34
34
  # @return [String] This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions.
35
35
  define_attribute :terms_and_conditions, String
36
36
 
37
- # @!attribute type
38
- # @return [String] Specify a type to limit the type of line items that will be invoiced.
39
- define_attribute :type, String
40
-
41
37
  # @!attribute vat_reverse_charge_notes
42
38
  # @return [String] VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription.
43
39
  define_attribute :vat_reverse_charge_notes, String
@@ -15,8 +15,8 @@ module Recurly
15
15
  define_attribute :credit_customer_notes, String
16
16
 
17
17
  # @!attribute external_refund
18
- # @return [Hash] Indicates that the refund was settled outside of Recurly, and a manual transaction should be created to track it in Recurly. Required when: - refunding a manually collected charge invoice, and `refund_method` is not `all_credit` - refunding a credit invoice that refunded manually collecting invoices - refunding a credit invoice for a partial amount This field can only be included when the Credit Invoices feature is enabled.
19
- define_attribute :external_refund, Hash
18
+ # @return [ExternalRefund] Indicates that the refund was settled outside of Recurly, and a manual transaction should be created to track it in Recurly. Required when: - refunding a manually collected charge invoice, and `refund_method` is not `all_credit` - refunding a credit invoice that refunded manually collecting invoices - refunding a credit invoice for a partial amount This field can only be included when the Credit Invoices feature is enabled.
19
+ define_attribute :external_refund, :ExternalRefund
20
20
 
21
21
  # @!attribute line_items
22
22
  # @return [Array[LineItemRefund]] The line items to be refunded. This is required when `type=line_items`.
@@ -22,6 +22,10 @@ module Recurly
22
22
  # @return [DateTime] If this date is provided, it indicates the end of a time range.
23
23
  define_attribute :end_date, DateTime
24
24
 
25
+ # @!attribute product_code
26
+ # @return [String] Optional field to track a product code or SKU for the line item. This can be used to later reporting on product purchases. For Vertex tax calculations, this field will be used as the Vertex `product` field.
27
+ define_attribute :product_code, String
28
+
25
29
  # @!attribute quantity
26
30
  # @return [Integer] This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
27
31
  define_attribute :quantity, Integer
@@ -50,13 +50,9 @@ module Recurly
50
50
  # @return [String] For manual invoicing, this identifies the PO number associated with the subscription.
51
51
  define_attribute :po_number, String
52
52
 
53
- # @!attribute shipping_address
54
- # @return [ShippingAddressCreate]
55
- define_attribute :shipping_address, :ShippingAddressCreate
56
-
57
- # @!attribute shipping_address_id
58
- # @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.
59
- define_attribute :shipping_address_id, String
53
+ # @!attribute shipping
54
+ # @return [ShippingPurchase]
55
+ define_attribute :shipping, :ShippingPurchase
60
56
 
61
57
  # @!attribute subscriptions
62
58
  # @return [Array[SubscriptionPurchase]] A list of subscriptions to be created with the purchase.
@@ -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 ShippingFeeCreate < Request
8
+
9
+ # @!attribute amount
10
+ # @return [Float] This is priced in the purchase's currency.
11
+ define_attribute :amount, Float
12
+
13
+ # @!attribute method_code
14
+ # @return [String] The code of the shipping method used to deliver the purchase. If `method_id` and `method_code` are both present, `method_id` will be used.
15
+ define_attribute :method_code, String
16
+
17
+ # @!attribute method_id
18
+ # @return [String] The id of the shipping method used to deliver the purchase. If `method_id` and `method_code` are both present, `method_id` will be used.
19
+ define_attribute :method_id, String
20
+ end
21
+ end
22
+ 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 Requests
7
+ class ShippingPurchase < Request
8
+
9
+ # @!attribute address
10
+ # @return [ShippingAddressCreate]
11
+ define_attribute :address, :ShippingAddressCreate
12
+
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.
15
+ define_attribute :address_id, String
16
+
17
+ # @!attribute fees
18
+ # @return [Array[ShippingFeeCreate]] A list of shipping fees to be created as charges with the purchase.
19
+ define_attribute :fees, Array, { :item_type => :ShippingFeeCreate }
20
+ end
21
+ end
22
+ end
@@ -10,16 +10,12 @@ module Recurly
10
10
  # @return [String] Add-on code
11
11
  define_attribute :code, String
12
12
 
13
- # @!attribute id
14
- # @return [String] Setting this field allows you to reference an existing add-on.
15
- define_attribute :id, String
16
-
17
13
  # @!attribute quantity
18
- # @return [Integer] Optionally override the default quantity.
14
+ # @return [Integer] Quantity
19
15
  define_attribute :quantity, Integer
20
16
 
21
17
  # @!attribute unit_amount
22
- # @return [Float] Override the default unit amount of the add-on by setting this value.
18
+ # @return [Float] Optionally, override the add-on's default unit amount.
23
19
  define_attribute :unit_amount, Float
24
20
  end
25
21
  end
@@ -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 Requests
7
+ class SubscriptionAddOnUpdate < Request
8
+
9
+ # @!attribute code
10
+ # @return [String] Add-on code
11
+ define_attribute :code, String
12
+
13
+ # @!attribute id
14
+ # @return [String] Set this to include or modify an existing subscription add-on.
15
+ define_attribute :id, String
16
+
17
+ # @!attribute quantity
18
+ # @return [Integer] Quantity
19
+ define_attribute :quantity, Integer
20
+
21
+ # @!attribute unit_amount
22
+ # @return [Float] Optionally, override the add-on's default unit amount.
23
+ define_attribute :unit_amount, Float
24
+ end
25
+ end
26
+ end
@@ -7,8 +7,8 @@ module Recurly
7
7
  class SubscriptionChangeCreate < Request
8
8
 
9
9
  # @!attribute add_ons
10
- # @return [Array[SubscriptionAddOnCreate]] If you set this value you include all the add-ons and their quantities and amounts. The values you include will replace the previous values entirely.
11
- define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnCreate }
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"}`.
11
+ define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnUpdate }
12
12
 
13
13
  # @!attribute collection_method
14
14
  # @return [String] Collection method
@@ -38,8 +38,12 @@ module Recurly
38
38
  # @return [Integer] Optionally override the default quantity of 1.
39
39
  define_attribute :quantity, Integer
40
40
 
41
+ # @!attribute shipping
42
+ # @return [SubscriptionChangeShippingCreate]
43
+ define_attribute :shipping, :SubscriptionChangeShippingCreate
44
+
41
45
  # @!attribute timeframe
42
- # @return [String] The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now or when the subscription renews. Generally, if you're performing an upgrade, you will want the change to occur immediately (now). If you're performing a downgrade, you should set the timeframe to "renewal" so the change takes affect at the end of the current billing cycle.
46
+ # @return [String] The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now, when the subscription is next billed, or when the subscription renews. Generally, if you're performing an upgrade, you will want the change to occur immediately (now). If you're performing a downgrade, you should set the timeframe to "renewal" so the change takes affect at the end of the current subscription term.
43
47
  define_attribute :timeframe, String
44
48
 
45
49
  # @!attribute unit_amount
@@ -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 SubscriptionChangeShippingCreate < Request
8
+
9
+ # @!attribute amount
10
+ # @return [Float] Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required.
11
+ define_attribute :amount, Float
12
+
13
+ # @!attribute method_code
14
+ # @return [String] The code of the shipping method used to deliver the subscription. To remove shipping set this to `null` and the `amount=0`. If `method_id` and `method_code` are both present, `method_id` will be used.
15
+ define_attribute :method_code, String
16
+
17
+ # @!attribute method_id
18
+ # @return [String] The id of the shipping method used to deliver the subscription. To remove shipping set this to `null` and the `amount=0`. If `method_id` and `method_code` are both present, `method_id` will be used.
19
+ define_attribute :method_id, String
20
+ end
21
+ end
22
+ end
@@ -70,13 +70,9 @@ module Recurly
70
70
  # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
71
71
  define_attribute :renewal_billing_cycles, Integer
72
72
 
73
- # @!attribute shipping_address
74
- # @return [ShippingAddressCreate] Create a shipping address on the account and assign it to the subscription.
75
- define_attribute :shipping_address, :ShippingAddressCreate
76
-
77
- # @!attribute shipping_address_id
78
- # @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.
79
- define_attribute :shipping_address_id, String
73
+ # @!attribute shipping
74
+ # @return [SubscriptionShippingCreate] Create a shipping address on the account and assign it to the subscription.
75
+ define_attribute :shipping, :SubscriptionShippingCreate
80
76
 
81
77
  # @!attribute starts_at
82
78
  # @return [DateTime] If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial.
@@ -95,7 +91,7 @@ module Recurly
95
91
  define_attribute :trial_ends_at, DateTime
96
92
 
97
93
  # @!attribute unit_amount
98
- # @return [Float] Override the unit amount of the subscription plan by setting this value in cents. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.
94
+ # @return [Float] Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.
99
95
  define_attribute :unit_amount, Float
100
96
  end
101
97
  end
@@ -0,0 +1,30 @@
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 SubscriptionShippingCreate < Request
8
+
9
+ # @!attribute address
10
+ # @return [ShippingAddressCreate]
11
+ define_attribute :address, :ShippingAddressCreate
12
+
13
+ # @!attribute address_id
14
+ # @return [String] Assign a shipping address from the account's existing shipping addresses. If `address_id` and `address` are both present, `address` will be used.
15
+ define_attribute :address_id, String
16
+
17
+ # @!attribute amount
18
+ # @return [Float] Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required.
19
+ define_attribute :amount, Float
20
+
21
+ # @!attribute method_code
22
+ # @return [String] The code of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used.
23
+ define_attribute :method_code, String
24
+
25
+ # @!attribute method_id
26
+ # @return [String] The id of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used.
27
+ define_attribute :method_id, String
28
+ end
29
+ end
30
+ 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 Requests
7
+ class SubscriptionShippingUpdate < Request
8
+
9
+ # @!attribute address
10
+ # @return [ShippingAddressCreate]
11
+ define_attribute :address, :ShippingAddressCreate
12
+
13
+ # @!attribute address_id
14
+ # @return [String] Assign a shipping address from the account's existing shipping addresses.
15
+ define_attribute :address_id, String
16
+
17
+ # @!attribute object
18
+ # @return [String] Object type
19
+ define_attribute :object, String
20
+ end
21
+ end
22
+ end
@@ -42,13 +42,9 @@ module Recurly
42
42
  # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
43
43
  define_attribute :renewal_billing_cycles, Integer
44
44
 
45
- # @!attribute shipping_address
46
- # @return [ShippingAddressCreate] Create a shipping address on the account and assign it to the subscription. If this and `shipping_address_id` are both present, `shipping_address_id` will take precedence.
47
- define_attribute :shipping_address, :ShippingAddressCreate
48
-
49
- # @!attribute shipping_address_id
50
- # @return [String] Assign a shipping address from the account's existing shipping addresses.
51
- define_attribute :shipping_address_id, String
45
+ # @!attribute shipping
46
+ # @return [SubscriptionShippingUpdate]
47
+ define_attribute :shipping, :SubscriptionShippingUpdate
52
48
 
53
49
  # @!attribute terms_and_conditions
54
50
  # @return [String] Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.