maxio-advanced-billing-sdk 4.0.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -45
  3. data/lib/advanced_billing/configuration.rb +2 -2
  4. data/lib/advanced_billing/controllers/advance_invoice_controller.rb +24 -24
  5. data/lib/advanced_billing/controllers/api_exports_controller.rb +57 -57
  6. data/lib/advanced_billing/controllers/base_controller.rb +10 -10
  7. data/lib/advanced_billing/controllers/billing_portal_controller.rb +33 -32
  8. data/lib/advanced_billing/controllers/component_price_points_controller.rb +60 -60
  9. data/lib/advanced_billing/controllers/components_controller.rb +110 -107
  10. data/lib/advanced_billing/controllers/coupons_controller.rb +89 -89
  11. data/lib/advanced_billing/controllers/custom_fields_controller.rb +76 -76
  12. data/lib/advanced_billing/controllers/customers_controller.rb +45 -41
  13. data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +53 -53
  14. data/lib/advanced_billing/controllers/events_controller.rb +16 -15
  15. data/lib/advanced_billing/controllers/insights_controller.rb +17 -17
  16. data/lib/advanced_billing/controllers/invoices_controller.rb +99 -99
  17. data/lib/advanced_billing/controllers/offers_controller.rb +18 -15
  18. data/lib/advanced_billing/controllers/payment_profiles_controller.rb +107 -104
  19. data/lib/advanced_billing/controllers/product_families_controller.rb +26 -26
  20. data/lib/advanced_billing/controllers/product_price_points_controller.rb +62 -62
  21. data/lib/advanced_billing/controllers/products_controller.rb +37 -37
  22. data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +61 -61
  23. data/lib/advanced_billing/controllers/reason_codes_controller.rb +35 -35
  24. data/lib/advanced_billing/controllers/referral_codes_controller.rb +9 -8
  25. data/lib/advanced_billing/controllers/sales_commissions_controller.rb +13 -13
  26. data/lib/advanced_billing/controllers/sites_controller.rb +11 -10
  27. data/lib/advanced_billing/controllers/subscription_components_controller.rb +170 -161
  28. data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +23 -23
  29. data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +21 -21
  30. data/lib/advanced_billing/controllers/subscription_groups_controller.rb +54 -54
  31. data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +37 -37
  32. data/lib/advanced_billing/controllers/subscription_notes_controller.rb +20 -16
  33. data/lib/advanced_billing/controllers/subscription_products_controller.rb +20 -18
  34. data/lib/advanced_billing/controllers/subscription_status_controller.rb +74 -74
  35. data/lib/advanced_billing/controllers/subscriptions_controller.rb +163 -160
  36. data/lib/advanced_billing/controllers/webhooks_controller.rb +45 -44
  37. data/lib/advanced_billing/exceptions/component_allocation_error_exception.rb +15 -15
  38. data/lib/advanced_billing/exceptions/component_price_point_error_exception.rb +15 -15
  39. data/lib/advanced_billing/exceptions/customer_error_response_exception.rb +15 -15
  40. data/lib/advanced_billing/exceptions/error_array_map_response_exception.rb +15 -15
  41. data/lib/advanced_billing/exceptions/error_list_response_exception.rb +15 -15
  42. data/lib/advanced_billing/exceptions/error_string_map_response_exception.rb +15 -15
  43. data/lib/advanced_billing/exceptions/event_based_billing_list_segments_errors_exception.rb +15 -15
  44. data/lib/advanced_billing/exceptions/event_based_billing_segment_errors_exception.rb +15 -15
  45. data/lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb +15 -15
  46. data/lib/advanced_billing/exceptions/product_price_point_error_response_exception.rb +15 -15
  47. data/lib/advanced_billing/exceptions/proforma_bad_request_error_response_exception.rb +15 -15
  48. data/lib/advanced_billing/exceptions/refund_prepayment_base_errors_response_exception.rb +15 -15
  49. data/lib/advanced_billing/exceptions/single_error_response_exception.rb +15 -15
  50. data/lib/advanced_billing/exceptions/single_string_error_response_exception.rb +15 -15
  51. data/lib/advanced_billing/exceptions/subscription_add_coupon_error_exception.rb +15 -15
  52. data/lib/advanced_billing/exceptions/subscription_component_allocation_error_exception.rb +15 -15
  53. data/lib/advanced_billing/exceptions/subscription_group_create_error_response_exception.rb +15 -15
  54. data/lib/advanced_billing/exceptions/subscription_group_signup_error_response_exception.rb +15 -15
  55. data/lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb +15 -15
  56. data/lib/advanced_billing/exceptions/subscription_remove_coupon_errors_exception.rb +15 -15
  57. data/lib/advanced_billing/exceptions/subscriptions_mrr_error_response_exception.rb +15 -15
  58. data/lib/advanced_billing/exceptions/too_many_management_link_requests_error_exception.rb +15 -15
  59. data/lib/advanced_billing/models/activate_event_based_component.rb +84 -0
  60. data/lib/advanced_billing/models/{current_vault.rb → all_vaults.rb} +28 -7
  61. data/lib/advanced_billing/models/allocation.rb +1 -0
  62. data/lib/advanced_billing/models/allocation_preview_item.rb +1 -0
  63. data/lib/advanced_billing/models/apple_pay_payment_profile.rb +232 -0
  64. data/lib/advanced_billing/models/apple_pay_vault.rb +20 -0
  65. data/lib/advanced_billing/models/bank_account_attributes.rb +2 -0
  66. data/lib/advanced_billing/models/bank_account_payment_profile.rb +25 -20
  67. data/lib/advanced_billing/models/bank_account_vault.rb +19 -9
  68. data/lib/advanced_billing/models/change_invoice_status_event_data.rb +6 -6
  69. data/lib/advanced_billing/models/component.rb +1 -0
  70. data/lib/advanced_billing/models/component_custom_price.rb +33 -14
  71. data/lib/advanced_billing/models/component_price_point_item.rb +3 -1
  72. data/lib/advanced_billing/models/create_component_price_point.rb +3 -1
  73. data/lib/advanced_billing/models/create_customer.rb +11 -1
  74. data/lib/advanced_billing/models/create_metafield.rb +2 -1
  75. data/lib/advanced_billing/models/create_or_update_product.rb +7 -4
  76. data/lib/advanced_billing/models/create_payment_profile.rb +1 -1
  77. data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +6 -5
  78. data/lib/advanced_billing/models/create_product_price_point.rb +5 -3
  79. data/lib/advanced_billing/models/create_subscription.rb +27 -25
  80. data/lib/advanced_billing/models/credit_card_payment_profile.rb +17 -16
  81. data/lib/advanced_billing/models/credit_card_vault.rb +117 -0
  82. data/lib/advanced_billing/models/credit_note.rb +2 -2
  83. data/lib/advanced_billing/models/customer.rb +11 -1
  84. data/lib/advanced_billing/models/customer_attributes.rb +12 -1
  85. data/lib/advanced_billing/models/ebb_component.rb +1 -0
  86. data/lib/advanced_billing/models/{extended_interval_unit.rb → expiration_interval_unit.rb} +4 -4
  87. data/lib/advanced_billing/models/full_subscription_group_response.rb +65 -50
  88. data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +1 -1
  89. data/lib/advanced_billing/models/invoice.rb +19 -9
  90. data/lib/advanced_billing/models/invoice_consolidation_level.rb +2 -2
  91. data/lib/advanced_billing/models/invoice_refund.rb +13 -1
  92. data/lib/advanced_billing/models/invoice_status.rb +2 -2
  93. data/lib/advanced_billing/models/invoice_tax.rb +29 -0
  94. data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +101 -1
  95. data/lib/advanced_billing/models/issue_invoice_event_data.rb +6 -6
  96. data/lib/advanced_billing/models/metered_component.rb +4 -3
  97. data/lib/advanced_billing/models/offer_item.rb +3 -1
  98. data/lib/advanced_billing/models/on_off_component.rb +3 -2
  99. data/lib/advanced_billing/models/paid_invoice.rb +2 -2
  100. data/lib/advanced_billing/models/pay_pal_vault.rb +29 -0
  101. data/lib/advanced_billing/models/payment_profile_attributes.rb +5 -5
  102. data/lib/advanced_billing/models/payment_profile_response.rb +3 -3
  103. data/lib/advanced_billing/models/payment_type.rb +4 -1
  104. data/lib/advanced_billing/models/paypal_payment_profile.rb +242 -0
  105. data/lib/advanced_billing/models/prepaid_usage_component.rb +5 -4
  106. data/lib/advanced_billing/models/product.rb +2 -2
  107. data/lib/advanced_billing/models/product_price_point.rb +2 -2
  108. data/lib/advanced_billing/models/proforma_invoice.rb +6 -6
  109. data/lib/advanced_billing/models/quantity_based_component.rb +4 -3
  110. data/lib/advanced_billing/models/refund_invoice_event_data.rb +4 -4
  111. data/lib/advanced_billing/models/resent_invitation.rb +36 -0
  112. data/lib/advanced_billing/models/subscription.rb +13 -10
  113. data/lib/advanced_billing/models/subscription_component.rb +1 -0
  114. data/lib/advanced_billing/models/subscription_component_subscription.rb +26 -20
  115. data/lib/advanced_billing/models/subscription_custom_price.rb +5 -2
  116. data/lib/advanced_billing/models/subscription_group_bank_account.rb +2 -0
  117. data/lib/advanced_billing/models/subscription_group_credit_card.rb +1 -1
  118. data/lib/advanced_billing/models/subscription_group_signup_response.rb +39 -30
  119. data/lib/advanced_billing/models/subscription_state.rb +30 -30
  120. data/lib/advanced_billing/models/tax_configuration.rb +1 -2
  121. data/lib/advanced_billing/models/update_component_price_point.rb +3 -1
  122. data/lib/advanced_billing/models/update_customer.rb +12 -1
  123. data/lib/advanced_billing/models/update_payment_profile.rb +1 -1
  124. data/lib/advanced_billing/utilities/file_wrapper.rb +9 -9
  125. data/lib/advanced_billing/utilities/union_type_lookup.rb +17 -3
  126. data/lib/advanced_billing.rb +10 -4
  127. metadata +16 -10
@@ -11,21 +11,22 @@ module AdvancedBilling
11
11
  # selectively resend individual or groups of webhooks. Webhooks will be sent
12
12
  # on endpoints specified by you. Endpoints can be added via API or Web UI.
13
13
  # There is also an option to enable / disable webhooks via API request.
14
- # We recommend that you review Chargify's webhook documentation located in
15
- # our help site. The following resources will help guide you on how to use
16
- # webhooks in Chargify, in addition to these webhook endpoints:
14
+ # We recommend that you review Advanced Billing's webhook documentation
15
+ # located in our help site. The following resources will help guide you on
16
+ # how to use webhooks in Advanced Billing, in addition to these webhook
17
+ # endpoints:
17
18
  # + [Adding/editing new
18
- # webhooks](https://maxio-chargify.zendesk.com/hc/en-us/articles/54044484503
19
- # 17#configure-webhook-url)
19
+ # webhooks](https://maxio.zendesk.com/hc/en-us/articles/24286723085197-Webho
20
+ # oks#configure-webhook-url)
20
21
  # + [Webhooks introduction and delivery
21
- # information](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055680
22
- # 68365#webhooks-introduction-0-0)
22
+ # information](https://maxio.zendesk.com/hc/en-us/articles/24266143173901-We
23
+ # bhooks-Overview)
23
24
  # + [Main webhook
24
- # overview](https://maxio-chargify.zendesk.com/hc/en-us/articles/54053575096
25
- # 45-Webhooks-Reference#webhooks-reference-0-0)
25
+ # reference](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webh
26
+ # ooks-Reference)
26
27
  # + [Available webhooks and
27
- # payloads](https://maxio-chargify.zendesk.com/hc/en-us/articles/54053575096
28
- # 45-Webhooks-Reference#events)
28
+ # payloads](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webho
29
+ # oks-Reference#events)
29
30
  # ## List Webhooks for a Site
30
31
  # This method allows you to fetch data about webhooks. You can pass query
31
32
  # parameters if you want to filter webhooks.
@@ -50,8 +51,8 @@ module AdvancedBilling
50
51
  # Use in query `per_page=200`.
51
52
  # @param [WebhookOrder] order Optional parameter: The order in which the
52
53
  # Webhooks are returned.
53
- # @param [Integer] subscription Optional parameter: The Chargify id of a
54
- # subscription you'd like to filter for
54
+ # @param [Integer] subscription Optional parameter: The Advanced Billing id
55
+ # of a subscription you'd like to filter for
55
56
  # @return [Array[WebhookResponse]] response from the API call
56
57
  def list_webhooks(options = {})
57
58
  new_api_call_builder
@@ -68,9 +69,9 @@ module AdvancedBilling
68
69
  .header_param(new_parameter('application/json', key: 'accept'))
69
70
  .auth(Single.new('BasicAuth')))
70
71
  .response(new_response_handler
71
- .deserializer(APIHelper.method(:custom_type_deserializer))
72
- .deserialize_into(WebhookResponse.method(:from_hash))
73
- .is_response_array(true))
72
+ .deserializer(APIHelper.method(:custom_type_deserializer))
73
+ .deserialize_into(WebhookResponse.method(:from_hash))
74
+ .is_response_array(true))
74
75
  .execute
75
76
  end
76
77
 
@@ -88,8 +89,8 @@ module AdvancedBilling
88
89
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
89
90
  .auth(Single.new('BasicAuth')))
90
91
  .response(new_response_handler
91
- .deserializer(APIHelper.method(:custom_type_deserializer))
92
- .deserialize_into(EnableWebhooksResponse.method(:from_hash)))
92
+ .deserializer(APIHelper.method(:custom_type_deserializer))
93
+ .deserialize_into(EnableWebhooksResponse.method(:from_hash)))
93
94
  .execute
94
95
  end
95
96
 
@@ -111,8 +112,8 @@ module AdvancedBilling
111
112
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
112
113
  .auth(Single.new('BasicAuth')))
113
114
  .response(new_response_handler
114
- .deserializer(APIHelper.method(:custom_type_deserializer))
115
- .deserialize_into(ReplayWebhooksResponse.method(:from_hash)))
115
+ .deserializer(APIHelper.method(:custom_type_deserializer))
116
+ .deserialize_into(ReplayWebhooksResponse.method(:from_hash)))
116
117
  .execute
117
118
  end
118
119
 
@@ -120,8 +121,8 @@ module AdvancedBilling
120
121
  # webhooks subscriptions (events) to it.
121
122
  # You can check available events here.
122
123
  # [Event
123
- # keys](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405357509645-W
124
- # ebhooks-Reference#example-payloads)
124
+ # keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-
125
+ # Reference#events)
125
126
  # @param [CreateOrUpdateEndpointRequest] body Optional parameter: Example:
126
127
  # @return [EndpointResponse] response from the API call
127
128
  def create_endpoint(body: nil)
@@ -135,12 +136,12 @@ module AdvancedBilling
135
136
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
136
137
  .auth(Single.new('BasicAuth')))
137
138
  .response(new_response_handler
138
- .deserializer(APIHelper.method(:custom_type_deserializer))
139
- .deserialize_into(EndpointResponse.method(:from_hash))
140
- .local_error_template('422',
141
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
142
- ' Response: \'{$response.body}\'.',
143
- ErrorListResponseException))
139
+ .deserializer(APIHelper.method(:custom_type_deserializer))
140
+ .deserialize_into(EndpointResponse.method(:from_hash))
141
+ .local_error_template('422',
142
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
143
+ ' Response: \'{$response.body}\'.',
144
+ ErrorListResponseException))
144
145
  .execute
145
146
  end
146
147
 
@@ -154,9 +155,9 @@ module AdvancedBilling
154
155
  .header_param(new_parameter('application/json', key: 'accept'))
155
156
  .auth(Single.new('BasicAuth')))
156
157
  .response(new_response_handler
157
- .deserializer(APIHelper.method(:custom_type_deserializer))
158
- .deserialize_into(Endpoint.method(:from_hash))
159
- .is_response_array(true))
158
+ .deserializer(APIHelper.method(:custom_type_deserializer))
159
+ .deserialize_into(Endpoint.method(:from_hash))
160
+ .is_response_array(true))
160
161
  .execute
161
162
  end
162
163
 
@@ -165,15 +166,15 @@ module AdvancedBilling
165
166
  # You can change the `url` of your endpoint which consumes webhooks or list
166
167
  # of `webhook_subscriptions`.
167
168
  # Check available [Event
168
- # keys](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404448450317-W
169
- # ebhooks#configure-webhook-url).
169
+ # keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-
170
+ # Reference#events).
170
171
  # Always send a complete list of events which you want subscribe/watch.
171
172
  # Sending an PUT request for existing endpoint with empty list of
172
173
  # `webhook_subscriptions` will end with unsubscribe from all events.
173
174
  # If you want unsubscribe from specific event, just send a list of
174
175
  # `webhook_subscriptions` without the specific event key.
175
- # @param [Integer] endpoint_id Required parameter: The Chargify id for the
176
- # endpoint that should be updated
176
+ # @param [Integer] endpoint_id Required parameter: The Advanced Billing id
177
+ # for the endpoint that should be updated
177
178
  # @param [CreateOrUpdateEndpointRequest] body Optional parameter: Example:
178
179
  # @return [EndpointResponse] response from the API call
179
180
  def update_endpoint(endpoint_id,
@@ -191,15 +192,15 @@ module AdvancedBilling
191
192
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
192
193
  .auth(Single.new('BasicAuth')))
193
194
  .response(new_response_handler
194
- .deserializer(APIHelper.method(:custom_type_deserializer))
195
- .deserialize_into(EndpointResponse.method(:from_hash))
196
- .local_error_template('404',
197
- 'Not Found:\'{$response.body}\'',
198
- APIException)
199
- .local_error_template('422',
200
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
201
- ' Response: \'{$response.body}\'.',
202
- ErrorListResponseException))
195
+ .deserializer(APIHelper.method(:custom_type_deserializer))
196
+ .deserialize_into(EndpointResponse.method(:from_hash))
197
+ .local_error_template('404',
198
+ 'Not Found:\'{$response.body}\'',
199
+ APIException)
200
+ .local_error_template('422',
201
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
202
+ ' Response: \'{$response.body}\'.',
203
+ ErrorListResponseException))
203
204
  .execute
204
205
  end
205
206
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Array[ComponentAllocationErrorItem]]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  # Parameter is an array, so we need to iterate through it
30
30
  @errors = nil
31
31
  unless hash['errors'].nil?
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Array[ComponentPricePointErrorItem]]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  # Parameter is an array, so we need to iterate through it
30
30
  @errors = nil
31
31
  unless hash['errors'].nil?
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Object]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = hash.key?('errors') ? APIHelper.deserialize_union_type(
30
30
  UnionTypeLookUp.get(:CustomerErrorResponseErrors), hash['errors']
31
31
  ) : SKIP
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Hash[String, Object]]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = hash.key?('errors') ? hash['errors'] : SKIP
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Array[String]]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = hash.key?('errors') ? hash['errors'] : nil
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Hash[String, String]]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = hash.key?('errors') ? hash['errors'] : SKIP
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Errors]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = Errors.from_hash(hash['errors']) if hash['errors']
30
30
  end
31
31
  end
@@ -14,21 +14,21 @@ module AdvancedBilling
14
14
  # field and the value is an array with error messages. In most cases, this
15
15
  # object would contain just one key.
16
16
  # @return [Hash[String, Object]]
17
- attr_accessor :errors
18
-
19
- # The constructor.
20
- # @param [String] The reason for raising an exception.
21
- # @param [HttpResponse] The HttpReponse of the API call.
22
- def initialize(reason, response)
23
- super(reason, response)
24
- hash = APIHelper.json_deserialize(@response.raw_body)
25
- unbox(hash)
26
- end
27
-
28
- # Populates this object by extracting properties from a hash.
29
- # @param [Hash] The deserialized response sent by the server in the
30
- # response body.
31
- def unbox(hash)
17
+ attr_accessor :errors
18
+
19
+ # The constructor.
20
+ # @param [String] The reason for raising an exception.
21
+ # @param [HttpResponse] The HttpReponse of the API call.
22
+ def initialize(reason, response)
23
+ super(reason, response)
24
+ hash = APIHelper.json_deserialize(@response.raw_body)
25
+ unbox(hash)
26
+ end
27
+
28
+ # Populates this object by extracting properties from a hash.
29
+ # @param [Hash] The deserialized response sent by the server in the
30
+ # response body.
31
+ def unbox(hash)
32
32
  @errors = hash.key?('errors') ? hash['errors'] : SKIP
33
33
  end
34
34
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [EventBasedBillingSegmentError]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = EventBasedBillingSegmentError.from_hash(hash['errors']) if hash['errors']
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [ProductPricePointErrors]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = ProductPricePointErrors.from_hash(hash['errors']) if hash['errors']
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [ProformaError]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = ProformaError.from_hash(hash['errors']) if hash['errors']
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [RefundPrepaymentBaseRefundError]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = RefundPrepaymentBaseRefundError.from_hash(hash['errors']) if hash['errors']
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [String]
14
- attr_accessor :error
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :error
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @error = hash.key?('error') ? hash['error'] : nil
30
30
  end
31
31
  end