maxio-advanced-billing-sdk 5.2.0 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (555) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +48 -50
  4. data/lib/advanced_billing/client.rb +3 -4
  5. data/lib/advanced_billing/configuration.rb +21 -24
  6. data/lib/advanced_billing/controllers/advance_invoice_controller.rb +3 -3
  7. data/lib/advanced_billing/controllers/api_exports_controller.rb +9 -9
  8. data/lib/advanced_billing/controllers/base_controller.rb +1 -1
  9. data/lib/advanced_billing/controllers/billing_portal_controller.rb +4 -4
  10. data/lib/advanced_billing/controllers/component_price_points_controller.rb +34 -20
  11. data/lib/advanced_billing/controllers/components_controller.rb +12 -12
  12. data/lib/advanced_billing/controllers/coupons_controller.rb +45 -27
  13. data/lib/advanced_billing/controllers/custom_fields_controller.rb +9 -9
  14. data/lib/advanced_billing/controllers/customers_controller.rb +7 -7
  15. data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +6 -6
  16. data/lib/advanced_billing/controllers/events_controller.rb +26 -9
  17. data/lib/advanced_billing/controllers/insights_controller.rb +4 -4
  18. data/lib/advanced_billing/controllers/invoices_controller.rb +17 -17
  19. data/lib/advanced_billing/controllers/offers_controller.rb +10 -6
  20. data/lib/advanced_billing/controllers/payment_profiles_controller.rb +12 -12
  21. data/lib/advanced_billing/controllers/product_families_controller.rb +22 -20
  22. data/lib/advanced_billing/controllers/product_price_points_controller.rb +14 -11
  23. data/lib/advanced_billing/controllers/products_controller.rb +6 -6
  24. data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +9 -9
  25. data/lib/advanced_billing/controllers/reason_codes_controller.rb +17 -9
  26. data/lib/advanced_billing/controllers/referral_codes_controller.rb +1 -1
  27. data/lib/advanced_billing/controllers/sales_commissions_controller.rb +3 -3
  28. data/lib/advanced_billing/controllers/sites_controller.rb +3 -3
  29. data/lib/advanced_billing/controllers/subscription_components_controller.rb +21 -31
  30. data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +4 -4
  31. data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +4 -4
  32. data/lib/advanced_billing/controllers/subscription_groups_controller.rb +9 -9
  33. data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +6 -6
  34. data/lib/advanced_billing/controllers/subscription_notes_controller.rb +20 -8
  35. data/lib/advanced_billing/controllers/subscription_products_controller.rb +2 -2
  36. data/lib/advanced_billing/controllers/subscription_status_controller.rb +20 -12
  37. data/lib/advanced_billing/controllers/subscriptions_controller.rb +40 -17
  38. data/lib/advanced_billing/controllers/webhooks_controller.rb +6 -6
  39. data/lib/advanced_billing/exceptions/api_exception.rb +11 -0
  40. data/lib/advanced_billing/exceptions/component_allocation_error_exception.rb +12 -0
  41. data/lib/advanced_billing/exceptions/component_price_point_error_exception.rb +12 -0
  42. data/lib/advanced_billing/exceptions/customer_error_response_exception.rb +12 -0
  43. data/lib/advanced_billing/exceptions/error_array_map_response_exception.rb +12 -0
  44. data/lib/advanced_billing/exceptions/error_list_response_exception.rb +12 -0
  45. data/lib/advanced_billing/exceptions/error_string_map_response_exception.rb +12 -0
  46. data/lib/advanced_billing/exceptions/event_based_billing_list_segments_errors_exception.rb +12 -0
  47. data/lib/advanced_billing/exceptions/event_based_billing_segment_errors_exception.rb +12 -0
  48. data/lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb +12 -0
  49. data/lib/advanced_billing/exceptions/product_price_point_error_response_exception.rb +12 -0
  50. data/lib/advanced_billing/exceptions/proforma_bad_request_error_response_exception.rb +12 -0
  51. data/lib/advanced_billing/exceptions/refund_prepayment_base_errors_response_exception.rb +12 -0
  52. data/lib/advanced_billing/exceptions/single_error_response_exception.rb +12 -0
  53. data/lib/advanced_billing/exceptions/single_string_error_response_exception.rb +12 -0
  54. data/lib/advanced_billing/exceptions/subscription_add_coupon_error_exception.rb +14 -0
  55. data/lib/advanced_billing/exceptions/subscription_component_allocation_error_exception.rb +12 -0
  56. data/lib/advanced_billing/exceptions/subscription_group_create_error_response_exception.rb +12 -0
  57. data/lib/advanced_billing/exceptions/subscription_group_signup_error_response_exception.rb +12 -0
  58. data/lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb +12 -0
  59. data/lib/advanced_billing/exceptions/subscription_remove_coupon_errors_exception.rb +12 -0
  60. data/lib/advanced_billing/exceptions/subscription_response_error_exception.rb +44 -0
  61. data/lib/advanced_billing/exceptions/subscriptions_mrr_error_response_exception.rb +12 -0
  62. data/lib/advanced_billing/exceptions/too_many_management_link_requests_error_exception.rb +12 -0
  63. data/lib/advanced_billing/models/account_balance.rb +24 -7
  64. data/lib/advanced_billing/models/account_balances.rb +24 -7
  65. data/lib/advanced_billing/models/ach_agreement.rb +23 -7
  66. data/lib/advanced_billing/models/activate_event_based_component.rb +21 -6
  67. data/lib/advanced_billing/models/activate_subscription_request.rb +18 -4
  68. data/lib/advanced_billing/models/add_coupons_request.rb +17 -4
  69. data/lib/advanced_billing/models/add_subscription_to_a_group.rb +16 -15
  70. data/lib/advanced_billing/models/address_change.rb +19 -5
  71. data/lib/advanced_billing/models/agreement_acceptance.rb +27 -7
  72. data/lib/advanced_billing/models/allocate_components.rb +29 -7
  73. data/lib/advanced_billing/models/allocation.rb +44 -7
  74. data/lib/advanced_billing/models/allocation_expiration_date.rb +18 -4
  75. data/lib/advanced_billing/models/allocation_preview.rb +33 -7
  76. data/lib/advanced_billing/models/allocation_preview_item.rb +38 -7
  77. data/lib/advanced_billing/models/allocation_preview_line_item.rb +28 -7
  78. data/lib/advanced_billing/models/allocation_preview_response.rb +18 -4
  79. data/lib/advanced_billing/models/allocation_response.rb +18 -4
  80. data/lib/advanced_billing/models/allocation_settings.rb +21 -6
  81. data/lib/advanced_billing/models/apple_pay_payment_profile.rb +34 -7
  82. data/lib/advanced_billing/models/applied_credit_note_data.rb +19 -5
  83. data/lib/advanced_billing/models/apply_credit_note_event.rb +23 -7
  84. data/lib/advanced_billing/models/apply_credit_note_event_data.rb +28 -7
  85. data/lib/advanced_billing/models/apply_debit_note_event.rb +23 -7
  86. data/lib/advanced_billing/models/apply_debit_note_event_data.rb +25 -7
  87. data/lib/advanced_billing/models/apply_payment_event.rb +23 -7
  88. data/lib/advanced_billing/models/apply_payment_event_data.rb +30 -7
  89. data/lib/advanced_billing/models/attribute_error.rb +18 -4
  90. data/lib/advanced_billing/models/auto_resume.rb +18 -4
  91. data/lib/advanced_billing/models/backport_invoice_event.rb +23 -7
  92. data/lib/advanced_billing/models/bank_account_attributes.rb +32 -7
  93. data/lib/advanced_billing/models/bank_account_payment_profile.rb +42 -7
  94. data/lib/advanced_billing/models/bank_account_response.rb +18 -4
  95. data/lib/advanced_billing/models/bank_account_verification.rb +19 -5
  96. data/lib/advanced_billing/models/bank_account_verification_request.rb +18 -4
  97. data/lib/advanced_billing/models/base_model.rb +88 -28
  98. data/lib/advanced_billing/models/base_refund_error.rb +17 -4
  99. data/lib/advanced_billing/models/base_string_error.rb +17 -4
  100. data/lib/advanced_billing/models/batch_job.rb +23 -7
  101. data/lib/advanced_billing/models/batch_job_response.rb +18 -4
  102. data/lib/advanced_billing/models/billing_manifest.rb +30 -7
  103. data/lib/advanced_billing/models/billing_manifest_item.rb +34 -7
  104. data/lib/advanced_billing/models/billing_schedule.rb +18 -4
  105. data/lib/advanced_billing/models/breakouts.rb +25 -7
  106. data/lib/advanced_billing/models/bulk_components_price_point_assignment.rb +18 -4
  107. data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +18 -4
  108. data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +18 -4
  109. data/lib/advanced_billing/models/bulk_create_segments.rb +18 -4
  110. data/lib/advanced_billing/models/bulk_update_segments.rb +18 -4
  111. data/lib/advanced_billing/models/bulk_update_segments_item.rb +20 -6
  112. data/lib/advanced_billing/models/calendar_billing.rb +22 -7
  113. data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +18 -4
  114. data/lib/advanced_billing/models/cancellation_options.rb +19 -5
  115. data/lib/advanced_billing/models/cancellation_request.rb +18 -4
  116. data/lib/advanced_billing/models/change_chargeback_status_event.rb +23 -7
  117. data/lib/advanced_billing/models/change_chargeback_status_event_data.rb +18 -4
  118. data/lib/advanced_billing/models/change_invoice_collection_method_event.rb +23 -7
  119. data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +20 -5
  120. data/lib/advanced_billing/models/change_invoice_status_event.rb +23 -7
  121. data/lib/advanced_billing/models/change_invoice_status_event_data.rb +24 -7
  122. data/lib/advanced_billing/models/chargify_ebb.rb +25 -7
  123. data/lib/advanced_billing/models/component.rb +54 -9
  124. data/lib/advanced_billing/models/component_allocation_change.rb +27 -7
  125. data/lib/advanced_billing/models/component_allocation_error_item.rb +22 -7
  126. data/lib/advanced_billing/models/component_cost_data.rb +26 -7
  127. data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +24 -7
  128. data/lib/advanced_billing/models/component_currency_price.rb +24 -7
  129. data/lib/advanced_billing/models/component_currency_prices_response.rb +18 -4
  130. data/lib/advanced_billing/models/component_custom_price.rb +24 -7
  131. data/lib/advanced_billing/models/component_price.rb +26 -7
  132. data/lib/advanced_billing/models/component_price_point.rb +127 -7
  133. data/lib/advanced_billing/models/component_price_point_assignment.rb +19 -5
  134. data/lib/advanced_billing/models/component_price_point_error_item.rb +21 -6
  135. data/lib/advanced_billing/models/component_price_point_item.rb +24 -7
  136. data/lib/advanced_billing/models/component_price_point_response.rb +18 -4
  137. data/lib/advanced_billing/models/component_price_points_response.rb +19 -5
  138. data/lib/advanced_billing/models/component_response.rb +18 -4
  139. data/lib/advanced_billing/models/compounding_strategy.rb +5 -1
  140. data/lib/advanced_billing/models/consolidated_invoice.rb +18 -4
  141. data/lib/advanced_billing/models/count_response.rb +17 -4
  142. data/lib/advanced_billing/models/coupon.rb +150 -29
  143. data/lib/advanced_billing/models/coupon_currency.rb +27 -9
  144. data/lib/advanced_billing/models/coupon_currency_request.rb +18 -4
  145. data/lib/advanced_billing/models/coupon_currency_response.rb +18 -4
  146. data/lib/advanced_billing/models/coupon_payload.rb +273 -0
  147. data/lib/advanced_billing/models/{create_or_update_coupon.rb → coupon_request.rb} +26 -22
  148. data/lib/advanced_billing/models/coupon_response.rb +17 -4
  149. data/lib/advanced_billing/models/coupon_restriction.rb +22 -7
  150. data/lib/advanced_billing/models/coupon_subcodes.rb +17 -4
  151. data/lib/advanced_billing/models/coupon_subcodes_response.rb +21 -6
  152. data/lib/advanced_billing/models/coupon_usage.rb +24 -7
  153. data/lib/advanced_billing/models/create_allocation.rb +31 -7
  154. data/lib/advanced_billing/models/create_allocation_request.rb +18 -4
  155. data/lib/advanced_billing/models/create_component_price_point.rb +30 -9
  156. data/lib/advanced_billing/models/create_component_price_point_request.rb +18 -4
  157. data/lib/advanced_billing/models/create_component_price_points_request.rb +18 -4
  158. data/lib/advanced_billing/models/create_credit_note_event.rb +23 -7
  159. data/lib/advanced_billing/models/create_currency_price.rb +20 -6
  160. data/lib/advanced_billing/models/create_currency_prices_request.rb +18 -4
  161. data/lib/advanced_billing/models/create_customer.rb +33 -7
  162. data/lib/advanced_billing/models/create_customer_request.rb +18 -4
  163. data/lib/advanced_billing/models/create_debit_note_event.rb +23 -7
  164. data/lib/advanced_billing/models/create_ebb_component.rb +18 -4
  165. data/lib/advanced_billing/models/create_invoice.rb +28 -7
  166. data/lib/advanced_billing/models/create_invoice_address.rb +24 -7
  167. data/lib/advanced_billing/models/create_invoice_coupon.rb +30 -8
  168. data/lib/advanced_billing/models/create_invoice_item.rb +30 -7
  169. data/lib/advanced_billing/models/create_invoice_payment.rb +24 -7
  170. data/lib/advanced_billing/models/create_invoice_payment_application.rb +19 -5
  171. data/lib/advanced_billing/models/create_invoice_payment_request.rb +19 -5
  172. data/lib/advanced_billing/models/create_invoice_request.rb +17 -4
  173. data/lib/advanced_billing/models/create_metadata.rb +19 -5
  174. data/lib/advanced_billing/models/create_metadata_request.rb +18 -4
  175. data/lib/advanced_billing/models/create_metafield.rb +22 -7
  176. data/lib/advanced_billing/models/create_metafields_request.rb +18 -4
  177. data/lib/advanced_billing/models/create_metered_component.rb +18 -4
  178. data/lib/advanced_billing/models/create_multi_invoice_payment.rb +24 -7
  179. data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +17 -4
  180. data/lib/advanced_billing/models/create_offer.rb +25 -7
  181. data/lib/advanced_billing/models/create_offer_component.rb +22 -6
  182. data/lib/advanced_billing/models/create_offer_request.rb +17 -4
  183. data/lib/advanced_billing/models/create_on_off_component.rb +18 -4
  184. data/lib/advanced_billing/models/create_or_update_endpoint.rb +19 -5
  185. data/lib/advanced_billing/models/create_or_update_endpoint_request.rb +18 -4
  186. data/lib/advanced_billing/models/create_or_update_product.rb +36 -7
  187. data/lib/advanced_billing/models/create_or_update_product_request.rb +17 -4
  188. data/lib/advanced_billing/models/create_or_update_segment_price.rb +22 -6
  189. data/lib/advanced_billing/models/create_payment.rb +22 -7
  190. data/lib/advanced_billing/models/create_payment_profile.rb +50 -7
  191. data/lib/advanced_billing/models/create_payment_profile_request.rb +18 -4
  192. data/lib/advanced_billing/models/create_prepaid_component.rb +18 -4
  193. data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +38 -13
  194. data/lib/advanced_billing/models/create_prepayment.rb +23 -7
  195. data/lib/advanced_billing/models/create_prepayment_request.rb +18 -4
  196. data/lib/advanced_billing/models/create_prepayment_response.rb +18 -4
  197. data/lib/advanced_billing/models/create_product_currency_price.rb +20 -6
  198. data/lib/advanced_billing/models/create_product_currency_prices_request.rb +18 -4
  199. data/lib/advanced_billing/models/create_product_family.rb +20 -6
  200. data/lib/advanced_billing/models/create_product_family_request.rb +18 -4
  201. data/lib/advanced_billing/models/create_product_price_point.rb +35 -7
  202. data/lib/advanced_billing/models/create_product_price_point_request.rb +18 -4
  203. data/lib/advanced_billing/models/create_quantity_based_component.rb +18 -4
  204. data/lib/advanced_billing/models/create_reason_code.rb +20 -6
  205. data/lib/advanced_billing/models/create_reason_code_request.rb +18 -4
  206. data/lib/advanced_billing/models/create_segment.rb +27 -7
  207. data/lib/advanced_billing/models/create_segment_request.rb +17 -4
  208. data/lib/advanced_billing/models/create_subscription.rb +79 -8
  209. data/lib/advanced_billing/models/create_subscription_component.rb +26 -7
  210. data/lib/advanced_billing/models/create_subscription_group.rb +19 -5
  211. data/lib/advanced_billing/models/create_subscription_group_request.rb +18 -4
  212. data/lib/advanced_billing/models/create_subscription_request.rb +18 -4
  213. data/lib/advanced_billing/models/create_usage.rb +23 -7
  214. data/lib/advanced_billing/models/create_usage_request.rb +17 -4
  215. data/lib/advanced_billing/models/created_prepayment.rb +26 -7
  216. data/lib/advanced_billing/models/credit_account_balance_changed.rb +27 -7
  217. data/lib/advanced_billing/models/credit_card_attributes.rb +22 -6
  218. data/lib/advanced_billing/models/credit_card_payment_profile.rb +39 -7
  219. data/lib/advanced_billing/models/credit_note.rb +42 -7
  220. data/lib/advanced_billing/models/credit_note_application.rb +23 -7
  221. data/lib/advanced_billing/models/credit_note_line_item.rb +37 -7
  222. data/lib/advanced_billing/models/credit_scheme_request.rb +18 -4
  223. data/lib/advanced_billing/models/currency_price.rb +46 -7
  224. data/lib/advanced_billing/models/currency_prices_response.rb +18 -4
  225. data/lib/advanced_billing/models/custom_field_value_change.rb +26 -7
  226. data/lib/advanced_billing/models/customer.rb +47 -7
  227. data/lib/advanced_billing/models/customer_attributes.rb +34 -7
  228. data/lib/advanced_billing/models/customer_change.rb +23 -7
  229. data/lib/advanced_billing/models/customer_changes_preview_response.rb +17 -4
  230. data/lib/advanced_billing/models/customer_custom_fields_change.rb +19 -5
  231. data/lib/advanced_billing/models/customer_error.rb +18 -4
  232. data/lib/advanced_billing/models/customer_payer_change.rb +19 -5
  233. data/lib/advanced_billing/models/customer_response.rb +18 -4
  234. data/lib/advanced_billing/models/debit_note.rb +37 -7
  235. data/lib/advanced_billing/models/deduct_service_credit.rb +19 -5
  236. data/lib/advanced_billing/models/deduct_service_credit_request.rb +18 -4
  237. data/lib/advanced_billing/models/delayed_cancellation_response.rb +17 -4
  238. data/lib/advanced_billing/models/delete_subscription_group_response.rb +19 -5
  239. data/lib/advanced_billing/models/dunner_data.rb +25 -7
  240. data/lib/advanced_billing/models/dunning_step_data.rb +26 -7
  241. data/lib/advanced_billing/models/dunning_step_reached.rb +20 -6
  242. data/lib/advanced_billing/models/ebb_component.rb +41 -53
  243. data/lib/advanced_billing/models/ebb_event.rb +18 -4
  244. data/lib/advanced_billing/models/enable_webhooks_request.rb +18 -4
  245. data/lib/advanced_billing/models/enable_webhooks_response.rb +18 -4
  246. data/lib/advanced_billing/models/endpoint.rb +23 -7
  247. data/lib/advanced_billing/models/endpoint_response.rb +18 -4
  248. data/lib/advanced_billing/models/errors.rb +19 -5
  249. data/lib/advanced_billing/models/event.rb +89 -11
  250. data/lib/advanced_billing/models/event_based_billing_segment_error.rb +18 -4
  251. data/lib/advanced_billing/models/event_key.rb +264 -0
  252. data/lib/advanced_billing/models/event_response.rb +17 -4
  253. data/lib/advanced_billing/models/failed_payment_event.rb +23 -7
  254. data/lib/advanced_billing/models/failed_payment_event_data.rb +24 -7
  255. data/lib/advanced_billing/models/full_subscription_group_response.rb +32 -7
  256. data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +39 -7
  257. data/lib/advanced_billing/models/get_one_time_token_request.rb +18 -4
  258. data/lib/advanced_billing/models/group_billing.rb +20 -6
  259. data/lib/advanced_billing/models/group_settings.rb +19 -5
  260. data/lib/advanced_billing/models/group_target.rb +19 -5
  261. data/lib/advanced_billing/models/historic_usage.rb +22 -6
  262. data/lib/advanced_billing/models/invoice.rb +114 -13
  263. data/lib/advanced_billing/models/invoice_address.rb +22 -7
  264. data/lib/advanced_billing/models/invoice_avatax_details.rb +146 -0
  265. data/lib/advanced_billing/models/invoice_balance_item.rb +20 -6
  266. data/lib/advanced_billing/models/invoice_credit.rb +26 -7
  267. data/lib/advanced_billing/models/invoice_custom_field.rb +23 -7
  268. data/lib/advanced_billing/models/invoice_customer.rb +25 -7
  269. data/lib/advanced_billing/models/invoice_debit.rb +167 -0
  270. data/lib/advanced_billing/models/invoice_discount.rb +30 -7
  271. data/lib/advanced_billing/models/invoice_discount_breakout.rb +21 -6
  272. data/lib/advanced_billing/models/invoice_display_settings.rb +23 -7
  273. data/lib/advanced_billing/models/invoice_issued.rb +31 -7
  274. data/lib/advanced_billing/models/invoice_line_item.rb +55 -8
  275. data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +17 -4
  276. data/lib/advanced_billing/models/invoice_line_item_event_data.rb +37 -7
  277. data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +19 -5
  278. data/lib/advanced_billing/models/invoice_payer.rb +24 -7
  279. data/lib/advanced_billing/models/invoice_payer_change.rb +22 -7
  280. data/lib/advanced_billing/models/invoice_payment.rb +30 -7
  281. data/lib/advanced_billing/models/invoice_payment_application.rb +21 -6
  282. data/lib/advanced_billing/models/invoice_payment_method.rb +26 -7
  283. data/lib/advanced_billing/models/invoice_pre_payment.rb +22 -6
  284. data/lib/advanced_billing/models/invoice_previous_balance.rb +19 -5
  285. data/lib/advanced_billing/models/invoice_refund.rb +28 -7
  286. data/lib/advanced_billing/models/invoice_response.rb +17 -4
  287. data/lib/advanced_billing/models/invoice_seller.rb +22 -7
  288. data/lib/advanced_billing/models/invoice_status.rb +4 -1
  289. data/lib/advanced_billing/models/invoice_tax.rb +31 -7
  290. data/lib/advanced_billing/models/invoice_tax_breakout.rb +23 -7
  291. data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +33 -7
  292. data/lib/advanced_billing/models/issue_advance_invoice_request.rb +17 -4
  293. data/lib/advanced_billing/models/issue_invoice_event.rb +23 -7
  294. data/lib/advanced_billing/models/issue_invoice_event_data.rb +24 -7
  295. data/lib/advanced_billing/models/issue_invoice_request.rb +18 -4
  296. data/lib/advanced_billing/models/issue_service_credit.rb +19 -5
  297. data/lib/advanced_billing/models/issue_service_credit_request.rb +18 -4
  298. data/lib/advanced_billing/models/item_price_point_changed.rb +25 -7
  299. data/lib/advanced_billing/models/item_price_point_data.rb +20 -6
  300. data/lib/advanced_billing/models/list_components_filter.rb +19 -5
  301. data/lib/advanced_billing/models/list_components_price_points_response.rb +18 -4
  302. data/lib/advanced_billing/models/list_coupons_filter.rb +26 -7
  303. data/lib/advanced_billing/models/list_credit_notes_response.rb +18 -4
  304. data/lib/advanced_billing/models/list_invoice_events_response.rb +22 -7
  305. data/lib/advanced_billing/models/list_invoices_response.rb +18 -4
  306. data/lib/advanced_billing/models/list_metafields_response.rb +24 -7
  307. data/lib/advanced_billing/models/list_mrr_filter.rb +18 -4
  308. data/lib/advanced_billing/models/list_mrr_response.rb +16 -4
  309. data/lib/advanced_billing/models/list_mrr_response_result.rb +25 -7
  310. data/lib/advanced_billing/models/list_offers_response.rb +17 -4
  311. data/lib/advanced_billing/models/list_prepayments_filter.rb +20 -6
  312. data/lib/advanced_billing/models/list_price_points_filter.rb +25 -7
  313. data/lib/advanced_billing/models/list_product_price_points_response.rb +18 -4
  314. data/lib/advanced_billing/models/list_products_filter.rb +23 -7
  315. data/lib/advanced_billing/models/list_proforma_invoices_meta.rb +23 -7
  316. data/lib/advanced_billing/models/list_proforma_invoices_response.rb +19 -5
  317. data/lib/advanced_billing/models/list_public_keys_meta.rb +23 -7
  318. data/lib/advanced_billing/models/list_public_keys_response.rb +19 -5
  319. data/lib/advanced_billing/models/list_sale_rep_item.rb +23 -7
  320. data/lib/advanced_billing/models/list_segments_filter.rb +26 -7
  321. data/lib/advanced_billing/models/list_segments_response.rb +18 -4
  322. data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +28 -7
  323. data/lib/advanced_billing/models/list_subscription_components_filter.rb +19 -5
  324. data/lib/advanced_billing/models/list_subscription_components_for_site_filter.rb +22 -6
  325. data/lib/advanced_billing/models/list_subscription_components_response.rb +18 -4
  326. data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +18 -4
  327. data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +18 -4
  328. data/lib/advanced_billing/models/list_subscription_groups_item.rb +30 -7
  329. data/lib/advanced_billing/models/list_subscription_groups_meta.rb +19 -5
  330. data/lib/advanced_billing/models/list_subscription_groups_response.rb +19 -5
  331. data/lib/advanced_billing/models/metadata.rb +24 -7
  332. data/lib/advanced_billing/models/metafield.rb +23 -7
  333. data/lib/advanced_billing/models/metafield_scope.rb +24 -7
  334. data/lib/advanced_billing/models/metered_component.rb +49 -51
  335. data/lib/advanced_billing/models/metered_usage.rb +25 -7
  336. data/lib/advanced_billing/models/movement.rb +28 -7
  337. data/lib/advanced_billing/models/movement_line_item.rb +26 -7
  338. data/lib/advanced_billing/models/mrr.rb +25 -7
  339. data/lib/advanced_billing/models/mrr_movement.rb +23 -7
  340. data/lib/advanced_billing/models/mrr_response.rb +16 -4
  341. data/lib/advanced_billing/models/multi_invoice_payment.rb +23 -7
  342. data/lib/advanced_billing/models/multi_invoice_payment_response.rb +17 -4
  343. data/lib/advanced_billing/models/nested_subscription_group.rb +23 -7
  344. data/lib/advanced_billing/models/net_terms.rb +28 -7
  345. data/lib/advanced_billing/models/offer.rb +37 -7
  346. data/lib/advanced_billing/models/offer_discount.rb +21 -6
  347. data/lib/advanced_billing/models/offer_item.rb +29 -7
  348. data/lib/advanced_billing/models/offer_response.rb +17 -4
  349. data/lib/advanced_billing/models/offer_signup_page.rb +24 -7
  350. data/lib/advanced_billing/models/{reason_codes_json_response.rb → ok_response.rb} +19 -7
  351. data/lib/advanced_billing/models/on_off_component.rb +66 -61
  352. data/lib/advanced_billing/models/organization_address.rb +24 -7
  353. data/lib/advanced_billing/models/origin_invoice.rb +19 -5
  354. data/lib/advanced_billing/models/overage_pricing.rb +19 -5
  355. data/lib/advanced_billing/models/override_subscription.rb +26 -7
  356. data/lib/advanced_billing/models/override_subscription_request.rb +18 -4
  357. data/lib/advanced_billing/models/paginated_metadata.rb +24 -7
  358. data/lib/advanced_billing/models/paid_invoice.rb +22 -7
  359. data/lib/advanced_billing/models/pause_request.rb +17 -4
  360. data/lib/advanced_billing/models/payer_attributes.rb +31 -7
  361. data/lib/advanced_billing/models/payer_error.rb +20 -6
  362. data/lib/advanced_billing/models/payment_collection_method_changed.rb +19 -5
  363. data/lib/advanced_billing/models/payment_for_allocation.rb +22 -7
  364. data/lib/advanced_billing/models/payment_method_apple_pay.rb +17 -4
  365. data/lib/advanced_billing/models/payment_method_bank_account.rb +22 -6
  366. data/lib/advanced_billing/models/payment_method_credit_card.rb +24 -7
  367. data/lib/advanced_billing/models/payment_method_external.rb +22 -7
  368. data/lib/advanced_billing/models/payment_method_paypal.rb +19 -5
  369. data/lib/advanced_billing/models/payment_profile_attributes.rb +42 -7
  370. data/lib/advanced_billing/models/payment_profile_response.rb +18 -4
  371. data/lib/advanced_billing/models/payment_related_events.rb +19 -5
  372. data/lib/advanced_billing/models/paypal_payment_profile.rb +35 -7
  373. data/lib/advanced_billing/models/pending_cancellation_change.rb +19 -5
  374. data/lib/advanced_billing/models/portal_management_link.rb +25 -7
  375. data/lib/advanced_billing/models/prepaid_configuration.rb +27 -7
  376. data/lib/advanced_billing/models/prepaid_configuration_response.rb +18 -4
  377. data/lib/advanced_billing/models/prepaid_product_price_point_filter.rb +18 -4
  378. data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +26 -7
  379. data/lib/advanced_billing/models/prepaid_usage.rb +32 -7
  380. data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +21 -6
  381. data/lib/advanced_billing/models/prepaid_usage_component.rb +83 -41
  382. data/lib/advanced_billing/models/prepayment.rb +28 -7
  383. data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +25 -7
  384. data/lib/advanced_billing/models/prepayment_response.rb +18 -4
  385. data/lib/advanced_billing/models/prepayments_response.rb +18 -4
  386. data/lib/advanced_billing/models/preview_allocations_request.rb +24 -7
  387. data/lib/advanced_billing/models/price.rb +22 -6
  388. data/lib/advanced_billing/models/product.rb +62 -7
  389. data/lib/advanced_billing/models/product_family.rb +24 -7
  390. data/lib/advanced_billing/models/product_family_response.rb +18 -4
  391. data/lib/advanced_billing/models/product_price_point.rb +44 -7
  392. data/lib/advanced_billing/models/product_price_point_errors.rb +24 -7
  393. data/lib/advanced_billing/models/product_price_point_response.rb +18 -4
  394. data/lib/advanced_billing/models/product_response.rb +17 -4
  395. data/lib/advanced_billing/models/proforma_error.rb +18 -4
  396. data/lib/advanced_billing/models/proforma_invoice.rb +49 -7
  397. data/lib/advanced_billing/models/proforma_invoice_credit.rb +22 -7
  398. data/lib/advanced_billing/models/proforma_invoice_discount.rb +26 -7
  399. data/lib/advanced_billing/models/proforma_invoice_issued.rb +28 -7
  400. data/lib/advanced_billing/models/proforma_invoice_payment.rb +23 -7
  401. data/lib/advanced_billing/models/proforma_invoice_tax.rb +25 -7
  402. data/lib/advanced_billing/models/proration.rb +18 -4
  403. data/lib/advanced_billing/models/public_key.rb +22 -6
  404. data/lib/advanced_billing/models/public_signup_page.rb +22 -7
  405. data/lib/advanced_billing/models/quantity_based_component.rb +51 -23
  406. data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +19 -5
  407. data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +28 -7
  408. data/lib/advanced_billing/models/reactivate_subscription_request.rb +26 -7
  409. data/lib/advanced_billing/models/reactivation_billing.rb +18 -4
  410. data/lib/advanced_billing/models/reason_code.rb +24 -7
  411. data/lib/advanced_billing/models/reason_code_response.rb +18 -4
  412. data/lib/advanced_billing/models/record_payment_request.rb +17 -4
  413. data/lib/advanced_billing/models/record_payment_response.rb +19 -5
  414. data/lib/advanced_billing/models/referral_code.rb +22 -7
  415. data/lib/advanced_billing/models/referral_validation_response.rb +18 -4
  416. data/lib/advanced_billing/models/refund_consolidated_invoice.rb +24 -7
  417. data/lib/advanced_billing/models/refund_invoice.rb +24 -7
  418. data/lib/advanced_billing/models/refund_invoice_event.rb +23 -7
  419. data/lib/advanced_billing/models/refund_invoice_event_data.rb +28 -7
  420. data/lib/advanced_billing/models/refund_invoice_request.rb +17 -4
  421. data/lib/advanced_billing/models/refund_prepayment.rb +22 -7
  422. data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +17 -4
  423. data/lib/advanced_billing/models/refund_prepayment_request.rb +17 -4
  424. data/lib/advanced_billing/models/refund_success.rb +22 -6
  425. data/lib/advanced_billing/models/remove_payment_event.rb +23 -7
  426. data/lib/advanced_billing/models/remove_payment_event_data.rb +26 -7
  427. data/lib/advanced_billing/models/renewal_preview.rb +30 -7
  428. data/lib/advanced_billing/models/renewal_preview_component.rb +21 -6
  429. data/lib/advanced_billing/models/renewal_preview_line_item.rb +34 -7
  430. data/lib/advanced_billing/models/renewal_preview_request.rb +18 -4
  431. data/lib/advanced_billing/models/renewal_preview_response.rb +18 -4
  432. data/lib/advanced_billing/models/replay_webhooks_request.rb +16 -4
  433. data/lib/advanced_billing/models/replay_webhooks_response.rb +17 -4
  434. data/lib/advanced_billing/models/resent_invitation.rb +26 -7
  435. data/lib/advanced_billing/models/resume_options.rb +19 -5
  436. data/lib/advanced_billing/models/revoked_invitation.rb +22 -6
  437. data/lib/advanced_billing/models/sale_rep.rb +23 -7
  438. data/lib/advanced_billing/models/sale_rep_item_mrr.rb +20 -6
  439. data/lib/advanced_billing/models/sale_rep_settings.rb +26 -7
  440. data/lib/advanced_billing/models/sale_rep_subscription.rb +26 -7
  441. data/lib/advanced_billing/models/segment.rb +33 -7
  442. data/lib/advanced_billing/models/segment_price.rb +26 -7
  443. data/lib/advanced_billing/models/segment_response.rb +17 -4
  444. data/lib/advanced_billing/models/send_invoice_request.rb +22 -6
  445. data/lib/advanced_billing/models/service_credit.rb +24 -7
  446. data/lib/advanced_billing/models/service_credit_response.rb +18 -4
  447. data/lib/advanced_billing/models/signup_proforma_preview.rb +21 -5
  448. data/lib/advanced_billing/models/signup_proforma_preview_response.rb +18 -4
  449. data/lib/advanced_billing/models/site.rb +56 -7
  450. data/lib/advanced_billing/models/site_response.rb +17 -4
  451. data/lib/advanced_billing/models/site_statistics.rb +35 -7
  452. data/lib/advanced_billing/models/site_summary.rb +23 -7
  453. data/lib/advanced_billing/models/subscription.rb +91 -7
  454. data/lib/advanced_billing/models/subscription_component.rb +50 -7
  455. data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +19 -5
  456. data/lib/advanced_billing/models/subscription_component_response.rb +18 -4
  457. data/lib/advanced_billing/models/subscription_component_subscription.rb +19 -5
  458. data/lib/advanced_billing/models/subscription_custom_price.rb +34 -7
  459. data/lib/advanced_billing/models/subscription_filter.rb +24 -7
  460. data/lib/advanced_billing/models/subscription_group.rb +25 -7
  461. data/lib/advanced_billing/models/subscription_group_balances.rb +23 -7
  462. data/lib/advanced_billing/models/subscription_group_bank_account.rb +35 -7
  463. data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +21 -6
  464. data/lib/advanced_billing/models/subscription_group_credit_card.rb +37 -7
  465. data/lib/advanced_billing/models/subscription_group_customer.rb +23 -7
  466. data/lib/advanced_billing/models/subscription_group_item.rb +30 -7
  467. data/lib/advanced_billing/models/subscription_group_members_array_error.rb +17 -4
  468. data/lib/advanced_billing/models/subscription_group_payment_profile.rb +23 -7
  469. data/lib/advanced_billing/models/subscription_group_prepayment.rb +22 -7
  470. data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +18 -4
  471. data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +24 -7
  472. data/lib/advanced_billing/models/subscription_group_response.rb +18 -4
  473. data/lib/advanced_billing/models/subscription_group_signup.rb +29 -7
  474. data/lib/advanced_billing/models/subscription_group_signup_component.rb +24 -7
  475. data/lib/advanced_billing/models/subscription_group_signup_error.rb +25 -7
  476. data/lib/advanced_billing/models/{subscription_group_signup_success.rb → subscription_group_signup_event_data.rb} +31 -15
  477. data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +29 -7
  478. data/lib/advanced_billing/models/subscription_group_signup_item.rb +31 -7
  479. data/lib/advanced_billing/models/subscription_group_signup_request.rb +18 -4
  480. data/lib/advanced_billing/models/subscription_group_signup_response.rb +31 -7
  481. data/lib/advanced_billing/models/subscription_group_single_error.rb +18 -4
  482. data/lib/advanced_billing/models/subscription_group_subscription_error.rb +31 -7
  483. data/lib/advanced_billing/models/subscription_group_update_error.rb +19 -15
  484. data/lib/advanced_billing/models/subscription_included_coupon.rb +25 -7
  485. data/lib/advanced_billing/models/subscription_migration_preview.rb +25 -7
  486. data/lib/advanced_billing/models/subscription_migration_preview_options.rb +30 -7
  487. data/lib/advanced_billing/models/subscription_migration_preview_request.rb +18 -4
  488. data/lib/advanced_billing/models/subscription_migration_preview_response.rb +18 -4
  489. data/lib/advanced_billing/models/subscription_mrr.rb +22 -6
  490. data/lib/advanced_billing/models/subscription_mrr_breakout.rb +20 -5
  491. data/lib/advanced_billing/models/subscription_mrr_response.rb +18 -4
  492. data/lib/advanced_billing/models/subscription_note.rb +24 -7
  493. data/lib/advanced_billing/models/subscription_note_response.rb +17 -4
  494. data/lib/advanced_billing/models/subscription_preview.rb +21 -5
  495. data/lib/advanced_billing/models/subscription_preview_response.rb +18 -4
  496. data/lib/advanced_billing/models/subscription_product_change.rb +19 -5
  497. data/lib/advanced_billing/models/subscription_product_migration.rb +30 -7
  498. data/lib/advanced_billing/models/subscription_product_migration_request.rb +18 -4
  499. data/lib/advanced_billing/models/subscription_response.rb +18 -4
  500. data/lib/advanced_billing/models/subscription_state_change.rb +21 -5
  501. data/lib/advanced_billing/models/tax_configuration.rb +22 -6
  502. data/lib/advanced_billing/models/too_many_management_link_requests.rb +19 -5
  503. data/lib/advanced_billing/models/update_allocation_expiration_date.rb +18 -4
  504. data/lib/advanced_billing/models/update_component.rb +27 -7
  505. data/lib/advanced_billing/models/update_component_price_point.rb +26 -7
  506. data/lib/advanced_billing/models/update_component_price_point_request.rb +18 -4
  507. data/lib/advanced_billing/models/update_component_request.rb +18 -4
  508. data/lib/advanced_billing/models/update_coupon_currency.rb +19 -5
  509. data/lib/advanced_billing/models/update_currency_price.rb +20 -6
  510. data/lib/advanced_billing/models/update_currency_prices_request.rb +18 -4
  511. data/lib/advanced_billing/models/update_customer.rb +33 -7
  512. data/lib/advanced_billing/models/update_customer_request.rb +18 -4
  513. data/lib/advanced_billing/models/update_metadata.rb +20 -6
  514. data/lib/advanced_billing/models/update_metadata_request.rb +18 -4
  515. data/lib/advanced_billing/models/update_metafield.rb +23 -7
  516. data/lib/advanced_billing/models/update_metafields_request.rb +18 -4
  517. data/lib/advanced_billing/models/update_payment_profile.rb +30 -7
  518. data/lib/advanced_billing/models/update_payment_profile_request.rb +18 -4
  519. data/lib/advanced_billing/models/update_price.rb +23 -7
  520. data/lib/advanced_billing/models/update_product_price_point.rb +19 -5
  521. data/lib/advanced_billing/models/update_product_price_point_request.rb +18 -4
  522. data/lib/advanced_billing/models/update_reason_code.rb +20 -6
  523. data/lib/advanced_billing/models/update_reason_code_request.rb +18 -4
  524. data/lib/advanced_billing/models/update_segment.rb +19 -5
  525. data/lib/advanced_billing/models/update_segment_request.rb +17 -4
  526. data/lib/advanced_billing/models/update_subscription.rb +45 -8
  527. data/lib/advanced_billing/models/update_subscription_component.rb +19 -5
  528. data/lib/advanced_billing/models/update_subscription_group.rb +18 -4
  529. data/lib/advanced_billing/models/update_subscription_group_request.rb +18 -4
  530. data/lib/advanced_billing/models/update_subscription_note.rb +19 -5
  531. data/lib/advanced_billing/models/update_subscription_note_request.rb +17 -4
  532. data/lib/advanced_billing/models/update_subscription_request.rb +18 -4
  533. data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +27 -7
  534. data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +18 -4
  535. data/lib/advanced_billing/models/usage.rb +26 -7
  536. data/lib/advanced_billing/models/usage_response.rb +17 -4
  537. data/lib/advanced_billing/models/void_invoice.rb +17 -4
  538. data/lib/advanced_billing/models/void_invoice_event.rb +23 -7
  539. data/lib/advanced_billing/models/void_invoice_event_data.rb +25 -7
  540. data/lib/advanced_billing/models/void_invoice_request.rb +17 -4
  541. data/lib/advanced_billing/models/void_remainder_event.rb +23 -7
  542. data/lib/advanced_billing/models/void_remainder_event_data.rb +23 -7
  543. data/lib/advanced_billing/models/webhook.rb +29 -7
  544. data/lib/advanced_billing/models/webhook_response.rb +17 -4
  545. data/lib/advanced_billing/utilities/file_wrapper.rb +14 -2
  546. data/lib/advanced_billing/utilities/union_type_lookup.rb +12 -33
  547. data/lib/advanced_billing.rb +9 -11
  548. metadata +12 -14
  549. data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +0 -249
  550. data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +0 -250
  551. data/lib/advanced_billing/models/event_type.rb +0 -121
  552. data/lib/advanced_billing/models/prepaid_component_price_point.rb +0 -123
  553. data/lib/advanced_billing/models/subscription_group_member_error.rb +0 -78
  554. data/lib/advanced_billing/models/subscription_group_signup_failure.rb +0 -93
  555. data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +0 -185
@@ -25,6 +25,14 @@ module AdvancedBilling
25
25
  # @return [String]
26
26
  attr_accessor :formatted_price
27
27
 
28
+ # TODO: Write general description for this method
29
+ # @return [Integer]
30
+ attr_accessor :price_id
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [Integer]
34
+ attr_accessor :price_point_id
35
+
28
36
  # TODO: Write general description for this method
29
37
  # @return [Integer]
30
38
  attr_accessor :product_price_point_id
@@ -40,6 +48,8 @@ module AdvancedBilling
40
48
  @_hash['currency'] = 'currency'
41
49
  @_hash['price'] = 'price'
42
50
  @_hash['formatted_price'] = 'formatted_price'
51
+ @_hash['price_id'] = 'price_id'
52
+ @_hash['price_point_id'] = 'price_point_id'
43
53
  @_hash['product_price_point_id'] = 'product_price_point_id'
44
54
  @_hash['role'] = 'role'
45
55
  @_hash
@@ -52,6 +62,8 @@ module AdvancedBilling
52
62
  currency
53
63
  price
54
64
  formatted_price
65
+ price_id
66
+ price_point_id
55
67
  product_price_point_id
56
68
  role
57
69
  ]
@@ -63,19 +75,22 @@ module AdvancedBilling
63
75
  end
64
76
 
65
77
  def initialize(id: SKIP, currency: SKIP, price: SKIP, formatted_price: SKIP,
78
+ price_id: SKIP, price_point_id: SKIP,
66
79
  product_price_point_id: SKIP, role: SKIP,
67
80
  additional_properties: {})
81
+ # Add additional model properties to the instance.
82
+ additional_properties.each do |_name, _value|
83
+ instance_variable_set("@#{_name}", _value)
84
+ end
85
+
68
86
  @id = id unless id == SKIP
69
87
  @currency = currency unless currency == SKIP
70
88
  @price = price unless price == SKIP
71
89
  @formatted_price = formatted_price unless formatted_price == SKIP
90
+ @price_id = price_id unless price_id == SKIP
91
+ @price_point_id = price_point_id unless price_point_id == SKIP
72
92
  @product_price_point_id = product_price_point_id unless product_price_point_id == SKIP
73
93
  @role = role unless role == SKIP
74
-
75
- # Add additional model properties to the instance.
76
- additional_properties.each do |_name, _value|
77
- instance_variable_set("@#{_name}", _value)
78
- end
79
94
  end
80
95
 
81
96
  # Creates an instance of the object from a hash.
@@ -88,21 +103,45 @@ module AdvancedBilling
88
103
  price = hash.key?('price') ? hash['price'] : SKIP
89
104
  formatted_price =
90
105
  hash.key?('formatted_price') ? hash['formatted_price'] : SKIP
106
+ price_id = hash.key?('price_id') ? hash['price_id'] : SKIP
107
+ price_point_id =
108
+ hash.key?('price_point_id') ? hash['price_point_id'] : SKIP
91
109
  product_price_point_id =
92
110
  hash.key?('product_price_point_id') ? hash['product_price_point_id'] : SKIP
93
111
  role = hash.key?('role') ? hash['role'] : SKIP
94
112
 
95
113
  # Clean out expected properties from Hash.
96
- names.each_value { |k| hash.delete(k) }
114
+ additional_properties = hash.reject { |k, _| names.value?(k) }
97
115
 
98
116
  # Create object from extracted values.
99
117
  CurrencyPrice.new(id: id,
100
118
  currency: currency,
101
119
  price: price,
102
120
  formatted_price: formatted_price,
121
+ price_id: price_id,
122
+ price_point_id: price_point_id,
103
123
  product_price_point_id: product_price_point_id,
104
124
  role: role,
105
- additional_properties: hash)
125
+ additional_properties: additional_properties)
126
+ end
127
+
128
+ # Provides a human-readable string representation of the object.
129
+ def to_s
130
+ class_name = self.class.name.split('::').last
131
+ "<#{class_name} id: #{@id}, currency: #{@currency}, price: #{@price}, formatted_price:"\
132
+ " #{@formatted_price}, price_id: #{@price_id}, price_point_id: #{@price_point_id},"\
133
+ " product_price_point_id: #{@product_price_point_id}, role: #{@role}, additional_properties:"\
134
+ " #{get_additional_properties}>"
135
+ end
136
+
137
+ # Provides a debugging-friendly string with detailed object information.
138
+ def inspect
139
+ class_name = self.class.name.split('::').last
140
+ "<#{class_name} id: #{@id.inspect}, currency: #{@currency.inspect}, price:"\
141
+ " #{@price.inspect}, formatted_price: #{@formatted_price.inspect}, price_id:"\
142
+ " #{@price_id.inspect}, price_point_id: #{@price_point_id.inspect}, product_price_point_id:"\
143
+ " #{@product_price_point_id.inspect}, role: #{@role.inspect}, additional_properties:"\
144
+ " #{get_additional_properties}>"
106
145
  end
107
146
  end
108
147
  end
@@ -31,12 +31,12 @@ module AdvancedBilling
31
31
  end
32
32
 
33
33
  def initialize(currency_prices:, additional_properties: {})
34
- @currency_prices = currency_prices
35
-
36
34
  # Add additional model properties to the instance.
37
35
  additional_properties.each do |_name, _value|
38
36
  instance_variable_set("@#{_name}", _value)
39
37
  end
38
+
39
+ @currency_prices = currency_prices
40
40
  end
41
41
 
42
42
  # Creates an instance of the object from a hash.
@@ -56,11 +56,25 @@ module AdvancedBilling
56
56
  currency_prices = nil unless hash.key?('currency_prices')
57
57
 
58
58
  # Clean out expected properties from Hash.
59
- names.each_value { |k| hash.delete(k) }
59
+ additional_properties = hash.reject { |k, _| names.value?(k) }
60
60
 
61
61
  # Create object from extracted values.
62
62
  CurrencyPricesResponse.new(currency_prices: currency_prices,
63
- additional_properties: hash)
63
+ additional_properties: additional_properties)
64
+ end
65
+
66
+ # Provides a human-readable string representation of the object.
67
+ def to_s
68
+ class_name = self.class.name.split('::').last
69
+ "<#{class_name} currency_prices: #{@currency_prices}, additional_properties:"\
70
+ " #{get_additional_properties}>"
71
+ end
72
+
73
+ # Provides a debugging-friendly string with detailed object information.
74
+ def inspect
75
+ class_name = self.class.name.split('::').last
76
+ "<#{class_name} currency_prices: #{@currency_prices.inspect}, additional_properties:"\
77
+ " #{get_additional_properties}>"
64
78
  end
65
79
  end
66
80
  end
@@ -66,6 +66,11 @@ module AdvancedBilling
66
66
  def initialize(event_type:, metafield_name:, metafield_id:, old_value:,
67
67
  new_value:, resource_type:, resource_id:,
68
68
  additional_properties: {})
69
+ # Add additional model properties to the instance.
70
+ additional_properties.each do |_name, _value|
71
+ instance_variable_set("@#{_name}", _value)
72
+ end
73
+
69
74
  @event_type = event_type
70
75
  @metafield_name = metafield_name
71
76
  @metafield_id = metafield_id
@@ -73,11 +78,6 @@ module AdvancedBilling
73
78
  @new_value = new_value
74
79
  @resource_type = resource_type
75
80
  @resource_id = resource_id
76
-
77
- # Add additional model properties to the instance.
78
- additional_properties.each do |_name, _value|
79
- instance_variable_set("@#{_name}", _value)
80
- end
81
81
  end
82
82
 
83
83
  # Creates an instance of the object from a hash.
@@ -95,7 +95,7 @@ module AdvancedBilling
95
95
  resource_id = hash.key?('resource_id') ? hash['resource_id'] : nil
96
96
 
97
97
  # Clean out expected properties from Hash.
98
- names.each_value { |k| hash.delete(k) }
98
+ additional_properties = hash.reject { |k, _| names.value?(k) }
99
99
 
100
100
  # Create object from extracted values.
101
101
  CustomFieldValueChange.new(event_type: event_type,
@@ -105,7 +105,7 @@ module AdvancedBilling
105
105
  new_value: new_value,
106
106
  resource_type: resource_type,
107
107
  resource_id: resource_id,
108
- additional_properties: hash)
108
+ additional_properties: additional_properties)
109
109
  end
110
110
 
111
111
  # Validates an instance of the object from a given value.
@@ -149,5 +149,24 @@ module AdvancedBilling
149
149
  ->(val) { val.instance_of? Integer })
150
150
  )
151
151
  end
152
+
153
+ # Provides a human-readable string representation of the object.
154
+ def to_s
155
+ class_name = self.class.name.split('::').last
156
+ "<#{class_name} event_type: #{@event_type}, metafield_name: #{@metafield_name},"\
157
+ " metafield_id: #{@metafield_id}, old_value: #{@old_value}, new_value: #{@new_value},"\
158
+ " resource_type: #{@resource_type}, resource_id: #{@resource_id}, additional_properties:"\
159
+ " #{get_additional_properties}>"
160
+ end
161
+
162
+ # Provides a debugging-friendly string with detailed object information.
163
+ def inspect
164
+ class_name = self.class.name.split('::').last
165
+ "<#{class_name} event_type: #{@event_type.inspect}, metafield_name:"\
166
+ " #{@metafield_name.inspect}, metafield_id: #{@metafield_id.inspect}, old_value:"\
167
+ " #{@old_value.inspect}, new_value: #{@new_value.inspect}, resource_type:"\
168
+ " #{@resource_type.inspect}, resource_id: #{@resource_id.inspect}, additional_properties:"\
169
+ " #{get_additional_properties}>"
170
+ end
152
171
  end
153
172
  end
@@ -257,6 +257,11 @@ module AdvancedBilling
257
257
  tax_exempt_reason: SKIP,
258
258
  default_auto_renewal_profile_id: SKIP,
259
259
  additional_properties: {})
260
+ # Add additional model properties to the instance.
261
+ additional_properties.each do |_name, _value|
262
+ instance_variable_set("@#{_name}", _value)
263
+ end
264
+
260
265
  @first_name = first_name unless first_name == SKIP
261
266
  @last_name = last_name unless last_name == SKIP
262
267
  @email = email unless email == SKIP
@@ -302,11 +307,6 @@ module AdvancedBilling
302
307
  @default_auto_renewal_profile_id =
303
308
  default_auto_renewal_profile_id
304
309
  end
305
-
306
- # Add additional model properties to the instance.
307
- additional_properties.each do |_name, _value|
308
- instance_variable_set("@#{_name}", _value)
309
- end
310
310
  end
311
311
 
312
312
  # Creates an instance of the object from a hash.
@@ -369,7 +369,7 @@ module AdvancedBilling
369
369
  hash.key?('default_auto_renewal_profile_id') ? hash['default_auto_renewal_profile_id'] : SKIP
370
370
 
371
371
  # Clean out expected properties from Hash.
372
- names.each_value { |k| hash.delete(k) }
372
+ additional_properties = hash.reject { |k, _| names.value?(k) }
373
373
 
374
374
  # Create object from extracted values.
375
375
  Customer.new(first_name: first_name,
@@ -402,7 +402,7 @@ module AdvancedBilling
402
402
  salesforce_id: salesforce_id,
403
403
  tax_exempt_reason: tax_exempt_reason,
404
404
  default_auto_renewal_profile_id: default_auto_renewal_profile_id,
405
- additional_properties: hash)
405
+ additional_properties: additional_properties)
406
406
  end
407
407
 
408
408
  def to_custom_created_at
@@ -434,5 +434,45 @@ module AdvancedBilling
434
434
 
435
435
  true
436
436
  end
437
+
438
+ # Provides a human-readable string representation of the object.
439
+ def to_s
440
+ class_name = self.class.name.split('::').last
441
+ "<#{class_name} first_name: #{@first_name}, last_name: #{@last_name}, email: #{@email},"\
442
+ " cc_emails: #{@cc_emails}, organization: #{@organization}, reference: #{@reference}, id:"\
443
+ " #{@id}, created_at: #{@created_at}, updated_at: #{@updated_at}, address: #{@address},"\
444
+ " address_2: #{@address_2}, city: #{@city}, state: #{@state}, state_name: #{@state_name},"\
445
+ " zip: #{@zip}, country: #{@country}, country_name: #{@country_name}, phone: #{@phone},"\
446
+ " verified: #{@verified}, portal_customer_created_at: #{@portal_customer_created_at},"\
447
+ " portal_invite_last_sent_at: #{@portal_invite_last_sent_at},"\
448
+ " portal_invite_last_accepted_at: #{@portal_invite_last_accepted_at}, tax_exempt:"\
449
+ " #{@tax_exempt}, vat_number: #{@vat_number}, parent_id: #{@parent_id}, locale: #{@locale},"\
450
+ " default_subscription_group_uid: #{@default_subscription_group_uid}, salesforce_id:"\
451
+ " #{@salesforce_id}, tax_exempt_reason: #{@tax_exempt_reason},"\
452
+ " default_auto_renewal_profile_id: #{@default_auto_renewal_profile_id},"\
453
+ " additional_properties: #{get_additional_properties}>"
454
+ end
455
+
456
+ # Provides a debugging-friendly string with detailed object information.
457
+ def inspect
458
+ class_name = self.class.name.split('::').last
459
+ "<#{class_name} first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\
460
+ " email: #{@email.inspect}, cc_emails: #{@cc_emails.inspect}, organization:"\
461
+ " #{@organization.inspect}, reference: #{@reference.inspect}, id: #{@id.inspect},"\
462
+ " created_at: #{@created_at.inspect}, updated_at: #{@updated_at.inspect}, address:"\
463
+ " #{@address.inspect}, address_2: #{@address_2.inspect}, city: #{@city.inspect}, state:"\
464
+ " #{@state.inspect}, state_name: #{@state_name.inspect}, zip: #{@zip.inspect}, country:"\
465
+ " #{@country.inspect}, country_name: #{@country_name.inspect}, phone: #{@phone.inspect},"\
466
+ " verified: #{@verified.inspect}, portal_customer_created_at:"\
467
+ " #{@portal_customer_created_at.inspect}, portal_invite_last_sent_at:"\
468
+ " #{@portal_invite_last_sent_at.inspect}, portal_invite_last_accepted_at:"\
469
+ " #{@portal_invite_last_accepted_at.inspect}, tax_exempt: #{@tax_exempt.inspect},"\
470
+ " vat_number: #{@vat_number.inspect}, parent_id: #{@parent_id.inspect}, locale:"\
471
+ " #{@locale.inspect}, default_subscription_group_uid:"\
472
+ " #{@default_subscription_group_uid.inspect}, salesforce_id: #{@salesforce_id.inspect},"\
473
+ " tax_exempt_reason: #{@tax_exempt_reason.inspect}, default_auto_renewal_profile_id:"\
474
+ " #{@default_auto_renewal_profile_id.inspect}, additional_properties:"\
475
+ " #{get_additional_properties}>"
476
+ end
437
477
  end
438
478
  end
@@ -180,6 +180,11 @@ module AdvancedBilling
180
180
  parent_id: SKIP, salesforce_id: SKIP,
181
181
  default_auto_renewal_profile_id: SKIP,
182
182
  additional_properties: {})
183
+ # Add additional model properties to the instance.
184
+ additional_properties.each do |_name, _value|
185
+ instance_variable_set("@#{_name}", _value)
186
+ end
187
+
183
188
  @first_name = first_name unless first_name == SKIP
184
189
  @last_name = last_name unless last_name == SKIP
185
190
  @email = email unless email == SKIP
@@ -203,11 +208,6 @@ module AdvancedBilling
203
208
  @default_auto_renewal_profile_id =
204
209
  default_auto_renewal_profile_id
205
210
  end
206
-
207
- # Add additional model properties to the instance.
208
- additional_properties.each do |_name, _value|
209
- instance_variable_set("@#{_name}", _value)
210
- end
211
211
  end
212
212
 
213
213
  # Creates an instance of the object from a hash.
@@ -238,7 +238,7 @@ module AdvancedBilling
238
238
  hash.key?('default_auto_renewal_profile_id') ? hash['default_auto_renewal_profile_id'] : SKIP
239
239
 
240
240
  # Clean out expected properties from Hash.
241
- names.each_value { |k| hash.delete(k) }
241
+ additional_properties = hash.reject { |k, _| names.value?(k) }
242
242
 
243
243
  # Create object from extracted values.
244
244
  CustomerAttributes.new(first_name: first_name,
@@ -261,7 +261,7 @@ module AdvancedBilling
261
261
  parent_id: parent_id,
262
262
  salesforce_id: salesforce_id,
263
263
  default_auto_renewal_profile_id: default_auto_renewal_profile_id,
264
- additional_properties: hash)
264
+ additional_properties: additional_properties)
265
265
  end
266
266
 
267
267
  # Validates an instance of the object from a given value.
@@ -273,5 +273,32 @@ module AdvancedBilling
273
273
 
274
274
  true
275
275
  end
276
+
277
+ # Provides a human-readable string representation of the object.
278
+ def to_s
279
+ class_name = self.class.name.split('::').last
280
+ "<#{class_name} first_name: #{@first_name}, last_name: #{@last_name}, email: #{@email},"\
281
+ " cc_emails: #{@cc_emails}, organization: #{@organization}, reference: #{@reference},"\
282
+ " address: #{@address}, address_2: #{@address_2}, city: #{@city}, state: #{@state}, zip:"\
283
+ " #{@zip}, country: #{@country}, phone: #{@phone}, verified: #{@verified}, tax_exempt:"\
284
+ " #{@tax_exempt}, vat_number: #{@vat_number}, metafields: #{@metafields}, parent_id:"\
285
+ " #{@parent_id}, salesforce_id: #{@salesforce_id}, default_auto_renewal_profile_id:"\
286
+ " #{@default_auto_renewal_profile_id}, additional_properties: #{get_additional_properties}>"
287
+ end
288
+
289
+ # Provides a debugging-friendly string with detailed object information.
290
+ def inspect
291
+ class_name = self.class.name.split('::').last
292
+ "<#{class_name} first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\
293
+ " email: #{@email.inspect}, cc_emails: #{@cc_emails.inspect}, organization:"\
294
+ " #{@organization.inspect}, reference: #{@reference.inspect}, address: #{@address.inspect},"\
295
+ " address_2: #{@address_2.inspect}, city: #{@city.inspect}, state: #{@state.inspect}, zip:"\
296
+ " #{@zip.inspect}, country: #{@country.inspect}, phone: #{@phone.inspect}, verified:"\
297
+ " #{@verified.inspect}, tax_exempt: #{@tax_exempt.inspect}, vat_number:"\
298
+ " #{@vat_number.inspect}, metafields: #{@metafields.inspect}, parent_id:"\
299
+ " #{@parent_id.inspect}, salesforce_id: #{@salesforce_id.inspect},"\
300
+ " default_auto_renewal_profile_id: #{@default_auto_renewal_profile_id.inspect},"\
301
+ " additional_properties: #{get_additional_properties}>"
302
+ end
276
303
  end
277
304
  end
@@ -57,15 +57,15 @@ module AdvancedBilling
57
57
 
58
58
  def initialize(payer: SKIP, shipping_address: SKIP, billing_address: SKIP,
59
59
  custom_fields: SKIP, additional_properties: {})
60
- @payer = payer unless payer == SKIP
61
- @shipping_address = shipping_address unless shipping_address == SKIP
62
- @billing_address = billing_address unless billing_address == SKIP
63
- @custom_fields = custom_fields unless custom_fields == SKIP
64
-
65
60
  # Add additional model properties to the instance.
66
61
  additional_properties.each do |_name, _value|
67
62
  instance_variable_set("@#{_name}", _value)
68
63
  end
64
+
65
+ @payer = payer unless payer == SKIP
66
+ @shipping_address = shipping_address unless shipping_address == SKIP
67
+ @billing_address = billing_address unless billing_address == SKIP
68
+ @custom_fields = custom_fields unless custom_fields == SKIP
69
69
  end
70
70
 
71
71
  # Creates an instance of the object from a hash.
@@ -82,14 +82,30 @@ module AdvancedBilling
82
82
  hash['custom_fields']
83
83
 
84
84
  # Clean out expected properties from Hash.
85
- names.each_value { |k| hash.delete(k) }
85
+ additional_properties = hash.reject { |k, _| names.value?(k) }
86
86
 
87
87
  # Create object from extracted values.
88
88
  CustomerChange.new(payer: payer,
89
89
  shipping_address: shipping_address,
90
90
  billing_address: billing_address,
91
91
  custom_fields: custom_fields,
92
- additional_properties: hash)
92
+ additional_properties: additional_properties)
93
+ end
94
+
95
+ # Provides a human-readable string representation of the object.
96
+ def to_s
97
+ class_name = self.class.name.split('::').last
98
+ "<#{class_name} payer: #{@payer}, shipping_address: #{@shipping_address}, billing_address:"\
99
+ " #{@billing_address}, custom_fields: #{@custom_fields}, additional_properties:"\
100
+ " #{get_additional_properties}>"
101
+ end
102
+
103
+ # Provides a debugging-friendly string with detailed object information.
104
+ def inspect
105
+ class_name = self.class.name.split('::').last
106
+ "<#{class_name} payer: #{@payer.inspect}, shipping_address: #{@shipping_address.inspect},"\
107
+ " billing_address: #{@billing_address.inspect}, custom_fields: #{@custom_fields.inspect},"\
108
+ " additional_properties: #{get_additional_properties}>"
93
109
  end
94
110
  end
95
111
  end
@@ -31,12 +31,12 @@ module AdvancedBilling
31
31
  end
32
32
 
33
33
  def initialize(changes:, additional_properties: {})
34
- @changes = changes
35
-
36
34
  # Add additional model properties to the instance.
37
35
  additional_properties.each do |_name, _value|
38
36
  instance_variable_set("@#{_name}", _value)
39
37
  end
38
+
39
+ @changes = changes
40
40
  end
41
41
 
42
42
  # Creates an instance of the object from a hash.
@@ -47,11 +47,24 @@ module AdvancedBilling
47
47
  changes = CustomerChange.from_hash(hash['changes']) if hash['changes']
48
48
 
49
49
  # Clean out expected properties from Hash.
50
- names.each_value { |k| hash.delete(k) }
50
+ additional_properties = hash.reject { |k, _| names.value?(k) }
51
51
 
52
52
  # Create object from extracted values.
53
53
  CustomerChangesPreviewResponse.new(changes: changes,
54
- additional_properties: hash)
54
+ additional_properties: additional_properties)
55
+ end
56
+
57
+ # Provides a human-readable string representation of the object.
58
+ def to_s
59
+ class_name = self.class.name.split('::').last
60
+ "<#{class_name} changes: #{@changes}, additional_properties: #{get_additional_properties}>"
61
+ end
62
+
63
+ # Provides a debugging-friendly string with detailed object information.
64
+ def inspect
65
+ class_name = self.class.name.split('::').last
66
+ "<#{class_name} changes: #{@changes.inspect}, additional_properties:"\
67
+ " #{get_additional_properties}>"
55
68
  end
56
69
  end
57
70
  end
@@ -36,13 +36,13 @@ module AdvancedBilling
36
36
  end
37
37
 
38
38
  def initialize(before:, after:, additional_properties: {})
39
- @before = before
40
- @after = after
41
-
42
39
  # Add additional model properties to the instance.
43
40
  additional_properties.each do |_name, _value|
44
41
  instance_variable_set("@#{_name}", _value)
45
42
  end
43
+
44
+ @before = before
45
+ @after = after
46
46
  end
47
47
 
48
48
  # Creates an instance of the object from a hash.
@@ -72,12 +72,26 @@ module AdvancedBilling
72
72
  after = nil unless hash.key?('after')
73
73
 
74
74
  # Clean out expected properties from Hash.
75
- names.each_value { |k| hash.delete(k) }
75
+ additional_properties = hash.reject { |k, _| names.value?(k) }
76
76
 
77
77
  # Create object from extracted values.
78
78
  CustomerCustomFieldsChange.new(before: before,
79
79
  after: after,
80
- additional_properties: hash)
80
+ additional_properties: additional_properties)
81
+ end
82
+
83
+ # Provides a human-readable string representation of the object.
84
+ def to_s
85
+ class_name = self.class.name.split('::').last
86
+ "<#{class_name} before: #{@before}, after: #{@after}, additional_properties:"\
87
+ " #{get_additional_properties}>"
88
+ end
89
+
90
+ # Provides a debugging-friendly string with detailed object information.
91
+ def inspect
92
+ class_name = self.class.name.split('::').last
93
+ "<#{class_name} before: #{@before.inspect}, after: #{@after.inspect},"\
94
+ " additional_properties: #{get_additional_properties}>"
81
95
  end
82
96
  end
83
97
  end
@@ -33,12 +33,12 @@ module AdvancedBilling
33
33
  end
34
34
 
35
35
  def initialize(customer: SKIP, additional_properties: {})
36
- @customer = customer unless customer == SKIP
37
-
38
36
  # Add additional model properties to the instance.
39
37
  additional_properties.each do |_name, _value|
40
38
  instance_variable_set("@#{_name}", _value)
41
39
  end
40
+
41
+ @customer = customer unless customer == SKIP
42
42
  end
43
43
 
44
44
  # Creates an instance of the object from a hash.
@@ -49,11 +49,11 @@ module AdvancedBilling
49
49
  customer = hash.key?('customer') ? hash['customer'] : SKIP
50
50
 
51
51
  # Clean out expected properties from Hash.
52
- names.each_value { |k| hash.delete(k) }
52
+ additional_properties = hash.reject { |k, _| names.value?(k) }
53
53
 
54
54
  # Create object from extracted values.
55
55
  CustomerError.new(customer: customer,
56
- additional_properties: hash)
56
+ additional_properties: additional_properties)
57
57
  end
58
58
 
59
59
  # Validates an instance of the object from a given value.
@@ -65,5 +65,19 @@ module AdvancedBilling
65
65
 
66
66
  true
67
67
  end
68
+
69
+ # Provides a human-readable string representation of the object.
70
+ def to_s
71
+ class_name = self.class.name.split('::').last
72
+ "<#{class_name} customer: #{@customer}, additional_properties:"\
73
+ " #{get_additional_properties}>"
74
+ end
75
+
76
+ # Provides a debugging-friendly string with detailed object information.
77
+ def inspect
78
+ class_name = self.class.name.split('::').last
79
+ "<#{class_name} customer: #{@customer.inspect}, additional_properties:"\
80
+ " #{get_additional_properties}>"
81
+ end
68
82
  end
69
83
  end
@@ -36,13 +36,13 @@ module AdvancedBilling
36
36
  end
37
37
 
38
38
  def initialize(before:, after:, additional_properties: {})
39
- @before = before
40
- @after = after
41
-
42
39
  # Add additional model properties to the instance.
43
40
  additional_properties.each do |_name, _value|
44
41
  instance_variable_set("@#{_name}", _value)
45
42
  end
43
+
44
+ @before = before
45
+ @after = after
46
46
  end
47
47
 
48
48
  # Creates an instance of the object from a hash.
@@ -54,12 +54,26 @@ module AdvancedBilling
54
54
  after = InvoicePayerChange.from_hash(hash['after']) if hash['after']
55
55
 
56
56
  # Clean out expected properties from Hash.
57
- names.each_value { |k| hash.delete(k) }
57
+ additional_properties = hash.reject { |k, _| names.value?(k) }
58
58
 
59
59
  # Create object from extracted values.
60
60
  CustomerPayerChange.new(before: before,
61
61
  after: after,
62
- additional_properties: hash)
62
+ additional_properties: additional_properties)
63
+ end
64
+
65
+ # Provides a human-readable string representation of the object.
66
+ def to_s
67
+ class_name = self.class.name.split('::').last
68
+ "<#{class_name} before: #{@before}, after: #{@after}, additional_properties:"\
69
+ " #{get_additional_properties}>"
70
+ end
71
+
72
+ # Provides a debugging-friendly string with detailed object information.
73
+ def inspect
74
+ class_name = self.class.name.split('::').last
75
+ "<#{class_name} before: #{@before.inspect}, after: #{@after.inspect},"\
76
+ " additional_properties: #{get_additional_properties}>"
63
77
  end
64
78
  end
65
79
  end
@@ -31,12 +31,12 @@ module AdvancedBilling
31
31
  end
32
32
 
33
33
  def initialize(customer:, additional_properties: {})
34
- @customer = customer
35
-
36
34
  # Add additional model properties to the instance.
37
35
  additional_properties.each do |_name, _value|
38
36
  instance_variable_set("@#{_name}", _value)
39
37
  end
38
+
39
+ @customer = customer
40
40
  end
41
41
 
42
42
  # Creates an instance of the object from a hash.
@@ -47,11 +47,25 @@ module AdvancedBilling
47
47
  customer = Customer.from_hash(hash['customer']) if hash['customer']
48
48
 
49
49
  # Clean out expected properties from Hash.
50
- names.each_value { |k| hash.delete(k) }
50
+ additional_properties = hash.reject { |k, _| names.value?(k) }
51
51
 
52
52
  # Create object from extracted values.
53
53
  CustomerResponse.new(customer: customer,
54
- additional_properties: hash)
54
+ additional_properties: additional_properties)
55
+ end
56
+
57
+ # Provides a human-readable string representation of the object.
58
+ def to_s
59
+ class_name = self.class.name.split('::').last
60
+ "<#{class_name} customer: #{@customer}, additional_properties:"\
61
+ " #{get_additional_properties}>"
62
+ end
63
+
64
+ # Provides a debugging-friendly string with detailed object information.
65
+ def inspect
66
+ class_name = self.class.name.split('::').last
67
+ "<#{class_name} customer: #{@customer.inspect}, additional_properties:"\
68
+ " #{get_additional_properties}>"
55
69
  end
56
70
  end
57
71
  end