maxio-advanced-billing-sdk 3.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (491) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +42 -41
  3. data/lib/advanced_billing/client.rb +7 -1
  4. data/lib/advanced_billing/configuration.rb +1 -1
  5. data/lib/advanced_billing/controllers/base_controller.rb +1 -1
  6. data/lib/advanced_billing/controllers/component_price_points_controller.rb +420 -0
  7. data/lib/advanced_billing/controllers/components_controller.rb +0 -347
  8. data/lib/advanced_billing/controllers/product_families_controller.rb +2 -2
  9. data/lib/advanced_billing/controllers/product_price_points_controller.rb +16 -9
  10. data/lib/advanced_billing/controllers/products_controller.rb +2 -2
  11. data/lib/advanced_billing/models/account_balance.rb +6 -8
  12. data/lib/advanced_billing/models/account_balances.rb +9 -12
  13. data/lib/advanced_billing/models/ach_agreement.rb +8 -10
  14. data/lib/advanced_billing/models/activate_subscription_request.rb +3 -4
  15. data/lib/advanced_billing/models/add_coupons_request.rb +3 -4
  16. data/lib/advanced_billing/models/add_subscription_to_a_group.rb +3 -4
  17. data/lib/advanced_billing/models/address_change.rb +4 -6
  18. data/lib/advanced_billing/models/agreement_acceptance.rb +10 -14
  19. data/lib/advanced_billing/models/allocate_components.rb +14 -18
  20. data/lib/advanced_billing/models/allocation.rb +39 -52
  21. data/lib/advanced_billing/models/allocation_expiration_date.rb +3 -4
  22. data/lib/advanced_billing/models/allocation_preview.rb +20 -28
  23. data/lib/advanced_billing/models/allocation_preview_item.rb +28 -38
  24. data/lib/advanced_billing/models/allocation_preview_line_item.rb +15 -20
  25. data/lib/advanced_billing/models/allocation_preview_response.rb +3 -4
  26. data/lib/advanced_billing/models/allocation_response.rb +3 -4
  27. data/lib/advanced_billing/models/allocation_settings.rb +6 -8
  28. data/lib/advanced_billing/models/applied_credit_note_data.rb +4 -6
  29. data/lib/advanced_billing/models/apply_credit_note_event.rb +9 -12
  30. data/lib/advanced_billing/models/apply_credit_note_event_data.rb +15 -22
  31. data/lib/advanced_billing/models/apply_debit_note_event.rb +9 -12
  32. data/lib/advanced_billing/models/apply_debit_note_event_data.rb +10 -14
  33. data/lib/advanced_billing/models/apply_payment_event.rb +9 -12
  34. data/lib/advanced_billing/models/apply_payment_event_data.rb +17 -24
  35. data/lib/advanced_billing/models/attribute_error.rb +3 -4
  36. data/lib/advanced_billing/models/auto_resume.rb +3 -4
  37. data/lib/advanced_billing/models/backport_invoice_event.rb +9 -12
  38. data/lib/advanced_billing/models/bank_account_attributes.rb +19 -26
  39. data/lib/advanced_billing/models/bank_account_payment_profile.rb +34 -46
  40. data/lib/advanced_billing/models/bank_account_response.rb +3 -4
  41. data/lib/advanced_billing/models/bank_account_verification.rb +5 -6
  42. data/lib/advanced_billing/models/bank_account_verification_request.rb +3 -4
  43. data/lib/advanced_billing/models/base_refund_error.rb +3 -4
  44. data/lib/advanced_billing/models/base_string_error.rb +3 -4
  45. data/lib/advanced_billing/models/batch_job.rb +8 -12
  46. data/lib/advanced_billing/models/batch_job_response.rb +3 -4
  47. data/lib/advanced_billing/models/billing_manifest.rb +15 -20
  48. data/lib/advanced_billing/models/billing_manifest_item.rb +22 -30
  49. data/lib/advanced_billing/models/billing_schedule.rb +3 -4
  50. data/lib/advanced_billing/models/breakouts.rb +8 -10
  51. data/lib/advanced_billing/models/bulk_components_price_point_assignment.rb +3 -4
  52. data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +3 -4
  53. data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +3 -4
  54. data/lib/advanced_billing/models/bulk_create_segments.rb +3 -4
  55. data/lib/advanced_billing/models/bulk_update_segments.rb +3 -4
  56. data/lib/advanced_billing/models/bulk_update_segments_item.rb +5 -8
  57. data/lib/advanced_billing/models/calendar_billing.rb +5 -6
  58. data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +3 -4
  59. data/lib/advanced_billing/models/cancellation_options.rb +5 -6
  60. data/lib/advanced_billing/models/cancellation_request.rb +3 -4
  61. data/lib/advanced_billing/models/change_chargeback_status_event.rb +9 -12
  62. data/lib/advanced_billing/models/change_chargeback_status_event_data.rb +3 -4
  63. data/lib/advanced_billing/models/change_invoice_collection_method_event.rb +11 -12
  64. data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +5 -6
  65. data/lib/advanced_billing/models/change_invoice_status_event.rb +9 -12
  66. data/lib/advanced_billing/models/change_invoice_status_event_data.rb +9 -12
  67. data/lib/advanced_billing/models/chargify_ebb.rb +10 -14
  68. data/lib/advanced_billing/models/component.rb +49 -70
  69. data/lib/advanced_billing/models/component_allocation_change.rb +11 -16
  70. data/lib/advanced_billing/models/component_allocation_error_item.rb +7 -10
  71. data/lib/advanced_billing/models/component_cost_data.rb +11 -16
  72. data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +9 -12
  73. data/lib/advanced_billing/models/component_currency_price.rb +10 -14
  74. data/lib/advanced_billing/models/component_currency_prices_response.rb +3 -4
  75. data/lib/advanced_billing/models/component_custom_price.rb +7 -10
  76. data/lib/advanced_billing/models/component_price.rb +13 -18
  77. data/lib/advanced_billing/models/component_price_point.rb +25 -36
  78. data/lib/advanced_billing/models/component_price_point_assignment.rb +5 -6
  79. data/lib/advanced_billing/models/component_price_point_error_item.rb +6 -8
  80. data/lib/advanced_billing/models/component_price_point_item.rb +10 -14
  81. data/lib/advanced_billing/models/component_price_point_response.rb +3 -4
  82. data/lib/advanced_billing/models/component_price_points_response.rb +4 -6
  83. data/lib/advanced_billing/models/component_response.rb +3 -4
  84. data/lib/advanced_billing/models/consolidated_invoice.rb +3 -4
  85. data/lib/advanced_billing/models/count_response.rb +3 -4
  86. data/lib/advanced_billing/models/coupon.rb +45 -62
  87. data/lib/advanced_billing/models/coupon_currency.rb +7 -10
  88. data/lib/advanced_billing/models/coupon_currency_request.rb +3 -4
  89. data/lib/advanced_billing/models/coupon_currency_response.rb +3 -4
  90. data/lib/advanced_billing/models/coupon_response.rb +3 -4
  91. data/lib/advanced_billing/models/coupon_restriction.rb +8 -12
  92. data/lib/advanced_billing/models/coupon_subcodes.rb +3 -4
  93. data/lib/advanced_billing/models/coupon_subcodes_response.rb +6 -8
  94. data/lib/advanced_billing/models/coupon_usage.rb +11 -16
  95. data/lib/advanced_billing/models/create_allocation.rb +18 -24
  96. data/lib/advanced_billing/models/create_allocation_request.rb +3 -4
  97. data/lib/advanced_billing/models/create_component_price_point.rb +13 -18
  98. data/lib/advanced_billing/models/create_component_price_point_request.rb +3 -4
  99. data/lib/advanced_billing/models/create_component_price_points_request.rb +3 -4
  100. data/lib/advanced_billing/models/create_credit_note_event.rb +9 -12
  101. data/lib/advanced_billing/models/create_currency_price.rb +6 -8
  102. data/lib/advanced_billing/models/create_currency_prices_request.rb +3 -4
  103. data/lib/advanced_billing/models/create_customer.rb +25 -38
  104. data/lib/advanced_billing/models/create_customer_request.rb +3 -4
  105. data/lib/advanced_billing/models/create_debit_note_event.rb +9 -12
  106. data/lib/advanced_billing/models/create_ebb_component.rb +3 -4
  107. data/lib/advanced_billing/models/create_invoice.rb +15 -22
  108. data/lib/advanced_billing/models/create_invoice_address.rb +13 -20
  109. data/lib/advanced_billing/models/create_invoice_coupon.rb +10 -14
  110. data/lib/advanced_billing/models/create_invoice_item.rb +18 -26
  111. data/lib/advanced_billing/models/create_invoice_payment.rb +8 -12
  112. data/lib/advanced_billing/models/create_invoice_payment_application.rb +4 -6
  113. data/lib/advanced_billing/models/create_invoice_payment_request.rb +4 -6
  114. data/lib/advanced_billing/models/create_invoice_request.rb +3 -4
  115. data/lib/advanced_billing/models/create_metadata.rb +4 -6
  116. data/lib/advanced_billing/models/create_metadata_request.rb +3 -4
  117. data/lib/advanced_billing/models/create_metafield.rb +7 -10
  118. data/lib/advanced_billing/models/create_metafields_request.rb +3 -4
  119. data/lib/advanced_billing/models/create_metered_component.rb +3 -4
  120. data/lib/advanced_billing/models/create_multi_invoice_payment.rb +9 -14
  121. data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +3 -4
  122. data/lib/advanced_billing/models/create_offer.rb +11 -16
  123. data/lib/advanced_billing/models/create_offer_component.rb +6 -8
  124. data/lib/advanced_billing/models/create_offer_request.rb +3 -4
  125. data/lib/advanced_billing/models/create_on_off_component.rb +3 -4
  126. data/lib/advanced_billing/models/create_or_update_coupon.rb +6 -8
  127. data/lib/advanced_billing/models/create_or_update_endpoint.rb +4 -6
  128. data/lib/advanced_billing/models/create_or_update_endpoint_request.rb +3 -4
  129. data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +22 -28
  130. data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +22 -28
  131. data/lib/advanced_billing/models/create_or_update_product.rb +25 -34
  132. data/lib/advanced_billing/models/create_or_update_product_request.rb +3 -4
  133. data/lib/advanced_billing/models/create_or_update_segment_price.rb +6 -8
  134. data/lib/advanced_billing/models/create_payment.rb +7 -10
  135. data/lib/advanced_billing/models/create_payment_profile.rb +47 -66
  136. data/lib/advanced_billing/models/create_payment_profile_request.rb +3 -4
  137. data/lib/advanced_billing/models/create_prepaid_component.rb +3 -4
  138. data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +16 -22
  139. data/lib/advanced_billing/models/create_prepayment.rb +8 -12
  140. data/lib/advanced_billing/models/create_prepayment_request.rb +3 -4
  141. data/lib/advanced_billing/models/create_prepayment_response.rb +3 -4
  142. data/lib/advanced_billing/models/create_product_currency_price.rb +5 -8
  143. data/lib/advanced_billing/models/create_product_currency_prices_request.rb +3 -4
  144. data/lib/advanced_billing/models/create_product_family.rb +6 -8
  145. data/lib/advanced_billing/models/create_product_family_request.rb +3 -4
  146. data/lib/advanced_billing/models/create_product_price_point.rb +22 -30
  147. data/lib/advanced_billing/models/create_product_price_point_request.rb +3 -4
  148. data/lib/advanced_billing/models/create_quantity_based_component.rb +3 -4
  149. data/lib/advanced_billing/models/create_reason_code.rb +6 -8
  150. data/lib/advanced_billing/models/create_reason_code_request.rb +3 -4
  151. data/lib/advanced_billing/models/create_segment.rb +12 -14
  152. data/lib/advanced_billing/models/create_segment_request.rb +3 -4
  153. data/lib/advanced_billing/models/create_subscription.rb +78 -100
  154. data/lib/advanced_billing/models/create_subscription_component.rb +12 -16
  155. data/lib/advanced_billing/models/create_subscription_group.rb +5 -6
  156. data/lib/advanced_billing/models/create_subscription_group_request.rb +3 -4
  157. data/lib/advanced_billing/models/create_subscription_request.rb +3 -4
  158. data/lib/advanced_billing/models/create_usage.rb +7 -10
  159. data/lib/advanced_billing/models/create_usage_request.rb +3 -4
  160. data/lib/advanced_billing/models/created_prepayment.rb +12 -16
  161. data/lib/advanced_billing/models/credit_account_balance_changed.rb +9 -12
  162. data/lib/advanced_billing/models/credit_card_attributes.rb +6 -8
  163. data/lib/advanced_billing/models/credit_card_payment_profile.rb +33 -46
  164. data/lib/advanced_billing/models/credit_note.rb +38 -56
  165. data/lib/advanced_billing/models/credit_note_application.rb +8 -12
  166. data/lib/advanced_billing/models/credit_note_line_item.rb +27 -38
  167. data/lib/advanced_billing/models/credit_scheme_request.rb +3 -4
  168. data/lib/advanced_billing/models/currency_price.rb +10 -14
  169. data/lib/advanced_billing/models/currency_prices_response.rb +3 -4
  170. data/lib/advanced_billing/models/custom_field_value_change.rb +11 -16
  171. data/lib/advanced_billing/models/customer.rb +39 -56
  172. data/lib/advanced_billing/models/customer_attributes.rb +25 -38
  173. data/lib/advanced_billing/models/customer_change.rb +7 -10
  174. data/lib/advanced_billing/models/customer_changes_preview_response.rb +3 -4
  175. data/lib/advanced_billing/models/customer_custom_fields_change.rb +4 -6
  176. data/lib/advanced_billing/models/customer_error.rb +3 -4
  177. data/lib/advanced_billing/models/customer_payer_change.rb +4 -6
  178. data/lib/advanced_billing/models/customer_response.rb +3 -4
  179. data/lib/advanced_billing/models/debit_note.rb +33 -48
  180. data/lib/advanced_billing/models/deduct_service_credit.rb +4 -6
  181. data/lib/advanced_billing/models/deduct_service_credit_request.rb +3 -4
  182. data/lib/advanced_billing/models/delayed_cancellation_response.rb +3 -4
  183. data/lib/advanced_billing/models/delete_subscription_group_response.rb +4 -6
  184. data/lib/advanced_billing/models/dunner_data.rb +10 -14
  185. data/lib/advanced_billing/models/dunning_step_data.rb +12 -18
  186. data/lib/advanced_billing/models/dunning_step_reached.rb +6 -8
  187. data/lib/advanced_billing/models/ebb_component.rb +26 -36
  188. data/lib/advanced_billing/models/ebb_event.rb +3 -4
  189. data/lib/advanced_billing/models/enable_webhooks_request.rb +3 -4
  190. data/lib/advanced_billing/models/enable_webhooks_response.rb +3 -4
  191. data/lib/advanced_billing/models/endpoint.rb +8 -12
  192. data/lib/advanced_billing/models/endpoint_response.rb +3 -4
  193. data/lib/advanced_billing/models/errors.rb +4 -6
  194. data/lib/advanced_billing/models/event.rb +10 -16
  195. data/lib/advanced_billing/models/event_based_billing_segment_error.rb +3 -4
  196. data/lib/advanced_billing/models/event_response.rb +3 -4
  197. data/lib/advanced_billing/models/failed_payment_event.rb +9 -12
  198. data/lib/advanced_billing/models/failed_payment_event_data.rb +8 -12
  199. data/lib/advanced_billing/models/full_subscription_group_response.rb +19 -26
  200. data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +30 -44
  201. data/lib/advanced_billing/models/get_one_time_token_request.rb +3 -4
  202. data/lib/advanced_billing/models/group_billing.rb +6 -8
  203. data/lib/advanced_billing/models/group_settings.rb +4 -6
  204. data/lib/advanced_billing/models/group_target.rb +4 -6
  205. data/lib/advanced_billing/models/historic_usage.rb +6 -8
  206. data/lib/advanced_billing/models/invoice.rb +74 -106
  207. data/lib/advanced_billing/models/invoice_address.rb +9 -14
  208. data/lib/advanced_billing/models/invoice_balance_item.rb +6 -8
  209. data/lib/advanced_billing/models/invoice_credit.rb +11 -16
  210. data/lib/advanced_billing/models/invoice_custom_field.rb +8 -12
  211. data/lib/advanced_billing/models/invoice_customer.rb +11 -16
  212. data/lib/advanced_billing/models/invoice_discount.rb +18 -26
  213. data/lib/advanced_billing/models/invoice_discount_breakout.rb +6 -8
  214. data/lib/advanced_billing/models/invoice_display_settings.rb +5 -6
  215. data/lib/advanced_billing/models/invoice_issued.rb +20 -32
  216. data/lib/advanced_billing/models/invoice_line_item.rb +32 -46
  217. data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +3 -4
  218. data/lib/advanced_billing/models/invoice_line_item_event_data.rb +30 -42
  219. data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +4 -6
  220. data/lib/advanced_billing/models/invoice_payer.rb +10 -14
  221. data/lib/advanced_billing/models/invoice_payer_change.rb +7 -10
  222. data/lib/advanced_billing/models/invoice_payment.rb +16 -22
  223. data/lib/advanced_billing/models/invoice_payment_application.rb +6 -8
  224. data/lib/advanced_billing/models/invoice_payment_method.rb +12 -18
  225. data/lib/advanced_billing/models/invoice_pre_payment.rb +6 -8
  226. data/lib/advanced_billing/models/invoice_previous_balance.rb +4 -6
  227. data/lib/advanced_billing/models/invoice_refund.rb +13 -18
  228. data/lib/advanced_billing/models/invoice_response.rb +3 -4
  229. data/lib/advanced_billing/models/invoice_seller.rb +7 -10
  230. data/lib/advanced_billing/models/invoice_tax.rb +17 -24
  231. data/lib/advanced_billing/models/invoice_tax_breakout.rb +7 -10
  232. data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +7 -10
  233. data/lib/advanced_billing/models/issue_advance_invoice_request.rb +3 -4
  234. data/lib/advanced_billing/models/issue_invoice_event.rb +9 -12
  235. data/lib/advanced_billing/models/issue_invoice_event_data.rb +8 -12
  236. data/lib/advanced_billing/models/issue_invoice_request.rb +4 -4
  237. data/lib/advanced_billing/models/issue_service_credit.rb +4 -6
  238. data/lib/advanced_billing/models/issue_service_credit_request.rb +3 -4
  239. data/lib/advanced_billing/models/item_price_point_changed.rb +10 -14
  240. data/lib/advanced_billing/models/item_price_point_data.rb +6 -8
  241. data/lib/advanced_billing/models/list_components_filter.rb +5 -6
  242. data/lib/advanced_billing/models/list_components_price_points_response.rb +3 -4
  243. data/lib/advanced_billing/models/list_coupons_filter.rb +13 -18
  244. data/lib/advanced_billing/models/list_credit_notes_response.rb +3 -4
  245. data/lib/advanced_billing/models/list_invoice_events_response.rb +7 -10
  246. data/lib/advanced_billing/models/list_invoices_response.rb +3 -4
  247. data/lib/advanced_billing/models/list_metafields_response.rb +8 -12
  248. data/lib/advanced_billing/models/list_mrr_filter.rb +3 -4
  249. data/lib/advanced_billing/models/list_mrr_response.rb +3 -4
  250. data/lib/advanced_billing/models/list_mrr_response_result.rb +11 -16
  251. data/lib/advanced_billing/models/list_offers_response.rb +3 -4
  252. data/lib/advanced_billing/models/list_prepayments_filter.rb +6 -8
  253. data/lib/advanced_billing/models/list_price_points_filter.rb +12 -18
  254. data/lib/advanced_billing/models/list_product_price_points_response.rb +3 -4
  255. data/lib/advanced_billing/models/list_products_filter.rb +5 -6
  256. data/lib/advanced_billing/models/list_proforma_invoices_meta.rb +7 -10
  257. data/lib/advanced_billing/models/list_proforma_invoices_response.rb +5 -6
  258. data/lib/advanced_billing/models/list_public_keys_meta.rb +7 -10
  259. data/lib/advanced_billing/models/list_public_keys_response.rb +5 -6
  260. data/lib/advanced_billing/models/list_sale_rep_item.rb +8 -12
  261. data/lib/advanced_billing/models/list_segments_filter.rb +9 -10
  262. data/lib/advanced_billing/models/list_segments_response.rb +3 -4
  263. data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +15 -20
  264. data/lib/advanced_billing/models/list_subscription_components_filter.rb +5 -6
  265. data/lib/advanced_billing/models/list_subscription_components_for_site_filter.rb +6 -8
  266. data/lib/advanced_billing/models/list_subscription_components_response.rb +3 -4
  267. data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +3 -4
  268. data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +3 -4
  269. data/lib/advanced_billing/models/list_subscription_groups_item.rb +18 -24
  270. data/lib/advanced_billing/models/list_subscription_groups_meta.rb +5 -6
  271. data/lib/advanced_billing/models/list_subscription_groups_response.rb +5 -6
  272. data/lib/advanced_billing/models/metadata.rb +10 -14
  273. data/lib/advanced_billing/models/metafield.rb +9 -14
  274. data/lib/advanced_billing/models/metafield_scope.rb +11 -16
  275. data/lib/advanced_billing/models/metered_component.rb +29 -40
  276. data/lib/advanced_billing/models/metered_usage.rb +10 -14
  277. data/lib/advanced_billing/models/movement.rb +14 -20
  278. data/lib/advanced_billing/models/movement_line_item.rb +14 -20
  279. data/lib/advanced_billing/models/mrr.rb +10 -14
  280. data/lib/advanced_billing/models/mrr_movement.rb +7 -10
  281. data/lib/advanced_billing/models/mrr_response.rb +3 -4
  282. data/lib/advanced_billing/models/multi_invoice_payment.rb +8 -10
  283. data/lib/advanced_billing/models/multi_invoice_payment_response.rb +3 -4
  284. data/lib/advanced_billing/models/nested_subscription_group.rb +7 -10
  285. data/lib/advanced_billing/models/net_terms.rb +10 -12
  286. data/lib/advanced_billing/models/offer.rb +28 -40
  287. data/lib/advanced_billing/models/offer_discount.rb +6 -8
  288. data/lib/advanced_billing/models/offer_item.rb +17 -22
  289. data/lib/advanced_billing/models/offer_response.rb +3 -4
  290. data/lib/advanced_billing/models/offer_signup_page.rb +9 -14
  291. data/lib/advanced_billing/models/on_off_component.rb +26 -36
  292. data/lib/advanced_billing/models/organization_address.rb +12 -18
  293. data/lib/advanced_billing/models/origin_invoice.rb +4 -6
  294. data/lib/advanced_billing/models/overage_pricing.rb +4 -6
  295. data/lib/advanced_billing/models/override_subscription.rb +9 -12
  296. data/lib/advanced_billing/models/override_subscription_request.rb +3 -4
  297. data/lib/advanced_billing/models/paginated_metadata.rb +8 -12
  298. data/lib/advanced_billing/models/paid_invoice.rb +7 -10
  299. data/lib/advanced_billing/models/pause_request.rb +3 -4
  300. data/lib/advanced_billing/models/payer_attributes.rb +25 -38
  301. data/lib/advanced_billing/models/payer_error.rb +6 -8
  302. data/lib/advanced_billing/models/payment_collection_method_changed.rb +4 -6
  303. data/lib/advanced_billing/models/payment_for_allocation.rb +7 -10
  304. data/lib/advanced_billing/models/payment_method_apple_pay.rb +3 -4
  305. data/lib/advanced_billing/models/payment_method_bank_account.rb +6 -8
  306. data/lib/advanced_billing/models/payment_method_credit_card.rb +9 -12
  307. data/lib/advanced_billing/models/payment_method_external.rb +6 -10
  308. data/lib/advanced_billing/models/payment_method_paypal.rb +4 -6
  309. data/lib/advanced_billing/models/payment_profile_attributes.rb +37 -52
  310. data/lib/advanced_billing/models/payment_profile_response.rb +3 -4
  311. data/lib/advanced_billing/models/payment_related_events.rb +5 -6
  312. data/lib/advanced_billing/models/pending_cancellation_change.rb +4 -6
  313. data/lib/advanced_billing/models/portal_management_link.rb +10 -14
  314. data/lib/advanced_billing/models/prepaid_component_price_point.rb +8 -12
  315. data/lib/advanced_billing/models/prepaid_configuration.rb +10 -12
  316. data/lib/advanced_billing/models/prepaid_configuration_response.rb +3 -4
  317. data/lib/advanced_billing/models/prepaid_product_price_point_filter.rb +2 -2
  318. data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +8 -10
  319. data/lib/advanced_billing/models/prepaid_usage.rb +16 -22
  320. data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +6 -8
  321. data/lib/advanced_billing/models/prepaid_usage_component.rb +33 -46
  322. data/lib/advanced_billing/models/prepayment.rb +15 -22
  323. data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +8 -10
  324. data/lib/advanced_billing/models/prepayment_response.rb +3 -4
  325. data/lib/advanced_billing/models/prepayments_response.rb +3 -4
  326. data/lib/advanced_billing/models/preview_allocations_request.rb +8 -10
  327. data/lib/advanced_billing/models/price.rb +6 -8
  328. data/lib/advanced_billing/models/product.rb +56 -76
  329. data/lib/advanced_billing/models/product_family.rb +11 -16
  330. data/lib/advanced_billing/models/product_family_response.rb +3 -4
  331. data/lib/advanced_billing/models/product_price_point.rb +36 -50
  332. data/lib/advanced_billing/models/product_price_point_errors.rb +10 -14
  333. data/lib/advanced_billing/models/product_price_point_response.rb +3 -4
  334. data/lib/advanced_billing/models/product_response.rb +3 -4
  335. data/lib/advanced_billing/models/proforma_error.rb +3 -4
  336. data/lib/advanced_billing/models/proforma_invoice.rb +51 -74
  337. data/lib/advanced_billing/models/proforma_invoice_credit.rb +7 -10
  338. data/lib/advanced_billing/models/proforma_invoice_discount.rb +13 -18
  339. data/lib/advanced_billing/models/proforma_invoice_issued.rb +15 -24
  340. data/lib/advanced_billing/models/proforma_invoice_payment.rb +7 -10
  341. data/lib/advanced_billing/models/proforma_invoice_tax.rb +11 -16
  342. data/lib/advanced_billing/models/proration.rb +3 -4
  343. data/lib/advanced_billing/models/public_key.rb +6 -8
  344. data/lib/advanced_billing/models/public_signup_page.rb +7 -10
  345. data/lib/advanced_billing/models/quantity_based_component.rb +30 -42
  346. data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +5 -6
  347. data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +15 -20
  348. data/lib/advanced_billing/models/reactivate_subscription_request.rb +11 -14
  349. data/lib/advanced_billing/models/reactivation_billing.rb +4 -4
  350. data/lib/advanced_billing/models/reason_code.rb +11 -16
  351. data/lib/advanced_billing/models/reason_code_response.rb +3 -4
  352. data/lib/advanced_billing/models/reason_codes_json_response.rb +3 -4
  353. data/lib/advanced_billing/models/record_payment_request.rb +3 -4
  354. data/lib/advanced_billing/models/record_payment_response.rb +5 -6
  355. data/lib/advanced_billing/models/referral_code.rb +7 -10
  356. data/lib/advanced_billing/models/referral_validation_response.rb +3 -4
  357. data/lib/advanced_billing/models/refund_consolidated_invoice.rb +9 -14
  358. data/lib/advanced_billing/models/refund_invoice.rb +10 -14
  359. data/lib/advanced_billing/models/refund_invoice_event.rb +9 -12
  360. data/lib/advanced_billing/models/refund_invoice_event_data.rb +14 -20
  361. data/lib/advanced_billing/models/refund_invoice_request.rb +3 -4
  362. data/lib/advanced_billing/models/refund_prepayment.rb +7 -10
  363. data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +3 -4
  364. data/lib/advanced_billing/models/refund_prepayment_request.rb +3 -4
  365. data/lib/advanced_billing/models/refund_success.rb +6 -8
  366. data/lib/advanced_billing/models/remove_payment_event.rb +9 -12
  367. data/lib/advanced_billing/models/remove_payment_event_data.rb +11 -16
  368. data/lib/advanced_billing/models/renewal_preview.rb +15 -20
  369. data/lib/advanced_billing/models/renewal_preview_component.rb +6 -8
  370. data/lib/advanced_billing/models/renewal_preview_line_item.rb +22 -30
  371. data/lib/advanced_billing/models/renewal_preview_request.rb +3 -4
  372. data/lib/advanced_billing/models/renewal_preview_response.rb +3 -4
  373. data/lib/advanced_billing/models/replay_webhooks_request.rb +3 -4
  374. data/lib/advanced_billing/models/replay_webhooks_response.rb +3 -4
  375. data/lib/advanced_billing/models/resent_invitation.rb +8 -10
  376. data/lib/advanced_billing/models/resume_options.rb +5 -6
  377. data/lib/advanced_billing/models/revoked_invitation.rb +6 -8
  378. data/lib/advanced_billing/models/sale_rep.rb +9 -12
  379. data/lib/advanced_billing/models/sale_rep_item_mrr.rb +6 -8
  380. data/lib/advanced_billing/models/sale_rep_settings.rb +11 -16
  381. data/lib/advanced_billing/models/sale_rep_subscription.rb +15 -22
  382. data/lib/advanced_billing/models/segment.rb +20 -26
  383. data/lib/advanced_billing/models/segment_price.rb +13 -18
  384. data/lib/advanced_billing/models/segment_response.rb +3 -4
  385. data/lib/advanced_billing/models/send_invoice_request.rb +6 -8
  386. data/lib/advanced_billing/models/service_credit.rb +9 -12
  387. data/lib/advanced_billing/models/service_credit_response.rb +3 -4
  388. data/lib/advanced_billing/models/signup_proforma_preview.rb +5 -6
  389. data/lib/advanced_billing/models/signup_proforma_preview_response.rb +3 -4
  390. data/lib/advanced_billing/models/site.rb +25 -34
  391. data/lib/advanced_billing/models/site_response.rb +3 -4
  392. data/lib/advanced_billing/models/site_statistics.rb +20 -24
  393. data/lib/advanced_billing/models/site_summary.rb +8 -12
  394. data/lib/advanced_billing/models/subscription.rb +94 -126
  395. data/lib/advanced_billing/models/subscription_component.rb +48 -66
  396. data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +4 -6
  397. data/lib/advanced_billing/models/subscription_component_response.rb +3 -4
  398. data/lib/advanced_billing/models/subscription_component_subscription.rb +4 -6
  399. data/lib/advanced_billing/models/subscription_custom_price.rb +21 -28
  400. data/lib/advanced_billing/models/subscription_filter.rb +10 -14
  401. data/lib/advanced_billing/models/subscription_group.rb +9 -12
  402. data/lib/advanced_billing/models/subscription_group_balances.rb +8 -10
  403. data/lib/advanced_billing/models/subscription_group_bank_account.rb +26 -34
  404. data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +6 -8
  405. data/lib/advanced_billing/models/subscription_group_credit_card.rb +30 -42
  406. data/lib/advanced_billing/models/subscription_group_customer.rb +8 -12
  407. data/lib/advanced_billing/models/subscription_group_item.rb +16 -22
  408. data/lib/advanced_billing/models/subscription_group_member_error.rb +6 -8
  409. data/lib/advanced_billing/models/subscription_group_members_array_error.rb +3 -4
  410. data/lib/advanced_billing/models/subscription_group_payment_profile.rb +7 -10
  411. data/lib/advanced_billing/models/subscription_group_prepayment.rb +6 -10
  412. data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +3 -4
  413. data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +9 -12
  414. data/lib/advanced_billing/models/subscription_group_response.rb +3 -4
  415. data/lib/advanced_billing/models/subscription_group_signup.rb +13 -18
  416. data/lib/advanced_billing/models/subscription_group_signup_component.rb +9 -12
  417. data/lib/advanced_billing/models/subscription_group_signup_error.rb +10 -14
  418. data/lib/advanced_billing/models/subscription_group_signup_failure.rb +4 -6
  419. data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +14 -18
  420. data/lib/advanced_billing/models/subscription_group_signup_item.rb +21 -28
  421. data/lib/advanced_billing/models/subscription_group_signup_request.rb +3 -4
  422. data/lib/advanced_billing/models/subscription_group_signup_response.rb +18 -24
  423. data/lib/advanced_billing/models/subscription_group_signup_success.rb +4 -6
  424. data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +14 -20
  425. data/lib/advanced_billing/models/subscription_group_single_error.rb +3 -4
  426. data/lib/advanced_billing/models/subscription_group_subscription_error.rb +14 -18
  427. data/lib/advanced_billing/models/subscription_group_update_error.rb +3 -4
  428. data/lib/advanced_billing/models/subscription_included_coupon.rb +11 -16
  429. data/lib/advanced_billing/models/subscription_migration_preview.rb +8 -10
  430. data/lib/advanced_billing/models/subscription_migration_preview_options.rb +17 -22
  431. data/lib/advanced_billing/models/subscription_migration_preview_request.rb +3 -4
  432. data/lib/advanced_billing/models/subscription_migration_preview_response.rb +3 -4
  433. data/lib/advanced_billing/models/subscription_mrr.rb +6 -8
  434. data/lib/advanced_billing/models/subscription_mrr_breakout.rb +5 -6
  435. data/lib/advanced_billing/models/subscription_mrr_response.rb +3 -4
  436. data/lib/advanced_billing/models/subscription_note.rb +10 -14
  437. data/lib/advanced_billing/models/subscription_note_response.rb +3 -4
  438. data/lib/advanced_billing/models/subscription_preview.rb +5 -6
  439. data/lib/advanced_billing/models/subscription_preview_response.rb +3 -4
  440. data/lib/advanced_billing/models/subscription_product_change.rb +5 -6
  441. data/lib/advanced_billing/models/subscription_product_migration.rb +15 -20
  442. data/lib/advanced_billing/models/subscription_product_migration_request.rb +3 -4
  443. data/lib/advanced_billing/models/subscription_response.rb +3 -4
  444. data/lib/advanced_billing/models/subscription_state_change.rb +5 -6
  445. data/lib/advanced_billing/models/tax_configuration.rb +7 -8
  446. data/lib/advanced_billing/models/too_many_management_link_requests.rb +4 -6
  447. data/lib/advanced_billing/models/update_allocation_expiration_date.rb +3 -4
  448. data/lib/advanced_billing/models/update_component.rb +14 -20
  449. data/lib/advanced_billing/models/update_component_price_point.rb +13 -18
  450. data/lib/advanced_billing/models/update_component_price_point_request.rb +3 -4
  451. data/lib/advanced_billing/models/update_component_request.rb +3 -4
  452. data/lib/advanced_billing/models/update_coupon_currency.rb +4 -6
  453. data/lib/advanced_billing/models/update_currency_price.rb +4 -6
  454. data/lib/advanced_billing/models/update_currency_prices_request.rb +3 -4
  455. data/lib/advanced_billing/models/update_customer.rb +26 -40
  456. data/lib/advanced_billing/models/update_customer_request.rb +3 -4
  457. data/lib/advanced_billing/models/update_metadata.rb +6 -8
  458. data/lib/advanced_billing/models/update_metadata_request.rb +3 -4
  459. data/lib/advanced_billing/models/update_metafield.rb +8 -12
  460. data/lib/advanced_billing/models/update_metafields_request.rb +3 -4
  461. data/lib/advanced_billing/models/update_payment_profile.rb +21 -28
  462. data/lib/advanced_billing/models/update_payment_profile_request.rb +3 -4
  463. data/lib/advanced_billing/models/update_price.rb +9 -12
  464. data/lib/advanced_billing/models/update_product_price_point.rb +5 -6
  465. data/lib/advanced_billing/models/update_product_price_point_request.rb +3 -4
  466. data/lib/advanced_billing/models/update_reason_code.rb +6 -8
  467. data/lib/advanced_billing/models/update_reason_code_request.rb +3 -4
  468. data/lib/advanced_billing/models/update_segment.rb +4 -6
  469. data/lib/advanced_billing/models/update_segment_request.rb +3 -4
  470. data/lib/advanced_billing/models/update_subscription.rb +29 -36
  471. data/lib/advanced_billing/models/update_subscription_component.rb +5 -6
  472. data/lib/advanced_billing/models/update_subscription_group.rb +3 -4
  473. data/lib/advanced_billing/models/update_subscription_group_request.rb +3 -4
  474. data/lib/advanced_billing/models/update_subscription_note.rb +4 -6
  475. data/lib/advanced_billing/models/update_subscription_note_request.rb +3 -4
  476. data/lib/advanced_billing/models/update_subscription_request.rb +3 -4
  477. data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +9 -10
  478. data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +3 -4
  479. data/lib/advanced_billing/models/usage.rb +14 -20
  480. data/lib/advanced_billing/models/usage_response.rb +3 -4
  481. data/lib/advanced_billing/models/void_invoice.rb +3 -4
  482. data/lib/advanced_billing/models/void_invoice_event.rb +9 -12
  483. data/lib/advanced_billing/models/void_invoice_event_data.rb +10 -14
  484. data/lib/advanced_billing/models/void_invoice_request.rb +3 -4
  485. data/lib/advanced_billing/models/void_remainder_event.rb +9 -12
  486. data/lib/advanced_billing/models/void_remainder_event_data.rb +7 -10
  487. data/lib/advanced_billing/models/webhook.rb +18 -26
  488. data/lib/advanced_billing/models/webhook_response.rb +3 -4
  489. data/lib/advanced_billing/utilities/union_type_lookup.rb +42 -0
  490. data/lib/advanced_billing.rb +2 -0
  491. metadata +3 -2
@@ -72,13 +72,9 @@ module AdvancedBilling
72
72
  []
73
73
  end
74
74
 
75
- def initialize(ip_address = SKIP,
76
- terms_url = SKIP,
77
- privacy_policy_url = SKIP,
78
- return_refund_policy_url = SKIP,
79
- delivery_policy_url = SKIP,
80
- secure_checkout_policy_url = SKIP,
81
- additional_properties = {})
75
+ def initialize(ip_address: SKIP, terms_url: SKIP, privacy_policy_url: SKIP,
76
+ return_refund_policy_url: SKIP, delivery_policy_url: SKIP,
77
+ secure_checkout_policy_url: SKIP, additional_properties: {})
82
78
  @ip_address = ip_address unless ip_address == SKIP
83
79
  @terms_url = terms_url unless terms_url == SKIP
84
80
  @privacy_policy_url = privacy_policy_url unless privacy_policy_url == SKIP
@@ -115,13 +111,13 @@ module AdvancedBilling
115
111
  names.each_value { |k| hash.delete(k) }
116
112
 
117
113
  # Create object from extracted values.
118
- AgreementAcceptance.new(ip_address,
119
- terms_url,
120
- privacy_policy_url,
121
- return_refund_policy_url,
122
- delivery_policy_url,
123
- secure_checkout_policy_url,
124
- hash)
114
+ AgreementAcceptance.new(ip_address: ip_address,
115
+ terms_url: terms_url,
116
+ privacy_policy_url: privacy_policy_url,
117
+ return_refund_policy_url: return_refund_policy_url,
118
+ delivery_policy_url: delivery_policy_url,
119
+ secure_checkout_policy_url: secure_checkout_policy_url,
120
+ additional_properties: hash)
125
121
  end
126
122
 
127
123
  # Validates an instance of the object from a given value.
@@ -84,15 +84,11 @@ module AdvancedBilling
84
84
  ]
85
85
  end
86
86
 
87
- def initialize(proration_upgrade_scheme = SKIP,
88
- proration_downgrade_scheme = SKIP,
89
- allocations = SKIP,
90
- accrue_charge = SKIP,
91
- upgrade_charge = SKIP,
92
- downgrade_credit = SKIP,
93
- payment_collection_method = SKIP,
94
- initiate_dunning = SKIP,
95
- additional_properties = {})
87
+ def initialize(proration_upgrade_scheme: SKIP,
88
+ proration_downgrade_scheme: SKIP, allocations: SKIP,
89
+ accrue_charge: SKIP, upgrade_charge: SKIP,
90
+ downgrade_credit: SKIP, payment_collection_method: SKIP,
91
+ initiate_dunning: SKIP, additional_properties: {})
96
92
  @proration_upgrade_scheme = proration_upgrade_scheme unless proration_upgrade_scheme == SKIP
97
93
  unless proration_downgrade_scheme == SKIP
98
94
  @proration_downgrade_scheme =
@@ -147,15 +143,15 @@ module AdvancedBilling
147
143
  names.each_value { |k| hash.delete(k) }
148
144
 
149
145
  # Create object from extracted values.
150
- AllocateComponents.new(proration_upgrade_scheme,
151
- proration_downgrade_scheme,
152
- allocations,
153
- accrue_charge,
154
- upgrade_charge,
155
- downgrade_credit,
156
- payment_collection_method,
157
- initiate_dunning,
158
- hash)
146
+ AllocateComponents.new(proration_upgrade_scheme: proration_upgrade_scheme,
147
+ proration_downgrade_scheme: proration_downgrade_scheme,
148
+ allocations: allocations,
149
+ accrue_charge: accrue_charge,
150
+ upgrade_charge: upgrade_charge,
151
+ downgrade_credit: downgrade_credit,
152
+ payment_collection_method: payment_collection_method,
153
+ initiate_dunning: initiate_dunning,
154
+ additional_properties: hash)
159
155
  end
160
156
  end
161
157
  end
@@ -216,32 +216,19 @@ module AdvancedBilling
216
216
  ]
217
217
  end
218
218
 
219
- def initialize(allocation_id = SKIP,
220
- component_id = SKIP,
221
- component_handle = SKIP,
222
- subscription_id = SKIP,
223
- quantity = SKIP,
224
- previous_quantity = SKIP,
225
- memo = SKIP,
226
- timestamp = SKIP,
227
- created_at = SKIP,
228
- proration_upgrade_scheme = SKIP,
229
- proration_downgrade_scheme = SKIP,
230
- price_point_id = SKIP,
231
- price_point_name = SKIP,
232
- price_point_handle = SKIP,
233
- interval = SKIP,
234
- interval_unit = SKIP,
235
- previous_price_point_id = SKIP,
236
- accrue_charge = SKIP,
237
- initiate_dunning = SKIP,
238
- upgrade_charge = SKIP,
239
- downgrade_credit = SKIP,
240
- payment = SKIP,
241
- expires_at = SKIP,
242
- used_quantity = SKIP,
243
- charge_id = SKIP,
244
- additional_properties = {})
219
+ def initialize(allocation_id: SKIP, component_id: SKIP,
220
+ component_handle: SKIP, subscription_id: SKIP,
221
+ quantity: SKIP, previous_quantity: SKIP, memo: SKIP,
222
+ timestamp: SKIP, created_at: SKIP,
223
+ proration_upgrade_scheme: SKIP,
224
+ proration_downgrade_scheme: SKIP, price_point_id: SKIP,
225
+ price_point_name: SKIP, price_point_handle: SKIP,
226
+ interval: SKIP, interval_unit: SKIP,
227
+ previous_price_point_id: SKIP, accrue_charge: SKIP,
228
+ initiate_dunning: SKIP, upgrade_charge: SKIP,
229
+ downgrade_credit: SKIP, payment: SKIP, expires_at: SKIP,
230
+ used_quantity: SKIP, charge_id: SKIP,
231
+ additional_properties: {})
245
232
  @allocation_id = allocation_id unless allocation_id == SKIP
246
233
  @component_id = component_id unless component_id == SKIP
247
234
  @component_handle = component_handle unless component_handle == SKIP
@@ -339,32 +326,32 @@ module AdvancedBilling
339
326
  names.each_value { |k| hash.delete(k) }
340
327
 
341
328
  # Create object from extracted values.
342
- Allocation.new(allocation_id,
343
- component_id,
344
- component_handle,
345
- subscription_id,
346
- quantity,
347
- previous_quantity,
348
- memo,
349
- timestamp,
350
- created_at,
351
- proration_upgrade_scheme,
352
- proration_downgrade_scheme,
353
- price_point_id,
354
- price_point_name,
355
- price_point_handle,
356
- interval,
357
- interval_unit,
358
- previous_price_point_id,
359
- accrue_charge,
360
- initiate_dunning,
361
- upgrade_charge,
362
- downgrade_credit,
363
- payment,
364
- expires_at,
365
- used_quantity,
366
- charge_id,
367
- hash)
329
+ Allocation.new(allocation_id: allocation_id,
330
+ component_id: component_id,
331
+ component_handle: component_handle,
332
+ subscription_id: subscription_id,
333
+ quantity: quantity,
334
+ previous_quantity: previous_quantity,
335
+ memo: memo,
336
+ timestamp: timestamp,
337
+ created_at: created_at,
338
+ proration_upgrade_scheme: proration_upgrade_scheme,
339
+ proration_downgrade_scheme: proration_downgrade_scheme,
340
+ price_point_id: price_point_id,
341
+ price_point_name: price_point_name,
342
+ price_point_handle: price_point_handle,
343
+ interval: interval,
344
+ interval_unit: interval_unit,
345
+ previous_price_point_id: previous_price_point_id,
346
+ accrue_charge: accrue_charge,
347
+ initiate_dunning: initiate_dunning,
348
+ upgrade_charge: upgrade_charge,
349
+ downgrade_credit: downgrade_credit,
350
+ payment: payment,
351
+ expires_at: expires_at,
352
+ used_quantity: used_quantity,
353
+ charge_id: charge_id,
354
+ additional_properties: hash)
368
355
  end
369
356
 
370
357
  def to_custom_timestamp
@@ -33,8 +33,7 @@ module AdvancedBilling
33
33
  []
34
34
  end
35
35
 
36
- def initialize(expires_at = SKIP,
37
- additional_properties = {})
36
+ def initialize(expires_at: SKIP, additional_properties: {})
38
37
  @expires_at = expires_at unless expires_at == SKIP
39
38
 
40
39
  # Add additional model properties to the instance.
@@ -58,8 +57,8 @@ module AdvancedBilling
58
57
  names.each_value { |k| hash.delete(k) }
59
58
 
60
59
  # Create object from extracted values.
61
- AllocationExpirationDate.new(expires_at,
62
- hash)
60
+ AllocationExpirationDate.new(expires_at: expires_at,
61
+ additional_properties: hash)
63
62
  end
64
63
 
65
64
  def to_custom_expires_at
@@ -105,20 +105,12 @@ module AdvancedBilling
105
105
  []
106
106
  end
107
107
 
108
- def initialize(start_date = SKIP,
109
- end_date = SKIP,
110
- subtotal_in_cents = SKIP,
111
- total_tax_in_cents = SKIP,
112
- total_discount_in_cents = SKIP,
113
- total_in_cents = SKIP,
114
- direction = SKIP,
115
- proration_scheme = SKIP,
116
- line_items = SKIP,
117
- accrue_charge = SKIP,
118
- allocations = SKIP,
119
- period_type = SKIP,
120
- existing_balance_in_cents = SKIP,
121
- additional_properties = {})
108
+ def initialize(start_date: SKIP, end_date: SKIP, subtotal_in_cents: SKIP,
109
+ total_tax_in_cents: SKIP, total_discount_in_cents: SKIP,
110
+ total_in_cents: SKIP, direction: SKIP,
111
+ proration_scheme: SKIP, line_items: SKIP,
112
+ accrue_charge: SKIP, allocations: SKIP, period_type: SKIP,
113
+ existing_balance_in_cents: SKIP, additional_properties: {})
122
114
  @start_date = start_date unless start_date == SKIP
123
115
  @end_date = end_date unless end_date == SKIP
124
116
  @subtotal_in_cents = subtotal_in_cents unless subtotal_in_cents == SKIP
@@ -197,20 +189,20 @@ module AdvancedBilling
197
189
  names.each_value { |k| hash.delete(k) }
198
190
 
199
191
  # Create object from extracted values.
200
- AllocationPreview.new(start_date,
201
- end_date,
202
- subtotal_in_cents,
203
- total_tax_in_cents,
204
- total_discount_in_cents,
205
- total_in_cents,
206
- direction,
207
- proration_scheme,
208
- line_items,
209
- accrue_charge,
210
- allocations,
211
- period_type,
212
- existing_balance_in_cents,
213
- hash)
192
+ AllocationPreview.new(start_date: start_date,
193
+ end_date: end_date,
194
+ subtotal_in_cents: subtotal_in_cents,
195
+ total_tax_in_cents: total_tax_in_cents,
196
+ total_discount_in_cents: total_discount_in_cents,
197
+ total_in_cents: total_in_cents,
198
+ direction: direction,
199
+ proration_scheme: proration_scheme,
200
+ line_items: line_items,
201
+ accrue_charge: accrue_charge,
202
+ allocations: allocations,
203
+ period_type: period_type,
204
+ existing_balance_in_cents: existing_balance_in_cents,
205
+ additional_properties: hash)
214
206
  end
215
207
 
216
208
  def to_custom_start_date
@@ -159,25 +159,15 @@ module AdvancedBilling
159
159
  ]
160
160
  end
161
161
 
162
- def initialize(component_id = SKIP,
163
- subscription_id = SKIP,
164
- quantity = SKIP,
165
- previous_quantity = SKIP,
166
- memo = SKIP,
167
- timestamp = SKIP,
168
- proration_upgrade_scheme = SKIP,
169
- proration_downgrade_scheme = SKIP,
170
- accrue_charge = SKIP,
171
- upgrade_charge = SKIP,
172
- downgrade_credit = SKIP,
173
- price_point_id = SKIP,
174
- interval = SKIP,
175
- interval_unit = SKIP,
176
- previous_price_point_id = SKIP,
177
- price_point_handle = SKIP,
178
- price_point_name = SKIP,
179
- component_handle = SKIP,
180
- additional_properties = {})
162
+ def initialize(component_id: SKIP, subscription_id: SKIP, quantity: SKIP,
163
+ previous_quantity: SKIP, memo: SKIP, timestamp: SKIP,
164
+ proration_upgrade_scheme: SKIP,
165
+ proration_downgrade_scheme: SKIP, accrue_charge: SKIP,
166
+ upgrade_charge: SKIP, downgrade_credit: SKIP,
167
+ price_point_id: SKIP, interval: SKIP, interval_unit: SKIP,
168
+ previous_price_point_id: SKIP, price_point_handle: SKIP,
169
+ price_point_name: SKIP, component_handle: SKIP,
170
+ additional_properties: {})
181
171
  @component_id = component_id unless component_id == SKIP
182
172
  @subscription_id = subscription_id unless subscription_id == SKIP
183
173
  @quantity = quantity unless quantity == SKIP
@@ -248,25 +238,25 @@ module AdvancedBilling
248
238
  names.each_value { |k| hash.delete(k) }
249
239
 
250
240
  # Create object from extracted values.
251
- AllocationPreviewItem.new(component_id,
252
- subscription_id,
253
- quantity,
254
- previous_quantity,
255
- memo,
256
- timestamp,
257
- proration_upgrade_scheme,
258
- proration_downgrade_scheme,
259
- accrue_charge,
260
- upgrade_charge,
261
- downgrade_credit,
262
- price_point_id,
263
- interval,
264
- interval_unit,
265
- previous_price_point_id,
266
- price_point_handle,
267
- price_point_name,
268
- component_handle,
269
- hash)
241
+ AllocationPreviewItem.new(component_id: component_id,
242
+ subscription_id: subscription_id,
243
+ quantity: quantity,
244
+ previous_quantity: previous_quantity,
245
+ memo: memo,
246
+ timestamp: timestamp,
247
+ proration_upgrade_scheme: proration_upgrade_scheme,
248
+ proration_downgrade_scheme: proration_downgrade_scheme,
249
+ accrue_charge: accrue_charge,
250
+ upgrade_charge: upgrade_charge,
251
+ downgrade_credit: downgrade_credit,
252
+ price_point_id: price_point_id,
253
+ interval: interval,
254
+ interval_unit: interval_unit,
255
+ previous_price_point_id: previous_price_point_id,
256
+ price_point_handle: price_point_handle,
257
+ price_point_name: price_point_name,
258
+ component_handle: component_handle,
259
+ additional_properties: hash)
270
260
  end
271
261
 
272
262
  # Validates an instance of the object from a given value.
@@ -80,16 +80,11 @@ module AdvancedBilling
80
80
  []
81
81
  end
82
82
 
83
- def initialize(transaction_type = SKIP,
84
- kind = SKIP,
85
- amount_in_cents = SKIP,
86
- memo = SKIP,
87
- discount_amount_in_cents = SKIP,
88
- taxable_amount_in_cents = SKIP,
89
- component_id = SKIP,
90
- component_handle = SKIP,
91
- direction = SKIP,
92
- additional_properties = {})
83
+ def initialize(transaction_type: SKIP, kind: SKIP, amount_in_cents: SKIP,
84
+ memo: SKIP, discount_amount_in_cents: SKIP,
85
+ taxable_amount_in_cents: SKIP, component_id: SKIP,
86
+ component_handle: SKIP, direction: SKIP,
87
+ additional_properties: {})
93
88
  @transaction_type = transaction_type unless transaction_type == SKIP
94
89
  @kind = kind unless kind == SKIP
95
90
  @amount_in_cents = amount_in_cents unless amount_in_cents == SKIP
@@ -130,16 +125,16 @@ module AdvancedBilling
130
125
  names.each_value { |k| hash.delete(k) }
131
126
 
132
127
  # Create object from extracted values.
133
- AllocationPreviewLineItem.new(transaction_type,
134
- kind,
135
- amount_in_cents,
136
- memo,
137
- discount_amount_in_cents,
138
- taxable_amount_in_cents,
139
- component_id,
140
- component_handle,
141
- direction,
142
- hash)
128
+ AllocationPreviewLineItem.new(transaction_type: transaction_type,
129
+ kind: kind,
130
+ amount_in_cents: amount_in_cents,
131
+ memo: memo,
132
+ discount_amount_in_cents: discount_amount_in_cents,
133
+ taxable_amount_in_cents: taxable_amount_in_cents,
134
+ component_id: component_id,
135
+ component_handle: component_handle,
136
+ direction: direction,
137
+ additional_properties: hash)
143
138
  end
144
139
  end
145
140
  end
@@ -30,8 +30,7 @@ module AdvancedBilling
30
30
  []
31
31
  end
32
32
 
33
- def initialize(allocation_preview = nil,
34
- additional_properties = {})
33
+ def initialize(allocation_preview:, additional_properties: {})
35
34
  @allocation_preview = allocation_preview
36
35
 
37
36
  # Add additional model properties to the instance.
@@ -52,8 +51,8 @@ module AdvancedBilling
52
51
  names.each_value { |k| hash.delete(k) }
53
52
 
54
53
  # Create object from extracted values.
55
- AllocationPreviewResponse.new(allocation_preview,
56
- hash)
54
+ AllocationPreviewResponse.new(allocation_preview: allocation_preview,
55
+ additional_properties: hash)
57
56
  end
58
57
  end
59
58
  end
@@ -32,8 +32,7 @@ module AdvancedBilling
32
32
  []
33
33
  end
34
34
 
35
- def initialize(allocation = SKIP,
36
- additional_properties = {})
35
+ def initialize(allocation: SKIP, additional_properties: {})
37
36
  @allocation = allocation unless allocation == SKIP
38
37
 
39
38
  # Add additional model properties to the instance.
@@ -53,8 +52,8 @@ module AdvancedBilling
53
52
  names.each_value { |k| hash.delete(k) }
54
53
 
55
54
  # Create object from extracted values.
56
- AllocationResponse.new(allocation,
57
- hash)
55
+ AllocationResponse.new(allocation: allocation,
56
+ additional_properties: hash)
58
57
  end
59
58
  end
60
59
  end
@@ -51,10 +51,8 @@ module AdvancedBilling
51
51
  ]
52
52
  end
53
53
 
54
- def initialize(upgrade_charge = SKIP,
55
- downgrade_credit = SKIP,
56
- accrue_charge = SKIP,
57
- additional_properties = {})
54
+ def initialize(upgrade_charge: SKIP, downgrade_credit: SKIP,
55
+ accrue_charge: SKIP, additional_properties: {})
58
56
  @upgrade_charge = upgrade_charge unless upgrade_charge == SKIP
59
57
  @downgrade_credit = downgrade_credit unless downgrade_credit == SKIP
60
58
  @accrue_charge = accrue_charge unless accrue_charge == SKIP
@@ -80,10 +78,10 @@ module AdvancedBilling
80
78
  names.each_value { |k| hash.delete(k) }
81
79
 
82
80
  # Create object from extracted values.
83
- AllocationSettings.new(upgrade_charge,
84
- downgrade_credit,
85
- accrue_charge,
86
- hash)
81
+ AllocationSettings.new(upgrade_charge: upgrade_charge,
82
+ downgrade_credit: downgrade_credit,
83
+ accrue_charge: accrue_charge,
84
+ additional_properties: hash)
87
85
  end
88
86
  end
89
87
  end
@@ -38,9 +38,7 @@ module AdvancedBilling
38
38
  []
39
39
  end
40
40
 
41
- def initialize(uid = SKIP,
42
- number = SKIP,
43
- additional_properties = {})
41
+ def initialize(uid: SKIP, number: SKIP, additional_properties: {})
44
42
  @uid = uid unless uid == SKIP
45
43
  @number = number unless number == SKIP
46
44
 
@@ -62,9 +60,9 @@ module AdvancedBilling
62
60
  names.each_value { |k| hash.delete(k) }
63
61
 
64
62
  # Create object from extracted values.
65
- AppliedCreditNoteData.new(uid,
66
- number,
67
- hash)
63
+ AppliedCreditNoteData.new(uid: uid,
64
+ number: number,
65
+ additional_properties: hash)
68
66
  end
69
67
 
70
68
  # Validates an instance of the object from a given value.
@@ -51,12 +51,9 @@ module AdvancedBilling
51
51
  []
52
52
  end
53
53
 
54
- def initialize(id = nil,
55
- timestamp = nil,
56
- invoice = nil,
57
- event_type = InvoiceEventType::APPLY_CREDIT_NOTE,
58
- event_data = nil,
59
- additional_properties = {})
54
+ def initialize(id:, timestamp:, invoice:,
55
+ event_type: InvoiceEventType::APPLY_CREDIT_NOTE, event_data:,
56
+ additional_properties: {})
60
57
  @id = id
61
58
  @timestamp = timestamp
62
59
  @invoice = invoice
@@ -86,12 +83,12 @@ module AdvancedBilling
86
83
  names.each_value { |k| hash.delete(k) }
87
84
 
88
85
  # Create object from extracted values.
89
- ApplyCreditNoteEvent.new(id,
90
- timestamp,
91
- invoice,
92
- event_type,
93
- event_data,
94
- hash)
86
+ ApplyCreditNoteEvent.new(id: id,
87
+ timestamp: timestamp,
88
+ invoice: invoice,
89
+ event_type: event_type,
90
+ event_data: event_data,
91
+ additional_properties: hash)
95
92
  end
96
93
 
97
94
  def to_custom_timestamp
@@ -90,17 +90,10 @@ module AdvancedBilling
90
90
  ]
91
91
  end
92
92
 
93
- def initialize(uid = nil,
94
- credit_note_number = nil,
95
- credit_note_uid = nil,
96
- original_amount = nil,
97
- applied_amount = nil,
98
- transaction_time = SKIP,
99
- memo = SKIP,
100
- role = SKIP,
101
- consolidated_invoice = SKIP,
102
- applied_credit_notes = SKIP,
103
- additional_properties = {})
93
+ def initialize(uid:, credit_note_number:, credit_note_uid:,
94
+ original_amount:, applied_amount:, transaction_time: SKIP,
95
+ memo: SKIP, role: SKIP, consolidated_invoice: SKIP,
96
+ applied_credit_notes: SKIP, additional_properties: {})
104
97
  @uid = uid
105
98
  @credit_note_number = credit_note_number
106
99
  @credit_note_uid = credit_note_uid
@@ -156,17 +149,17 @@ module AdvancedBilling
156
149
  names.each_value { |k| hash.delete(k) }
157
150
 
158
151
  # Create object from extracted values.
159
- ApplyCreditNoteEventData.new(uid,
160
- credit_note_number,
161
- credit_note_uid,
162
- original_amount,
163
- applied_amount,
164
- transaction_time,
165
- memo,
166
- role,
167
- consolidated_invoice,
168
- applied_credit_notes,
169
- hash)
152
+ ApplyCreditNoteEventData.new(uid: uid,
153
+ credit_note_number: credit_note_number,
154
+ credit_note_uid: credit_note_uid,
155
+ original_amount: original_amount,
156
+ applied_amount: applied_amount,
157
+ transaction_time: transaction_time,
158
+ memo: memo,
159
+ role: role,
160
+ consolidated_invoice: consolidated_invoice,
161
+ applied_credit_notes: applied_credit_notes,
162
+ additional_properties: hash)
170
163
  end
171
164
 
172
165
  def to_custom_transaction_time
@@ -51,12 +51,9 @@ module AdvancedBilling
51
51
  []
52
52
  end
53
53
 
54
- def initialize(id = nil,
55
- timestamp = nil,
56
- invoice = nil,
57
- event_type = InvoiceEventType::APPLY_DEBIT_NOTE,
58
- event_data = nil,
59
- additional_properties = {})
54
+ def initialize(id:, timestamp:, invoice:,
55
+ event_type: InvoiceEventType::APPLY_DEBIT_NOTE, event_data:,
56
+ additional_properties: {})
60
57
  @id = id
61
58
  @timestamp = timestamp
62
59
  @invoice = invoice
@@ -86,12 +83,12 @@ module AdvancedBilling
86
83
  names.each_value { |k| hash.delete(k) }
87
84
 
88
85
  # Create object from extracted values.
89
- ApplyDebitNoteEvent.new(id,
90
- timestamp,
91
- invoice,
92
- event_type,
93
- event_data,
94
- hash)
86
+ ApplyDebitNoteEvent.new(id: id,
87
+ timestamp: timestamp,
88
+ invoice: invoice,
89
+ event_type: event_type,
90
+ event_data: event_data,
91
+ additional_properties: hash)
95
92
  end
96
93
 
97
94
  def to_custom_timestamp