maxio-advanced-billing-sdk 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (516) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +59 -297
  3. data/lib/advanced_billing/client.rb +21 -22
  4. data/lib/advanced_billing/configuration.rb +17 -18
  5. data/lib/advanced_billing/controllers/advance_invoice_controller.rb +8 -10
  6. data/lib/advanced_billing/controllers/api_exports_controller.rb +9 -9
  7. data/lib/advanced_billing/controllers/base_controller.rb +2 -1
  8. data/lib/advanced_billing/controllers/billing_portal_controller.rb +4 -4
  9. data/lib/advanced_billing/controllers/components_controller.rb +22 -22
  10. data/lib/advanced_billing/controllers/coupons_controller.rb +14 -14
  11. data/lib/advanced_billing/controllers/custom_fields_controller.rb +9 -9
  12. data/lib/advanced_billing/controllers/customers_controller.rb +7 -7
  13. data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +6 -6
  14. data/lib/advanced_billing/controllers/events_controller.rb +3 -3
  15. data/lib/advanced_billing/controllers/insights_controller.rb +4 -4
  16. data/lib/advanced_billing/controllers/invoices_controller.rb +24 -20
  17. data/lib/advanced_billing/controllers/offers_controller.rb +5 -5
  18. data/lib/advanced_billing/controllers/payment_profiles_controller.rb +12 -12
  19. data/lib/advanced_billing/controllers/product_families_controller.rb +4 -4
  20. data/lib/advanced_billing/controllers/product_price_points_controller.rb +11 -11
  21. data/lib/advanced_billing/controllers/products_controller.rb +6 -6
  22. data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +44 -25
  23. data/lib/advanced_billing/controllers/reason_codes_controller.rb +5 -5
  24. data/lib/advanced_billing/controllers/referral_codes_controller.rb +2 -2
  25. data/lib/advanced_billing/controllers/sales_commissions_controller.rb +3 -3
  26. data/lib/advanced_billing/controllers/sites_controller.rb +3 -3
  27. data/lib/advanced_billing/controllers/subscription_components_controller.rb +37 -31
  28. data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +4 -4
  29. data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +4 -4
  30. data/lib/advanced_billing/controllers/subscription_groups_controller.rb +23 -16
  31. data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +11 -7
  32. data/lib/advanced_billing/controllers/subscription_notes_controller.rb +5 -5
  33. data/lib/advanced_billing/controllers/subscription_products_controller.rb +2 -2
  34. data/lib/advanced_billing/controllers/subscription_status_controller.rb +10 -10
  35. data/lib/advanced_billing/controllers/subscriptions_controller.rb +12 -12
  36. data/lib/advanced_billing/controllers/webhooks_controller.rb +8 -8
  37. data/lib/advanced_billing/exceptions/subscription_group_create_error_response_exception.rb +34 -0
  38. data/lib/advanced_billing/http/auth/basic_auth.rb +27 -6
  39. data/lib/advanced_billing/models/account_balance.rb +44 -3
  40. data/lib/advanced_billing/models/account_balances.rb +24 -2
  41. data/lib/advanced_billing/models/ach_agreement.rb +12 -2
  42. data/lib/advanced_billing/models/activate_subscription_request.rb +12 -2
  43. data/lib/advanced_billing/models/add_coupons_request.rb +12 -2
  44. data/lib/advanced_billing/models/add_subscription_to_a_group.rb +12 -2
  45. data/lib/advanced_billing/models/address_change.rb +12 -2
  46. data/lib/advanced_billing/models/agreement_acceptance.rb +12 -2
  47. data/lib/advanced_billing/models/allocate_components.rb +12 -2
  48. data/lib/advanced_billing/models/allocation.rb +56 -2
  49. data/lib/advanced_billing/models/allocation_expiration_date.rb +23 -4
  50. data/lib/advanced_billing/models/allocation_preview.rb +33 -6
  51. data/lib/advanced_billing/models/allocation_preview_item.rb +12 -2
  52. data/lib/advanced_billing/models/allocation_preview_line_item.rb +12 -2
  53. data/lib/advanced_billing/models/allocation_preview_response.rb +12 -2
  54. data/lib/advanced_billing/models/allocation_response.rb +12 -2
  55. data/lib/advanced_billing/models/allocation_settings.rb +12 -2
  56. data/lib/advanced_billing/models/applied_credit_note_data.rb +12 -2
  57. data/lib/advanced_billing/models/apply_credit_note_event_data.rb +12 -2
  58. data/lib/advanced_billing/models/apply_debit_note_event_data.rb +12 -2
  59. data/lib/advanced_billing/models/apply_payment_event_data.rb +12 -2
  60. data/lib/advanced_billing/models/attribute_error.rb +12 -2
  61. data/lib/advanced_billing/models/auto_resume.rb +12 -2
  62. data/lib/advanced_billing/models/bank_account_attributes.rb +12 -2
  63. data/lib/advanced_billing/models/bank_account_payment_profile.rb +13 -2
  64. data/lib/advanced_billing/models/bank_account_response.rb +12 -2
  65. data/lib/advanced_billing/models/bank_account_verification.rb +12 -2
  66. data/lib/advanced_billing/models/bank_account_verification_request.rb +12 -2
  67. data/lib/advanced_billing/models/base_refund_error.rb +12 -2
  68. data/lib/advanced_billing/models/base_string_error.rb +12 -2
  69. data/lib/advanced_billing/models/batch_job.rb +33 -6
  70. data/lib/advanced_billing/models/batch_job_response.rb +12 -2
  71. data/lib/advanced_billing/models/billing_address.rb +12 -2
  72. data/lib/advanced_billing/models/billing_manifest.rb +33 -6
  73. data/lib/advanced_billing/models/billing_manifest_item.rb +12 -2
  74. data/lib/advanced_billing/models/billing_schedule.rb +12 -2
  75. data/lib/advanced_billing/models/breakouts.rb +12 -2
  76. data/lib/advanced_billing/models/{bulk_component_s_price_point_assignment.rb → bulk_components_price_point_assignment.rb} +16 -6
  77. data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +12 -2
  78. data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +12 -2
  79. data/lib/advanced_billing/models/bulk_create_segments.rb +12 -2
  80. data/lib/advanced_billing/models/bulk_update_segments.rb +12 -2
  81. data/lib/advanced_billing/models/bulk_update_segments_item.rb +12 -2
  82. data/lib/advanced_billing/models/calendar_billing.rb +12 -2
  83. data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +12 -2
  84. data/lib/advanced_billing/models/cancellation_options.rb +12 -2
  85. data/lib/advanced_billing/models/cancellation_request.rb +12 -2
  86. data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +12 -2
  87. data/lib/advanced_billing/models/chargify_ebb.rb +33 -6
  88. data/lib/advanced_billing/models/component.rb +22 -4
  89. data/lib/advanced_billing/models/component_allocation_change.rb +12 -2
  90. data/lib/advanced_billing/models/component_allocation_error_item.rb +12 -2
  91. data/lib/advanced_billing/models/component_cost_data.rb +12 -2
  92. data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +12 -2
  93. data/lib/advanced_billing/models/component_currency_price.rb +12 -2
  94. data/lib/advanced_billing/models/component_currency_prices_response.rb +12 -2
  95. data/lib/advanced_billing/models/component_custom_price.rb +12 -2
  96. data/lib/advanced_billing/models/component_price.rb +12 -2
  97. data/lib/advanced_billing/models/component_price_point.rb +12 -2
  98. data/lib/advanced_billing/models/{component_s_price_point_assignment.rb → component_price_point_assignment.rb} +17 -7
  99. data/lib/advanced_billing/models/component_price_point_error_item.rb +12 -2
  100. data/lib/advanced_billing/models/component_price_point_item.rb +12 -2
  101. data/lib/advanced_billing/models/component_price_point_response.rb +12 -2
  102. data/lib/advanced_billing/models/component_price_points_response.rb +12 -2
  103. data/lib/advanced_billing/models/component_response.rb +12 -2
  104. data/lib/advanced_billing/models/consolidated_invoice.rb +12 -2
  105. data/lib/advanced_billing/models/count_response.rb +12 -2
  106. data/lib/advanced_billing/models/coupon.rb +78 -12
  107. data/lib/advanced_billing/models/coupon_currency.rb +12 -2
  108. data/lib/advanced_billing/models/coupon_currency_request.rb +12 -2
  109. data/lib/advanced_billing/models/coupon_currency_response.rb +12 -2
  110. data/lib/advanced_billing/models/coupon_response.rb +12 -2
  111. data/lib/advanced_billing/models/coupon_restriction.rb +12 -2
  112. data/lib/advanced_billing/models/coupon_subcodes.rb +12 -2
  113. data/lib/advanced_billing/models/coupon_subcodes_response.rb +12 -2
  114. data/lib/advanced_billing/models/coupon_usage.rb +12 -2
  115. data/lib/advanced_billing/models/create_allocation.rb +12 -2
  116. data/lib/advanced_billing/models/create_allocation_request.rb +12 -2
  117. data/lib/advanced_billing/models/create_component_price_point.rb +12 -2
  118. data/lib/advanced_billing/models/create_component_price_point_request.rb +12 -2
  119. data/lib/advanced_billing/models/create_component_price_points_request.rb +12 -2
  120. data/lib/advanced_billing/models/create_currency_price.rb +12 -2
  121. data/lib/advanced_billing/models/create_currency_prices_request.rb +12 -2
  122. data/lib/advanced_billing/models/create_customer.rb +12 -2
  123. data/lib/advanced_billing/models/create_customer_request.rb +12 -2
  124. data/lib/advanced_billing/models/create_ebb_component.rb +12 -2
  125. data/lib/advanced_billing/models/create_invoice.rb +12 -2
  126. data/lib/advanced_billing/models/create_invoice_address.rb +12 -2
  127. data/lib/advanced_billing/models/create_invoice_coupon.rb +12 -2
  128. data/lib/advanced_billing/models/create_invoice_item.rb +12 -2
  129. data/lib/advanced_billing/models/create_invoice_payment.rb +23 -2
  130. data/lib/advanced_billing/models/create_invoice_payment_application.rb +12 -2
  131. data/lib/advanced_billing/models/create_invoice_payment_request.rb +12 -2
  132. data/lib/advanced_billing/models/create_invoice_request.rb +12 -2
  133. data/lib/advanced_billing/models/create_metadata.rb +12 -2
  134. data/lib/advanced_billing/models/create_metadata_request.rb +12 -2
  135. data/lib/advanced_billing/models/create_metafield.rb +12 -2
  136. data/lib/advanced_billing/models/create_metafields_request.rb +12 -2
  137. data/lib/advanced_billing/models/create_metered_component.rb +12 -2
  138. data/lib/advanced_billing/models/create_multi_invoice_payment.rb +12 -2
  139. data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +12 -2
  140. data/lib/advanced_billing/models/create_offer.rb +12 -2
  141. data/lib/advanced_billing/models/create_offer_component.rb +12 -2
  142. data/lib/advanced_billing/models/create_offer_request.rb +12 -2
  143. data/lib/advanced_billing/models/create_on_off_component.rb +12 -2
  144. data/lib/advanced_billing/models/create_or_update_coupon.rb +12 -2
  145. data/lib/advanced_billing/models/{update_endpoint.rb → create_or_update_endpoint.rb} +14 -4
  146. data/lib/advanced_billing/models/{update_endpoint_request.rb → create_or_update_endpoint_request.rb} +15 -5
  147. data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +29 -2
  148. data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +29 -2
  149. data/lib/advanced_billing/models/create_or_update_product.rb +86 -4
  150. data/lib/advanced_billing/models/create_or_update_product_request.rb +12 -2
  151. data/lib/advanced_billing/models/create_or_update_segment_price.rb +12 -2
  152. data/lib/advanced_billing/models/create_payment.rb +14 -4
  153. data/lib/advanced_billing/models/create_payment_profile.rb +12 -2
  154. data/lib/advanced_billing/models/create_payment_profile_request.rb +12 -2
  155. data/lib/advanced_billing/models/create_prepaid_component.rb +12 -2
  156. data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +12 -2
  157. data/lib/advanced_billing/models/create_prepayment.rb +13 -3
  158. data/lib/advanced_billing/models/create_prepayment_method.rb +44 -0
  159. data/lib/advanced_billing/models/create_prepayment_request.rb +12 -2
  160. data/lib/advanced_billing/models/create_prepayment_response.rb +12 -2
  161. data/lib/advanced_billing/models/create_product_currency_price.rb +12 -2
  162. data/lib/advanced_billing/models/create_product_currency_prices_request.rb +12 -2
  163. data/lib/advanced_billing/models/create_product_family.rb +12 -2
  164. data/lib/advanced_billing/models/create_product_family_request.rb +12 -2
  165. data/lib/advanced_billing/models/create_product_price_point.rb +16 -6
  166. data/lib/advanced_billing/models/create_product_price_point_request.rb +12 -2
  167. data/lib/advanced_billing/models/create_quantity_based_component.rb +12 -2
  168. data/lib/advanced_billing/models/create_reason_code.rb +12 -2
  169. data/lib/advanced_billing/models/create_reason_code_request.rb +12 -2
  170. data/lib/advanced_billing/models/create_segment.rb +12 -2
  171. data/lib/advanced_billing/models/create_segment_request.rb +12 -2
  172. data/lib/advanced_billing/models/create_signup_proforma_preview_include.rb +20 -0
  173. data/lib/advanced_billing/models/create_subscription.rb +22 -4
  174. data/lib/advanced_billing/models/create_subscription_component.rb +12 -2
  175. data/lib/advanced_billing/models/create_subscription_group.rb +15 -20
  176. data/lib/advanced_billing/models/create_subscription_group_request.rb +12 -2
  177. data/lib/advanced_billing/models/create_subscription_request.rb +12 -2
  178. data/lib/advanced_billing/models/create_usage.rb +12 -2
  179. data/lib/advanced_billing/models/create_usage_request.rb +12 -2
  180. data/lib/advanced_billing/models/created_prepayment.rb +23 -4
  181. data/lib/advanced_billing/models/credit_account_balance_changed.rb +22 -5
  182. data/lib/advanced_billing/models/credit_card_attributes.rb +12 -2
  183. data/lib/advanced_billing/models/credit_card_payment_profile.rb +12 -2
  184. data/lib/advanced_billing/models/credit_note.rb +12 -2
  185. data/lib/advanced_billing/models/credit_note1.rb +12 -2
  186. data/lib/advanced_billing/models/credit_note_application.rb +23 -5
  187. data/lib/advanced_billing/models/credit_note_line_item.rb +38 -4
  188. data/lib/advanced_billing/models/credit_scheme_request.rb +12 -2
  189. data/lib/advanced_billing/models/currency_price.rb +12 -2
  190. data/lib/advanced_billing/models/currency_prices_response.rb +12 -2
  191. data/lib/advanced_billing/models/custom_field_value_change.rb +12 -2
  192. data/lib/advanced_billing/models/customer.rb +63 -15
  193. data/lib/advanced_billing/models/customer1.rb +13 -2
  194. data/lib/advanced_billing/models/customer_attributes.rb +12 -2
  195. data/lib/advanced_billing/models/customer_change.rb +12 -2
  196. data/lib/advanced_billing/models/customer_changes_preview_response.rb +12 -2
  197. data/lib/advanced_billing/models/customer_custom_fields_change.rb +12 -2
  198. data/lib/advanced_billing/models/customer_error.rb +12 -2
  199. data/lib/advanced_billing/models/customer_payer_change.rb +12 -2
  200. data/lib/advanced_billing/models/customer_response.rb +12 -2
  201. data/lib/advanced_billing/models/deduct_service_credit.rb +12 -2
  202. data/lib/advanced_billing/models/deduct_service_credit_request.rb +12 -2
  203. data/lib/advanced_billing/models/delayed_cancellation_response.rb +12 -2
  204. data/lib/advanced_billing/models/delete_subscription_group_response.rb +12 -2
  205. data/lib/advanced_billing/models/dunner_data.rb +29 -7
  206. data/lib/advanced_billing/models/dunning_step_data.rb +12 -2
  207. data/lib/advanced_billing/models/dunning_step_reached.rb +12 -2
  208. data/lib/advanced_billing/models/ebb_component.rb +12 -2
  209. data/lib/advanced_billing/models/ebb_event.rb +12 -2
  210. data/lib/advanced_billing/models/enable_webhooks_request.rb +12 -2
  211. data/lib/advanced_billing/models/enable_webhooks_response.rb +12 -2
  212. data/lib/advanced_billing/models/endpoint.rb +12 -2
  213. data/lib/advanced_billing/models/endpoint_response.rb +12 -2
  214. data/lib/advanced_billing/models/errors.rb +12 -2
  215. data/lib/advanced_billing/models/event.rb +23 -5
  216. data/lib/advanced_billing/models/event_based_billing_segment_error.rb +12 -2
  217. data/lib/advanced_billing/models/event_response.rb +12 -2
  218. data/lib/advanced_billing/models/full_subscription_group_response.rb +369 -11
  219. data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +12 -2
  220. data/lib/advanced_billing/models/get_one_time_token_request.rb +12 -2
  221. data/lib/advanced_billing/models/group_billing.rb +12 -2
  222. data/lib/advanced_billing/models/group_settings.rb +12 -2
  223. data/lib/advanced_billing/models/group_target.rb +12 -2
  224. data/lib/advanced_billing/models/group_type.rb +23 -0
  225. data/lib/advanced_billing/models/invoice.rb +12 -2
  226. data/lib/advanced_billing/models/invoice_address.rb +12 -2
  227. data/lib/advanced_billing/models/invoice_balance_item.rb +12 -2
  228. data/lib/advanced_billing/models/invoice_credit.rb +12 -2
  229. data/lib/advanced_billing/models/invoice_custom_field.rb +12 -2
  230. data/lib/advanced_billing/models/invoice_customer.rb +13 -2
  231. data/lib/advanced_billing/models/invoice_discount.rb +14 -4
  232. data/lib/advanced_billing/models/invoice_discount_breakout.rb +12 -2
  233. data/lib/advanced_billing/models/invoice_discount_source_type.rb +26 -0
  234. data/lib/advanced_billing/models/invoice_discount_type.rb +26 -0
  235. data/lib/advanced_billing/models/invoice_display_settings.rb +12 -2
  236. data/lib/advanced_billing/models/invoice_event.rb +23 -4
  237. data/lib/advanced_billing/models/invoice_event_data.rb +12 -2
  238. data/lib/advanced_billing/models/invoice_event_payment.rb +12 -2
  239. data/lib/advanced_billing/models/invoice_event_payment1.rb +12 -2
  240. data/lib/advanced_billing/models/invoice_issued.rb +27 -15
  241. data/lib/advanced_billing/models/invoice_line_item.rb +22 -2
  242. data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +12 -2
  243. data/lib/advanced_billing/models/invoice_line_item_event_data.rb +12 -2
  244. data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +12 -2
  245. data/lib/advanced_billing/models/invoice_payer.rb +12 -2
  246. data/lib/advanced_billing/models/invoice_payer_change.rb +12 -2
  247. data/lib/advanced_billing/models/invoice_payment.rb +12 -2
  248. data/lib/advanced_billing/models/invoice_payment_application.rb +12 -2
  249. data/lib/advanced_billing/models/invoice_payment_method.rb +12 -2
  250. data/lib/advanced_billing/models/invoice_pre_payment.rb +25 -5
  251. data/lib/advanced_billing/models/invoice_previous_balance.rb +12 -2
  252. data/lib/advanced_billing/models/invoice_refund.rb +34 -2
  253. data/lib/advanced_billing/models/invoice_response.rb +12 -2
  254. data/lib/advanced_billing/models/invoice_seller.rb +12 -2
  255. data/lib/advanced_billing/models/invoice_tax.rb +13 -3
  256. data/lib/advanced_billing/models/invoice_tax_breakout.rb +23 -2
  257. data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +12 -2
  258. data/lib/advanced_billing/models/issue_advance_invoice_request.rb +12 -2
  259. data/lib/advanced_billing/models/issue_invoice_event_data.rb +12 -2
  260. data/lib/advanced_billing/models/issue_invoice_request.rb +12 -2
  261. data/lib/advanced_billing/models/issue_service_credit.rb +12 -2
  262. data/lib/advanced_billing/models/issue_service_credit_request.rb +12 -2
  263. data/lib/advanced_billing/models/item_price_point_changed.rb +12 -2
  264. data/lib/advanced_billing/models/item_price_point_data.rb +12 -2
  265. data/lib/advanced_billing/models/list_components_price_points_response.rb +12 -2
  266. data/lib/advanced_billing/models/list_credit_notes_response.rb +12 -2
  267. data/lib/advanced_billing/models/list_invoice_events_response.rb +12 -2
  268. data/lib/advanced_billing/models/list_invoices_response.rb +12 -2
  269. data/lib/advanced_billing/models/list_metafields_response.rb +12 -2
  270. data/lib/advanced_billing/models/list_mrr_response.rb +12 -2
  271. data/lib/advanced_billing/models/list_mrr_response_result.rb +12 -2
  272. data/lib/advanced_billing/models/list_offers_response.rb +12 -2
  273. data/lib/advanced_billing/models/list_product_price_points_response.rb +12 -2
  274. data/lib/advanced_billing/models/list_proforma_invoices_meta.rb +90 -0
  275. data/lib/advanced_billing/models/list_proforma_invoices_response.rb +79 -0
  276. data/lib/advanced_billing/models/list_public_keys_meta.rb +12 -2
  277. data/lib/advanced_billing/models/list_public_keys_response.rb +12 -2
  278. data/lib/advanced_billing/models/list_sale_rep_item.rb +12 -2
  279. data/lib/advanced_billing/models/list_segments_response.rb +12 -2
  280. data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +25 -12
  281. data/lib/advanced_billing/models/list_subscription_components_response.rb +12 -2
  282. data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +12 -2
  283. data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +12 -2
  284. data/lib/advanced_billing/models/list_subscription_groups_item.rb +33 -5
  285. data/lib/advanced_billing/models/list_subscription_groups_meta.rb +12 -2
  286. data/lib/advanced_billing/models/list_subscription_groups_response.rb +12 -2
  287. data/lib/advanced_billing/models/metadata.rb +23 -4
  288. data/lib/advanced_billing/models/metafield.rb +12 -2
  289. data/lib/advanced_billing/models/metafield_scope.rb +12 -2
  290. data/lib/advanced_billing/models/metered_component.rb +12 -2
  291. data/lib/advanced_billing/models/metered_usage.rb +12 -2
  292. data/lib/advanced_billing/models/movement.rb +23 -4
  293. data/lib/advanced_billing/models/movement_line_item.rb +12 -2
  294. data/lib/advanced_billing/models/mrr.rb +23 -4
  295. data/lib/advanced_billing/models/mrr_movement.rb +12 -2
  296. data/lib/advanced_billing/models/mrr_response.rb +12 -2
  297. data/lib/advanced_billing/models/multi_invoice_payment.rb +12 -2
  298. data/lib/advanced_billing/models/multi_invoice_payment_response.rb +12 -2
  299. data/lib/advanced_billing/models/nested_subscription_group.rb +12 -2
  300. data/lib/advanced_billing/models/net_terms.rb +12 -2
  301. data/lib/advanced_billing/models/offer.rb +43 -8
  302. data/lib/advanced_billing/models/offer_discount.rb +12 -2
  303. data/lib/advanced_billing/models/offer_item.rb +12 -2
  304. data/lib/advanced_billing/models/offer_response.rb +12 -2
  305. data/lib/advanced_billing/models/offer_signup_page.rb +12 -2
  306. data/lib/advanced_billing/models/on_off_component.rb +12 -2
  307. data/lib/advanced_billing/models/organization_address.rb +12 -2
  308. data/lib/advanced_billing/models/origin_invoice.rb +12 -2
  309. data/lib/advanced_billing/models/overage_pricing.rb +12 -2
  310. data/lib/advanced_billing/models/override_subscription.rb +12 -2
  311. data/lib/advanced_billing/models/override_subscription_request.rb +12 -2
  312. data/lib/advanced_billing/models/paginated_metadata.rb +12 -2
  313. data/lib/advanced_billing/models/{payment.rb → paid_invoice.rb} +23 -13
  314. data/lib/advanced_billing/models/pause_request.rb +12 -2
  315. data/lib/advanced_billing/models/payer_attributes.rb +13 -3
  316. data/lib/advanced_billing/models/payer_error.rb +12 -2
  317. data/lib/advanced_billing/models/payment_collection_method_changed.rb +12 -2
  318. data/lib/advanced_billing/models/payment_for_allocation.rb +12 -2
  319. data/lib/advanced_billing/models/payment_method_apple_pay.rb +12 -2
  320. data/lib/advanced_billing/models/payment_method_bank_account.rb +12 -2
  321. data/lib/advanced_billing/models/payment_method_credit_card.rb +12 -2
  322. data/lib/advanced_billing/models/payment_method_external.rb +12 -2
  323. data/lib/advanced_billing/models/payment_method_paypal.rb +12 -2
  324. data/lib/advanced_billing/models/payment_profile_attributes.rb +12 -2
  325. data/lib/advanced_billing/models/payment_profile_response.rb +12 -2
  326. data/lib/advanced_billing/models/payment_related_events.rb +12 -2
  327. data/lib/advanced_billing/models/pending_cancellation_change.rb +22 -5
  328. data/lib/advanced_billing/models/portal_management_link.rb +53 -12
  329. data/lib/advanced_billing/models/prepaid_component_price_point.rb +12 -2
  330. data/lib/advanced_billing/models/prepaid_configuration.rb +12 -2
  331. data/lib/advanced_billing/models/prepaid_configuration_response.rb +12 -2
  332. data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +12 -2
  333. data/lib/advanced_billing/models/prepaid_usage.rb +12 -2
  334. data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +12 -2
  335. data/lib/advanced_billing/models/prepaid_usage_component.rb +12 -2
  336. data/lib/advanced_billing/models/prepayment.rb +21 -4
  337. data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +12 -2
  338. data/lib/advanced_billing/models/prepayment_aggregated_error.rb +12 -2
  339. data/lib/advanced_billing/models/prepayment_method.rb +3 -6
  340. data/lib/advanced_billing/models/prepayment_response.rb +12 -2
  341. data/lib/advanced_billing/models/prepayments_response.rb +12 -2
  342. data/lib/advanced_billing/models/preview_allocations_request.rb +12 -2
  343. data/lib/advanced_billing/models/price.rb +12 -2
  344. data/lib/advanced_billing/models/price_point.rb +12 -2
  345. data/lib/advanced_billing/models/product.rb +14 -4
  346. data/lib/advanced_billing/models/product_family.rb +33 -6
  347. data/lib/advanced_billing/models/product_family_response.rb +12 -2
  348. data/lib/advanced_billing/models/product_price_point.rb +16 -6
  349. data/lib/advanced_billing/models/product_price_point_errors.rb +12 -2
  350. data/lib/advanced_billing/models/product_price_point_response.rb +12 -2
  351. data/lib/advanced_billing/models/product_response.rb +12 -2
  352. data/lib/advanced_billing/models/proforma_error.rb +12 -2
  353. data/lib/advanced_billing/models/proforma_invoice.rb +87 -19
  354. data/lib/advanced_billing/models/proforma_invoice_credit.rb +12 -2
  355. data/lib/advanced_billing/models/proforma_invoice_discount.rb +37 -7
  356. data/lib/advanced_billing/models/proforma_invoice_discount_source_type.rb +23 -0
  357. data/lib/advanced_billing/models/proforma_invoice_issued.rb +23 -6
  358. data/lib/advanced_billing/models/proforma_invoice_payment.rb +12 -2
  359. data/lib/advanced_billing/models/proforma_invoice_role.rb +30 -0
  360. data/lib/advanced_billing/models/proforma_invoice_status.rb +26 -0
  361. data/lib/advanced_billing/models/proforma_invoice_tax.rb +15 -5
  362. data/lib/advanced_billing/models/proforma_invoice_tax_source_type.rb +23 -0
  363. data/lib/advanced_billing/models/proration.rb +12 -2
  364. data/lib/advanced_billing/models/public_key.rb +23 -4
  365. data/lib/advanced_billing/models/public_signup_page.rb +12 -2
  366. data/lib/advanced_billing/models/quantity_based_component.rb +12 -2
  367. data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +12 -2
  368. data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +23 -5
  369. data/lib/advanced_billing/models/reactivate_subscription_request.rb +12 -2
  370. data/lib/advanced_billing/models/reactivation_billing.rb +12 -2
  371. data/lib/advanced_billing/models/reason_code.rb +33 -6
  372. data/lib/advanced_billing/models/reason_code_response.rb +12 -2
  373. data/lib/advanced_billing/models/reason_codes_json_response.rb +12 -2
  374. data/lib/advanced_billing/models/record_payment_request.rb +12 -2
  375. data/lib/advanced_billing/models/{payment_response.rb → record_payment_response.rb} +33 -9
  376. data/lib/advanced_billing/models/referral_code.rb +12 -2
  377. data/lib/advanced_billing/models/referral_validation_response.rb +12 -2
  378. data/lib/advanced_billing/models/refund.rb +12 -2
  379. data/lib/advanced_billing/models/refund_consolidated_invoice.rb +12 -2
  380. data/lib/advanced_billing/models/refund_invoice.rb +12 -2
  381. data/lib/advanced_billing/models/refund_invoice_event_data.rb +12 -2
  382. data/lib/advanced_billing/models/refund_invoice_request.rb +12 -2
  383. data/lib/advanced_billing/models/refund_prepayment.rb +12 -2
  384. data/lib/advanced_billing/models/refund_prepayment_aggregated_error.rb +12 -2
  385. data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +12 -2
  386. data/lib/advanced_billing/models/refund_prepayment_request.rb +12 -2
  387. data/lib/advanced_billing/models/refund_success.rb +12 -2
  388. data/lib/advanced_billing/models/remove_payment_event_data.rb +12 -2
  389. data/lib/advanced_billing/models/renewal_preview.rb +23 -5
  390. data/lib/advanced_billing/models/renewal_preview_component.rb +12 -2
  391. data/lib/advanced_billing/models/renewal_preview_line_item.rb +12 -2
  392. data/lib/advanced_billing/models/renewal_preview_request.rb +12 -2
  393. data/lib/advanced_billing/models/renewal_preview_response.rb +12 -2
  394. data/lib/advanced_billing/models/replay_webhooks_request.rb +12 -2
  395. data/lib/advanced_billing/models/replay_webhooks_response.rb +12 -2
  396. data/lib/advanced_billing/models/resent_invitation.rb +12 -2
  397. data/lib/advanced_billing/models/resume_options.rb +12 -2
  398. data/lib/advanced_billing/models/revoked_invitation.rb +12 -2
  399. data/lib/advanced_billing/models/sale_rep.rb +12 -2
  400. data/lib/advanced_billing/models/sale_rep_item_mrr.rb +12 -2
  401. data/lib/advanced_billing/models/sale_rep_settings.rb +12 -2
  402. data/lib/advanced_billing/models/sale_rep_subscription.rb +12 -2
  403. data/lib/advanced_billing/models/segment.rb +33 -6
  404. data/lib/advanced_billing/models/segment_price.rb +12 -2
  405. data/lib/advanced_billing/models/segment_response.rb +12 -2
  406. data/lib/advanced_billing/models/seller.rb +12 -2
  407. data/lib/advanced_billing/models/send_invoice_request.rb +12 -2
  408. data/lib/advanced_billing/models/service_credit.rb +12 -2
  409. data/lib/advanced_billing/models/service_credit_response.rb +12 -2
  410. data/lib/advanced_billing/models/shipping_address.rb +12 -2
  411. data/lib/advanced_billing/models/signup_proforma_preview.rb +12 -2
  412. data/lib/advanced_billing/models/signup_proforma_preview_response.rb +12 -2
  413. data/lib/advanced_billing/models/site.rb +12 -2
  414. data/lib/advanced_billing/models/site_response.rb +12 -2
  415. data/lib/advanced_billing/models/site_statistics.rb +16 -6
  416. data/lib/advanced_billing/models/site_summary.rb +12 -2
  417. data/lib/advanced_billing/models/subscription.rb +12 -2
  418. data/lib/advanced_billing/models/subscription_component.rb +22 -4
  419. data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +12 -2
  420. data/lib/advanced_billing/models/subscription_component_response.rb +12 -2
  421. data/lib/advanced_billing/models/subscription_component_subscription.rb +23 -4
  422. data/lib/advanced_billing/models/subscription_custom_price.rb +12 -2
  423. data/lib/advanced_billing/models/subscription_group.rb +38 -10
  424. data/lib/advanced_billing/models/subscription_group_balances.rb +12 -2
  425. data/lib/advanced_billing/models/subscription_group_bank_account.rb +12 -2
  426. data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +12 -2
  427. data/lib/advanced_billing/models/subscription_group_credit_card.rb +12 -2
  428. data/lib/advanced_billing/models/subscription_group_customer.rb +12 -2
  429. data/lib/advanced_billing/models/subscription_group_include.rb +20 -0
  430. data/lib/advanced_billing/models/subscription_group_item.rb +12 -2
  431. data/lib/advanced_billing/models/subscription_group_member_error.rb +12 -2
  432. data/lib/advanced_billing/models/subscription_group_members_array_error.rb +72 -0
  433. data/lib/advanced_billing/models/subscription_group_payment_profile.rb +12 -2
  434. data/lib/advanced_billing/models/subscription_group_prepayment.rb +12 -2
  435. data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +12 -2
  436. data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +12 -2
  437. data/lib/advanced_billing/models/subscription_group_response.rb +12 -2
  438. data/lib/advanced_billing/models/subscription_group_signup.rb +12 -2
  439. data/lib/advanced_billing/models/subscription_group_signup_component.rb +12 -2
  440. data/lib/advanced_billing/models/subscription_group_signup_error.rb +12 -2
  441. data/lib/advanced_billing/models/subscription_group_signup_failure.rb +12 -2
  442. data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +12 -2
  443. data/lib/advanced_billing/models/subscription_group_signup_item.rb +12 -2
  444. data/lib/advanced_billing/models/subscription_group_signup_request.rb +12 -2
  445. data/lib/advanced_billing/models/subscription_group_signup_response.rb +231 -9
  446. data/lib/advanced_billing/models/subscription_group_signup_success.rb +12 -2
  447. data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +21 -5
  448. data/lib/advanced_billing/models/subscription_group_single_error.rb +73 -0
  449. data/lib/advanced_billing/models/subscription_group_subscription_error.rb +66 -2
  450. data/lib/advanced_billing/models/subscription_group_update_error.rb +12 -2
  451. data/lib/advanced_billing/models/subscription_groups_list_include.rb +20 -0
  452. data/lib/advanced_billing/models/subscription_included_coupon.rb +12 -2
  453. data/lib/advanced_billing/models/subscription_migration_preview.rb +12 -2
  454. data/lib/advanced_billing/models/subscription_migration_preview_options.rb +23 -5
  455. data/lib/advanced_billing/models/subscription_migration_preview_request.rb +12 -2
  456. data/lib/advanced_billing/models/subscription_migration_preview_response.rb +12 -2
  457. data/lib/advanced_billing/models/subscription_mrr.rb +12 -2
  458. data/lib/advanced_billing/models/subscription_mrr_breakout.rb +12 -2
  459. data/lib/advanced_billing/models/subscription_mrr_response.rb +12 -2
  460. data/lib/advanced_billing/models/subscription_note.rb +33 -6
  461. data/lib/advanced_billing/models/subscription_note_response.rb +12 -2
  462. data/lib/advanced_billing/models/subscription_preview.rb +12 -2
  463. data/lib/advanced_billing/models/subscription_preview_response.rb +12 -2
  464. data/lib/advanced_billing/models/subscription_product_change.rb +12 -2
  465. data/lib/advanced_billing/models/subscription_product_migration.rb +12 -2
  466. data/lib/advanced_billing/models/subscription_product_migration_request.rb +12 -2
  467. data/lib/advanced_billing/models/subscription_response.rb +12 -2
  468. data/lib/advanced_billing/models/subscription_state_change.rb +12 -2
  469. data/lib/advanced_billing/models/tax_configuration.rb +12 -2
  470. data/lib/advanced_billing/models/too_many_management_link_requests.rb +12 -2
  471. data/lib/advanced_billing/models/update_allocation_expiration_date.rb +12 -2
  472. data/lib/advanced_billing/models/update_component.rb +12 -2
  473. data/lib/advanced_billing/models/update_component_price_point.rb +12 -2
  474. data/lib/advanced_billing/models/update_component_price_point_request.rb +12 -2
  475. data/lib/advanced_billing/models/update_component_request.rb +12 -2
  476. data/lib/advanced_billing/models/update_coupon_currency.rb +12 -2
  477. data/lib/advanced_billing/models/update_currency_price.rb +12 -2
  478. data/lib/advanced_billing/models/update_currency_prices_request.rb +12 -2
  479. data/lib/advanced_billing/models/update_customer.rb +12 -2
  480. data/lib/advanced_billing/models/update_customer_request.rb +12 -2
  481. data/lib/advanced_billing/models/update_metadata.rb +12 -2
  482. data/lib/advanced_billing/models/update_metadata_request.rb +12 -2
  483. data/lib/advanced_billing/models/update_metafield.rb +12 -2
  484. data/lib/advanced_billing/models/update_metafields_request.rb +12 -2
  485. data/lib/advanced_billing/models/update_payment_profile.rb +12 -2
  486. data/lib/advanced_billing/models/update_payment_profile_request.rb +12 -2
  487. data/lib/advanced_billing/models/update_price.rb +12 -2
  488. data/lib/advanced_billing/models/update_product_price_point.rb +12 -2
  489. data/lib/advanced_billing/models/update_product_price_point_request.rb +12 -2
  490. data/lib/advanced_billing/models/update_reason_code.rb +12 -2
  491. data/lib/advanced_billing/models/update_reason_code_request.rb +12 -2
  492. data/lib/advanced_billing/models/update_segment.rb +12 -2
  493. data/lib/advanced_billing/models/update_segment_request.rb +12 -2
  494. data/lib/advanced_billing/models/update_subscription.rb +23 -5
  495. data/lib/advanced_billing/models/update_subscription_component.rb +12 -2
  496. data/lib/advanced_billing/models/update_subscription_group.rb +12 -2
  497. data/lib/advanced_billing/models/update_subscription_group_request.rb +12 -2
  498. data/lib/advanced_billing/models/update_subscription_note.rb +12 -2
  499. data/lib/advanced_billing/models/update_subscription_note_request.rb +12 -2
  500. data/lib/advanced_billing/models/update_subscription_request.rb +12 -2
  501. data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +12 -2
  502. data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +12 -2
  503. data/lib/advanced_billing/models/usage.rb +12 -2
  504. data/lib/advanced_billing/models/usage_response.rb +12 -2
  505. data/lib/advanced_billing/models/void_invoice.rb +12 -2
  506. data/lib/advanced_billing/models/void_invoice_event_data.rb +12 -2
  507. data/lib/advanced_billing/models/void_invoice_request.rb +12 -2
  508. data/lib/advanced_billing/models/void_remainder_event_data.rb +12 -2
  509. data/lib/advanced_billing/models/webhook.rb +53 -10
  510. data/lib/advanced_billing/models/webhook_response.rb +12 -2
  511. data/lib/advanced_billing/utilities/union_type_lookup.rb +20 -8
  512. data/lib/advanced_billing.rb +25 -12
  513. metadata +24 -11
  514. data/lib/advanced_billing/models/proforma_invoice_discount_breakout.rb +0 -62
  515. data/lib/advanced_billing/models/proforma_invoice_preview.rb +0 -484
  516. data/lib/advanced_billing/models/proforma_invoice_tax_breakout.rb +0 -61
@@ -22,50 +22,50 @@ module AdvancedBilling
22
22
  attr_accessor :role
23
23
 
24
24
  # TODO: Write general description for this method
25
- # @return [String]
25
+ # @return [Date]
26
26
  attr_accessor :due_date
27
27
 
28
- # TODO: Write general description for this method
28
+ # Invoice issue date. Can be an empty string if value is missing.
29
29
  # @return [String]
30
30
  attr_accessor :issue_date
31
31
 
32
- # TODO: Write general description for this method
32
+ # Paid date. Can be an empty string if value is missing.
33
33
  # @return [String]
34
34
  attr_accessor :paid_date
35
35
 
36
- # TODO: Write general description for this method
36
+ # Paid date. Can be an empty string if value is missing.
37
37
  # @return [String]
38
38
  attr_accessor :due_amount
39
39
 
40
- # TODO: Write general description for this method
40
+ # Paid date. Can be an empty string if value is missing.
41
41
  # @return [String]
42
42
  attr_accessor :paid_amount
43
43
 
44
- # TODO: Write general description for this method
44
+ # Paid date. Can be an empty string if value is missing.
45
45
  # @return [String]
46
46
  attr_accessor :tax_amount
47
47
 
48
- # TODO: Write general description for this method
48
+ # Paid date. Can be an empty string if value is missing.
49
49
  # @return [String]
50
50
  attr_accessor :refund_amount
51
51
 
52
- # TODO: Write general description for this method
52
+ # Paid date. Can be an empty string if value is missing.
53
53
  # @return [String]
54
54
  attr_accessor :total_amount
55
55
 
56
- # TODO: Write general description for this method
56
+ # Paid date. Can be an empty string if value is missing.
57
57
  # @return [String]
58
58
  attr_accessor :status_amount
59
59
 
60
- # TODO: Write general description for this method
60
+ # Paid date. Can be an empty string if value is missing.
61
61
  # @return [String]
62
62
  attr_accessor :product_name
63
63
 
64
- # TODO: Write general description for this method
64
+ # Paid date. Can be an empty string if value is missing.
65
65
  # @return [String]
66
66
  attr_accessor :consolidation_level
67
67
 
68
- # TODO: Write general description for this method
68
+ # Paid date. Can be an empty string if value is missing.
69
69
  # @return [Array[InvoiceLineItemEventData]]
70
70
  attr_accessor :line_items
71
71
 
@@ -97,7 +97,9 @@ module AdvancedBilling
97
97
 
98
98
  # An array for nullable fields
99
99
  def self.nullables
100
- []
100
+ %w[
101
+ due_date
102
+ ]
101
103
  end
102
104
 
103
105
  def initialize(uid = nil,
@@ -114,7 +116,8 @@ module AdvancedBilling
114
116
  status_amount = nil,
115
117
  product_name = nil,
116
118
  consolidation_level = nil,
117
- line_items = nil)
119
+ line_items = nil,
120
+ additional_properties = {})
118
121
  @uid = uid
119
122
  @number = number
120
123
  @role = role
@@ -130,6 +133,11 @@ module AdvancedBilling
130
133
  @product_name = product_name
131
134
  @consolidation_level = consolidation_level
132
135
  @line_items = line_items
136
+
137
+ # Add additional model properties to the instance.
138
+ additional_properties.each do |_name, _value|
139
+ instance_variable_set("@#{_name}", _value)
140
+ end
133
141
  end
134
142
 
135
143
  # Creates an instance of the object from a hash.
@@ -163,6 +171,9 @@ module AdvancedBilling
163
171
 
164
172
  line_items = nil unless hash.key?('line_items')
165
173
 
174
+ # Clean out expected properties from Hash.
175
+ names.each_value { |k| hash.delete(k) }
176
+
166
177
  # Create object from extracted values.
167
178
  InvoiceIssued.new(uid,
168
179
  number,
@@ -178,7 +189,8 @@ module AdvancedBilling
178
189
  status_amount,
179
190
  product_name,
180
191
  consolidation_level,
181
- line_items)
192
+ line_items,
193
+ hash)
182
194
  end
183
195
 
184
196
  # Validates an instance of the object from a given value.
@@ -147,6 +147,10 @@ module AdvancedBilling
147
147
  # @return [TrueClass | FalseClass]
148
148
  attr_accessor :custom_item
149
149
 
150
+ # The price point ID of the line item's product
151
+ # @return [String]
152
+ attr_accessor :kind
153
+
150
154
  # A mapping from model property names to API property names.
151
155
  def self.names
152
156
  @_hash = {} if @_hash.nil?
@@ -171,6 +175,7 @@ module AdvancedBilling
171
175
  @_hash['component_cost_data'] = 'component_cost_data'
172
176
  @_hash['product_price_point_id'] = 'product_price_point_id'
173
177
  @_hash['custom_item'] = 'custom_item'
178
+ @_hash['kind'] = 'kind'
174
179
  @_hash
175
180
  end
176
181
 
@@ -198,6 +203,7 @@ module AdvancedBilling
198
203
  component_cost_data
199
204
  product_price_point_id
200
205
  custom_item
206
+ kind
201
207
  ]
202
208
  end
203
209
 
@@ -233,7 +239,9 @@ module AdvancedBilling
233
239
  hide = SKIP,
234
240
  component_cost_data = SKIP,
235
241
  product_price_point_id = SKIP,
236
- custom_item = SKIP)
242
+ custom_item = SKIP,
243
+ kind = SKIP,
244
+ additional_properties = {})
237
245
  @uid = uid unless uid == SKIP
238
246
  @title = title unless title == SKIP
239
247
  @description = description unless description == SKIP
@@ -255,6 +263,12 @@ module AdvancedBilling
255
263
  @component_cost_data = component_cost_data unless component_cost_data == SKIP
256
264
  @product_price_point_id = product_price_point_id unless product_price_point_id == SKIP
257
265
  @custom_item = custom_item unless custom_item == SKIP
266
+ @kind = kind unless kind == SKIP
267
+
268
+ # Add additional model properties to the instance.
269
+ additional_properties.each do |_name, _value|
270
+ instance_variable_set("@#{_name}", _value)
271
+ end
258
272
  end
259
273
 
260
274
  # Creates an instance of the object from a hash.
@@ -294,6 +308,10 @@ module AdvancedBilling
294
308
  product_price_point_id =
295
309
  hash.key?('product_price_point_id') ? hash['product_price_point_id'] : SKIP
296
310
  custom_item = hash.key?('custom_item') ? hash['custom_item'] : SKIP
311
+ kind = hash.key?('kind') ? hash['kind'] : SKIP
312
+
313
+ # Clean out expected properties from Hash.
314
+ names.each_value { |k| hash.delete(k) }
297
315
 
298
316
  # Create object from extracted values.
299
317
  InvoiceLineItem.new(uid,
@@ -316,7 +334,9 @@ module AdvancedBilling
316
334
  hide,
317
335
  component_cost_data,
318
336
  product_price_point_id,
319
- custom_item)
337
+ custom_item,
338
+ kind,
339
+ hash)
320
340
  end
321
341
 
322
342
  # Validates an instance of the object from a given value.
@@ -32,8 +32,14 @@ module AdvancedBilling
32
32
  []
33
33
  end
34
34
 
35
- def initialize(rates = SKIP)
35
+ def initialize(rates = SKIP,
36
+ additional_properties = {})
36
37
  @rates = rates unless rates == SKIP
38
+
39
+ # Add additional model properties to the instance.
40
+ additional_properties.each do |_name, _value|
41
+ instance_variable_set("@#{_name}", _value)
42
+ end
37
43
  end
38
44
 
39
45
  # Creates an instance of the object from a hash.
@@ -52,8 +58,12 @@ module AdvancedBilling
52
58
 
53
59
  rates = SKIP unless hash.key?('rates')
54
60
 
61
+ # Clean out expected properties from Hash.
62
+ names.each_value { |k| hash.delete(k) }
63
+
55
64
  # Create object from extracted values.
56
- InvoiceLineItemComponentCostData.new(rates)
65
+ InvoiceLineItemComponentCostData.new(rates,
66
+ hash)
57
67
  end
58
68
 
59
69
  # Validates an instance of the object from a given value.
@@ -174,7 +174,8 @@ module AdvancedBilling
174
174
  price_point_id = SKIP,
175
175
  component_id = SKIP,
176
176
  billing_schedule_item_id = SKIP,
177
- custom_item = SKIP)
177
+ custom_item = SKIP,
178
+ additional_properties = {})
178
179
  @uid = uid unless uid == SKIP
179
180
  @title = title unless title == SKIP
180
181
  @description = description unless description == SKIP
@@ -195,6 +196,11 @@ module AdvancedBilling
195
196
  @component_id = component_id unless component_id == SKIP
196
197
  @billing_schedule_item_id = billing_schedule_item_id unless billing_schedule_item_id == SKIP
197
198
  @custom_item = custom_item unless custom_item == SKIP
199
+
200
+ # Add additional model properties to the instance.
201
+ additional_properties.each do |_name, _value|
202
+ instance_variable_set("@#{_name}", _value)
203
+ end
198
204
  end
199
205
 
200
206
  # Creates an instance of the object from a hash.
@@ -240,6 +246,9 @@ module AdvancedBilling
240
246
  hash.key?('billing_schedule_item_id') ? hash['billing_schedule_item_id'] : SKIP
241
247
  custom_item = hash.key?('custom_item') ? hash['custom_item'] : SKIP
242
248
 
249
+ # Clean out expected properties from Hash.
250
+ names.each_value { |k| hash.delete(k) }
251
+
243
252
  # Create object from extracted values.
244
253
  InvoiceLineItemEventData.new(uid,
245
254
  title,
@@ -260,7 +269,8 @@ module AdvancedBilling
260
269
  price_point_id,
261
270
  component_id,
262
271
  billing_schedule_item_id,
263
- custom_item)
272
+ custom_item,
273
+ hash)
264
274
  end
265
275
  end
266
276
  end
@@ -39,9 +39,15 @@ module AdvancedBilling
39
39
  end
40
40
 
41
41
  def initialize(label = SKIP,
42
- amount = SKIP)
42
+ amount = SKIP,
43
+ additional_properties = {})
43
44
  @label = label unless label == SKIP
44
45
  @amount = amount unless amount == SKIP
46
+
47
+ # Add additional model properties to the instance.
48
+ additional_properties.each do |_name, _value|
49
+ instance_variable_set("@#{_name}", _value)
50
+ end
45
51
  end
46
52
 
47
53
  # Creates an instance of the object from a hash.
@@ -52,9 +58,13 @@ module AdvancedBilling
52
58
  label = hash.key?('label') ? hash['label'] : SKIP
53
59
  amount = hash.key?('amount') ? hash['amount'] : SKIP
54
60
 
61
+ # Clean out expected properties from Hash.
62
+ names.each_value { |k| hash.delete(k) }
63
+
55
64
  # Create object from extracted values.
56
65
  InvoiceLineItemPricingDetail.new(label,
57
- amount)
66
+ amount,
67
+ hash)
58
68
  end
59
69
  end
60
70
  end
@@ -70,13 +70,19 @@ module AdvancedBilling
70
70
  last_name = SKIP,
71
71
  organization = SKIP,
72
72
  email = SKIP,
73
- vat_number = SKIP)
73
+ vat_number = SKIP,
74
+ additional_properties = {})
74
75
  @chargify_id = chargify_id unless chargify_id == SKIP
75
76
  @first_name = first_name unless first_name == SKIP
76
77
  @last_name = last_name unless last_name == SKIP
77
78
  @organization = organization unless organization == SKIP
78
79
  @email = email unless email == SKIP
79
80
  @vat_number = vat_number unless vat_number == SKIP
81
+
82
+ # Add additional model properties to the instance.
83
+ additional_properties.each do |_name, _value|
84
+ instance_variable_set("@#{_name}", _value)
85
+ end
80
86
  end
81
87
 
82
88
  # Creates an instance of the object from a hash.
@@ -91,13 +97,17 @@ module AdvancedBilling
91
97
  email = hash.key?('email') ? hash['email'] : SKIP
92
98
  vat_number = hash.key?('vat_number') ? hash['vat_number'] : SKIP
93
99
 
100
+ # Clean out expected properties from Hash.
101
+ names.each_value { |k| hash.delete(k) }
102
+
94
103
  # Create object from extracted values.
95
104
  InvoicePayer.new(chargify_id,
96
105
  first_name,
97
106
  last_name,
98
107
  organization,
99
108
  email,
100
- vat_number)
109
+ vat_number,
110
+ hash)
101
111
  end
102
112
  end
103
113
  end
@@ -53,11 +53,17 @@ module AdvancedBilling
53
53
  def initialize(first_name = SKIP,
54
54
  last_name = SKIP,
55
55
  organization = SKIP,
56
- email = SKIP)
56
+ email = SKIP,
57
+ additional_properties = {})
57
58
  @first_name = first_name unless first_name == SKIP
58
59
  @last_name = last_name unless last_name == SKIP
59
60
  @organization = organization unless organization == SKIP
60
61
  @email = email unless email == SKIP
62
+
63
+ # Add additional model properties to the instance.
64
+ additional_properties.each do |_name, _value|
65
+ instance_variable_set("@#{_name}", _value)
66
+ end
61
67
  end
62
68
 
63
69
  # Creates an instance of the object from a hash.
@@ -70,11 +76,15 @@ module AdvancedBilling
70
76
  organization = hash.key?('organization') ? hash['organization'] : SKIP
71
77
  email = hash.key?('email') ? hash['email'] : SKIP
72
78
 
79
+ # Clean out expected properties from Hash.
80
+ names.each_value { |k| hash.delete(k) }
81
+
73
82
  # Create object from extracted values.
74
83
  InvoicePayerChange.new(first_name,
75
84
  last_name,
76
85
  organization,
77
- email)
86
+ email,
87
+ hash)
78
88
  end
79
89
  end
80
90
  end
@@ -99,7 +99,8 @@ module AdvancedBilling
99
99
  prepayment = SKIP,
100
100
  gateway_handle = SKIP,
101
101
  gateway_used = SKIP,
102
- gateway_transaction_id = SKIP)
102
+ gateway_transaction_id = SKIP,
103
+ additional_properties = {})
103
104
  @transaction_time = transaction_time unless transaction_time == SKIP
104
105
  @memo = memo unless memo == SKIP
105
106
  @original_amount = original_amount unless original_amount == SKIP
@@ -110,6 +111,11 @@ module AdvancedBilling
110
111
  @gateway_handle = gateway_handle unless gateway_handle == SKIP
111
112
  @gateway_used = gateway_used unless gateway_used == SKIP
112
113
  @gateway_transaction_id = gateway_transaction_id unless gateway_transaction_id == SKIP
114
+
115
+ # Add additional model properties to the instance.
116
+ additional_properties.each do |_name, _value|
117
+ instance_variable_set("@#{_name}", _value)
118
+ end
113
119
  end
114
120
 
115
121
  # Creates an instance of the object from a hash.
@@ -138,6 +144,9 @@ module AdvancedBilling
138
144
  gateway_transaction_id =
139
145
  hash.key?('gateway_transaction_id') ? hash['gateway_transaction_id'] : SKIP
140
146
 
147
+ # Clean out expected properties from Hash.
148
+ names.each_value { |k| hash.delete(k) }
149
+
141
150
  # Create object from extracted values.
142
151
  InvoicePayment.new(transaction_time,
143
152
  memo,
@@ -148,7 +157,8 @@ module AdvancedBilling
148
157
  prepayment,
149
158
  gateway_handle,
150
159
  gateway_used,
151
- gateway_transaction_id)
160
+ gateway_transaction_id,
161
+ hash)
152
162
  end
153
163
 
154
164
  def to_custom_transaction_time
@@ -48,10 +48,16 @@ module AdvancedBilling
48
48
 
49
49
  def initialize(invoice_uid = SKIP,
50
50
  application_uid = SKIP,
51
- applied_amount = SKIP)
51
+ applied_amount = SKIP,
52
+ additional_properties = {})
52
53
  @invoice_uid = invoice_uid unless invoice_uid == SKIP
53
54
  @application_uid = application_uid unless application_uid == SKIP
54
55
  @applied_amount = applied_amount unless applied_amount == SKIP
56
+
57
+ # Add additional model properties to the instance.
58
+ additional_properties.each do |_name, _value|
59
+ instance_variable_set("@#{_name}", _value)
60
+ end
55
61
  end
56
62
 
57
63
  # Creates an instance of the object from a hash.
@@ -65,10 +71,14 @@ module AdvancedBilling
65
71
  applied_amount =
66
72
  hash.key?('applied_amount') ? hash['applied_amount'] : SKIP
67
73
 
74
+ # Clean out expected properties from Hash.
75
+ names.each_value { |k| hash.delete(k) }
76
+
68
77
  # Create object from extracted values.
69
78
  InvoicePaymentApplication.new(invoice_uid,
70
79
  application_uid,
71
- applied_amount)
80
+ applied_amount,
81
+ hash)
72
82
  end
73
83
  end
74
84
  end
@@ -83,7 +83,8 @@ module AdvancedBilling
83
83
  card_brand = SKIP,
84
84
  card_expiration = SKIP,
85
85
  last_four = SKIP,
86
- masked_card_number = SKIP)
86
+ masked_card_number = SKIP,
87
+ additional_properties = {})
87
88
  @details = details unless details == SKIP
88
89
  @kind = kind unless kind == SKIP
89
90
  @memo = memo unless memo == SKIP
@@ -92,6 +93,11 @@ module AdvancedBilling
92
93
  @card_expiration = card_expiration unless card_expiration == SKIP
93
94
  @last_four = last_four unless last_four == SKIP
94
95
  @masked_card_number = masked_card_number unless masked_card_number == SKIP
96
+
97
+ # Add additional model properties to the instance.
98
+ additional_properties.each do |_name, _value|
99
+ instance_variable_set("@#{_name}", _value)
100
+ end
95
101
  end
96
102
 
97
103
  # Creates an instance of the object from a hash.
@@ -110,6 +116,9 @@ module AdvancedBilling
110
116
  masked_card_number =
111
117
  hash.key?('masked_card_number') ? hash['masked_card_number'] : SKIP
112
118
 
119
+ # Clean out expected properties from Hash.
120
+ names.each_value { |k| hash.delete(k) }
121
+
113
122
  # Create object from extracted values.
114
123
  InvoicePaymentMethod.new(details,
115
124
  kind,
@@ -118,7 +127,8 @@ module AdvancedBilling
118
127
  card_brand,
119
128
  card_expiration,
120
129
  last_four,
121
- masked_card_number)
130
+ masked_card_number,
131
+ hash)
122
132
  end
123
133
  end
124
134
  end
@@ -10,17 +10,17 @@ module AdvancedBilling
10
10
  private_constant :SKIP
11
11
 
12
12
  # The subscription id for the prepayment account
13
- # @return [String]
13
+ # @return [Integer]
14
14
  attr_accessor :subscription_id
15
15
 
16
16
  # The amount in cents of the prepayment that was created as a result of this
17
17
  # payment.
18
- # @return [String]
18
+ # @return [Integer]
19
19
  attr_accessor :amount_in_cents
20
20
 
21
21
  # The total balance of the prepayment account for this subscription
22
22
  # including any prior prepayments
23
- # @return [String]
23
+ # @return [Integer]
24
24
  attr_accessor :ending_balance_in_cents
25
25
 
26
26
  # A mapping from model property names to API property names.
@@ -48,10 +48,16 @@ module AdvancedBilling
48
48
 
49
49
  def initialize(subscription_id = SKIP,
50
50
  amount_in_cents = SKIP,
51
- ending_balance_in_cents = SKIP)
51
+ ending_balance_in_cents = SKIP,
52
+ additional_properties = {})
52
53
  @subscription_id = subscription_id unless subscription_id == SKIP
53
54
  @amount_in_cents = amount_in_cents unless amount_in_cents == SKIP
54
55
  @ending_balance_in_cents = ending_balance_in_cents unless ending_balance_in_cents == SKIP
56
+
57
+ # Add additional model properties to the instance.
58
+ additional_properties.each do |_name, _value|
59
+ instance_variable_set("@#{_name}", _value)
60
+ end
55
61
  end
56
62
 
57
63
  # Creates an instance of the object from a hash.
@@ -66,10 +72,24 @@ module AdvancedBilling
66
72
  ending_balance_in_cents =
67
73
  hash.key?('ending_balance_in_cents') ? hash['ending_balance_in_cents'] : SKIP
68
74
 
75
+ # Clean out expected properties from Hash.
76
+ names.each_value { |k| hash.delete(k) }
77
+
69
78
  # Create object from extracted values.
70
79
  InvoicePrePayment.new(subscription_id,
71
80
  amount_in_cents,
72
- ending_balance_in_cents)
81
+ ending_balance_in_cents,
82
+ hash)
83
+ end
84
+
85
+ # Validates an instance of the object from a given value.
86
+ # @param [InvoicePrePayment | Hash] The value against the validation is performed.
87
+ def self.validate(value)
88
+ return true if value.instance_of? self
89
+
90
+ return false unless value.instance_of? Hash
91
+
92
+ true
73
93
  end
74
94
  end
75
95
  end
@@ -40,9 +40,15 @@ module AdvancedBilling
40
40
  end
41
41
 
42
42
  def initialize(captured_at = SKIP,
43
- invoices = SKIP)
43
+ invoices = SKIP,
44
+ additional_properties = {})
44
45
  @captured_at = captured_at unless captured_at == SKIP
45
46
  @invoices = invoices unless invoices == SKIP
47
+
48
+ # Add additional model properties to the instance.
49
+ additional_properties.each do |_name, _value|
50
+ instance_variable_set("@#{_name}", _value)
51
+ end
46
52
  end
47
53
 
48
54
  # Creates an instance of the object from a hash.
@@ -66,9 +72,13 @@ module AdvancedBilling
66
72
 
67
73
  invoices = SKIP unless hash.key?('invoices')
68
74
 
75
+ # Clean out expected properties from Hash.
76
+ names.each_value { |k| hash.delete(k) }
77
+
69
78
  # Create object from extracted values.
70
79
  InvoicePreviousBalance.new(captured_at,
71
- invoices)
80
+ invoices,
81
+ hash)
72
82
  end
73
83
 
74
84
  def to_custom_captured_at
@@ -33,6 +33,14 @@ module AdvancedBilling
33
33
  # @return [String]
34
34
  attr_accessor :gateway_transaction_id
35
35
 
36
+ # The transaction ID for the refund as returned from the payment gateway
37
+ # @return [String]
38
+ attr_accessor :gateway_used
39
+
40
+ # The transaction ID for the refund as returned from the payment gateway
41
+ # @return [String]
42
+ attr_accessor :gateway_handle
43
+
36
44
  # A mapping from model property names to API property names.
37
45
  def self.names
38
46
  @_hash = {} if @_hash.nil?
@@ -42,6 +50,8 @@ module AdvancedBilling
42
50
  @_hash['original_amount'] = 'original_amount'
43
51
  @_hash['applied_amount'] = 'applied_amount'
44
52
  @_hash['gateway_transaction_id'] = 'gateway_transaction_id'
53
+ @_hash['gateway_used'] = 'gateway_used'
54
+ @_hash['gateway_handle'] = 'gateway_handle'
45
55
  @_hash
46
56
  end
47
57
 
@@ -54,6 +64,8 @@ module AdvancedBilling
54
64
  original_amount
55
65
  applied_amount
56
66
  gateway_transaction_id
67
+ gateway_used
68
+ gateway_handle
57
69
  ]
58
70
  end
59
71
 
@@ -61,6 +73,7 @@ module AdvancedBilling
61
73
  def self.nullables
62
74
  %w[
63
75
  gateway_transaction_id
76
+ gateway_handle
64
77
  ]
65
78
  end
66
79
 
@@ -69,13 +82,23 @@ module AdvancedBilling
69
82
  memo = SKIP,
70
83
  original_amount = SKIP,
71
84
  applied_amount = SKIP,
72
- gateway_transaction_id = SKIP)
85
+ gateway_transaction_id = SKIP,
86
+ gateway_used = SKIP,
87
+ gateway_handle = SKIP,
88
+ additional_properties = {})
73
89
  @transaction_id = transaction_id unless transaction_id == SKIP
74
90
  @payment_id = payment_id unless payment_id == SKIP
75
91
  @memo = memo unless memo == SKIP
76
92
  @original_amount = original_amount unless original_amount == SKIP
77
93
  @applied_amount = applied_amount unless applied_amount == SKIP
78
94
  @gateway_transaction_id = gateway_transaction_id unless gateway_transaction_id == SKIP
95
+ @gateway_used = gateway_used unless gateway_used == SKIP
96
+ @gateway_handle = gateway_handle unless gateway_handle == SKIP
97
+
98
+ # Add additional model properties to the instance.
99
+ additional_properties.each do |_name, _value|
100
+ instance_variable_set("@#{_name}", _value)
101
+ end
79
102
  end
80
103
 
81
104
  # Creates an instance of the object from a hash.
@@ -93,6 +116,12 @@ module AdvancedBilling
93
116
  hash.key?('applied_amount') ? hash['applied_amount'] : SKIP
94
117
  gateway_transaction_id =
95
118
  hash.key?('gateway_transaction_id') ? hash['gateway_transaction_id'] : SKIP
119
+ gateway_used = hash.key?('gateway_used') ? hash['gateway_used'] : SKIP
120
+ gateway_handle =
121
+ hash.key?('gateway_handle') ? hash['gateway_handle'] : SKIP
122
+
123
+ # Clean out expected properties from Hash.
124
+ names.each_value { |k| hash.delete(k) }
96
125
 
97
126
  # Create object from extracted values.
98
127
  InvoiceRefund.new(transaction_id,
@@ -100,7 +129,10 @@ module AdvancedBilling
100
129
  memo,
101
130
  original_amount,
102
131
  applied_amount,
103
- gateway_transaction_id)
132
+ gateway_transaction_id,
133
+ gateway_used,
134
+ gateway_handle,
135
+ hash)
104
136
  end
105
137
  end
106
138
  end