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
@@ -440,40 +440,6 @@ module AdvancedBilling
440
440
  .execute
441
441
  end
442
442
 
443
- # Sets a new default price point for the component. This new default will
444
- # apply to all new subscriptions going forward - existing subscriptions will
445
- # remain on their current price point.
446
- # See [Price Points
447
- # Documentation](https://chargify.zendesk.com/hc/en-us/articles/440775586588
448
- # 3#price-points) for more information on price points and moving
449
- # subscriptions between price points.
450
- # Note: Custom price points are not able to be set as the default for a
451
- # component.
452
- # @param [Integer] component_id Required parameter: The Chargify id of the
453
- # component to which the price point belongs
454
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
455
- # price point
456
- # @return [ComponentResponse] response from the API call
457
- def promote_component_price_point_to_default(component_id,
458
- price_point_id)
459
- new_api_call_builder
460
- .request(new_request_builder(HttpMethodEnum::PUT,
461
- '/components/{component_id}/price_points/{price_point_id}/default.json',
462
- Server::DEFAULT)
463
- .template_param(new_parameter(component_id, key: 'component_id')
464
- .is_required(true)
465
- .should_encode(true))
466
- .template_param(new_parameter(price_point_id, key: 'price_point_id')
467
- .is_required(true)
468
- .should_encode(true))
469
- .header_param(new_parameter('application/json', key: 'accept'))
470
- .auth(Single.new('BasicAuth')))
471
- .response(new_response_handler
472
- .deserializer(APIHelper.method(:custom_type_deserializer))
473
- .deserialize_into(ComponentResponse.method(:from_hash)))
474
- .execute
475
- end
476
-
477
443
  # This request will return a list of components for a particular product
478
444
  # family.
479
445
  # @param [Integer] product_family_id Required parameter: The Chargify id of
@@ -542,318 +508,5 @@ module AdvancedBilling
542
508
  .is_response_array(true))
543
509
  .execute
544
510
  end
545
-
546
- # This endpoint can be used to create a new price point for an existing
547
- # component.
548
- # @param [Integer] component_id Required parameter: The Chargify id of the
549
- # component
550
- # @param [CreateComponentPricePointRequest] body Optional parameter:
551
- # Example:
552
- # @return [ComponentPricePointResponse] response from the API call
553
- def create_component_price_point(component_id,
554
- body: nil)
555
- new_api_call_builder
556
- .request(new_request_builder(HttpMethodEnum::POST,
557
- '/components/{component_id}/price_points.json',
558
- Server::DEFAULT)
559
- .template_param(new_parameter(component_id, key: 'component_id')
560
- .is_required(true)
561
- .should_encode(true))
562
- .header_param(new_parameter('application/json', key: 'Content-Type'))
563
- .body_param(new_parameter(body))
564
- .header_param(new_parameter('application/json', key: 'accept'))
565
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
566
- .auth(Single.new('BasicAuth')))
567
- .response(new_response_handler
568
- .deserializer(APIHelper.method(:custom_type_deserializer))
569
- .deserialize_into(ComponentPricePointResponse.method(:from_hash)))
570
- .execute
571
- end
572
-
573
- # Use this endpoint to read current price points that are associated with a
574
- # component.
575
- # You may specify the component by using either the numeric id or the
576
- # `handle:gold` syntax.
577
- # When fetching a component's price points, if you have defined multiple
578
- # currencies at the site level, you can optionally pass the
579
- # `?currency_prices=true` query param to include an array of currency price
580
- # data in the response.
581
- # If the price point is set to `use_site_exchange_rate: true`, it will
582
- # return pricing based on the current exchange rate. If the flag is set to
583
- # false, it will return all of the defined prices for each currency.
584
- # @param [Integer] component_id Required parameter: The Chargify id of the
585
- # component
586
- # @param [TrueClass | FalseClass] currency_prices Optional parameter:
587
- # Include an array of currency price data
588
- # @param [Integer] page Optional parameter: Result records are organized in
589
- # pages. By default, the first page of results is displayed. The page
590
- # parameter specifies a page number of results to fetch. You can start
591
- # navigating through the pages to consume the results. You do this by
592
- # passing in a page parameter. Retrieve the next page by adding ?page=2 to
593
- # the query string. If there are no results to return, then an empty result
594
- # set will be returned. Use in query `page=1`.
595
- # @param [Integer] per_page Optional parameter: This parameter indicates how
596
- # many records to fetch in each request. Default value is 20. The maximum
597
- # allowed values is 200; any per_page value over 200 will be changed to 200.
598
- # Use in query `per_page=200`.
599
- # @param [Array[PricePointType]] filter_type Optional parameter: Use in
600
- # query: `filter[type]=catalog,default`.
601
- # @return [ComponentPricePointsResponse] response from the API call
602
- def list_component_price_points(options = {})
603
- new_api_call_builder
604
- .request(new_request_builder(HttpMethodEnum::GET,
605
- '/components/{component_id}/price_points.json',
606
- Server::DEFAULT)
607
- .template_param(new_parameter(options['component_id'], key: 'component_id')
608
- .is_required(true)
609
- .should_encode(true))
610
- .query_param(new_parameter(options['currency_prices'], key: 'currency_prices'))
611
- .query_param(new_parameter(options['page'], key: 'page'))
612
- .query_param(new_parameter(options['per_page'], key: 'per_page'))
613
- .query_param(new_parameter(options['filter_type'], key: 'filter[type]'))
614
- .header_param(new_parameter('application/json', key: 'accept'))
615
- .auth(Single.new('BasicAuth'))
616
- .array_serialization_format(ArraySerializationFormat::CSV))
617
- .response(new_response_handler
618
- .deserializer(APIHelper.method(:custom_type_deserializer))
619
- .deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
620
- .execute
621
- end
622
-
623
- # Use this endpoint to create multiple component price points in one
624
- # request.
625
- # @param [String] component_id Required parameter: The Chargify id of the
626
- # component for which you want to fetch price points.
627
- # @param [CreateComponentPricePointsRequest] body Optional parameter:
628
- # Example:
629
- # @return [ComponentPricePointsResponse] response from the API call
630
- def bulk_create_component_price_points(component_id,
631
- body: nil)
632
- new_api_call_builder
633
- .request(new_request_builder(HttpMethodEnum::POST,
634
- '/components/{component_id}/price_points/bulk.json',
635
- Server::DEFAULT)
636
- .template_param(new_parameter(component_id, key: 'component_id')
637
- .is_required(true)
638
- .should_encode(true))
639
- .header_param(new_parameter('application/json', key: 'Content-Type'))
640
- .body_param(new_parameter(body))
641
- .header_param(new_parameter('application/json', key: 'accept'))
642
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
643
- .auth(Single.new('BasicAuth')))
644
- .response(new_response_handler
645
- .deserializer(APIHelper.method(:custom_type_deserializer))
646
- .deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
647
- .execute
648
- end
649
-
650
- # When updating a price point, it's prices can be updated as well by
651
- # creating new prices or editing / removing existing ones.
652
- # Passing in a price bracket without an `id` will attempt to create a new
653
- # price.
654
- # Including an `id` will update the corresponding price, and including the
655
- # `_destroy` flag set to true along with the `id` will remove that price.
656
- # Note: Custom price points cannot be updated directly. They must be edited
657
- # through the Subscription.
658
- # @param [Integer] component_id Required parameter: The Chargify id of the
659
- # component to which the price point belongs
660
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
661
- # price point
662
- # @param [UpdateComponentPricePointRequest] body Optional parameter:
663
- # Example:
664
- # @return [ComponentPricePointResponse] response from the API call
665
- def update_component_price_point(component_id,
666
- price_point_id,
667
- body: nil)
668
- new_api_call_builder
669
- .request(new_request_builder(HttpMethodEnum::PUT,
670
- '/components/{component_id}/price_points/{price_point_id}.json',
671
- Server::DEFAULT)
672
- .template_param(new_parameter(component_id, key: 'component_id')
673
- .is_required(true)
674
- .should_encode(true))
675
- .template_param(new_parameter(price_point_id, key: 'price_point_id')
676
- .is_required(true)
677
- .should_encode(true))
678
- .header_param(new_parameter('application/json', key: 'Content-Type'))
679
- .body_param(new_parameter(body))
680
- .header_param(new_parameter('application/json', key: 'accept'))
681
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
682
- .auth(Single.new('BasicAuth')))
683
- .response(new_response_handler
684
- .deserializer(APIHelper.method(:custom_type_deserializer))
685
- .deserialize_into(ComponentPricePointResponse.method(:from_hash))
686
- .local_error_template('422',
687
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
688
- ' Response: \'{$response.body}\'.',
689
- ErrorArrayMapResponseException))
690
- .execute
691
- end
692
-
693
- # A price point can be archived at any time. Subscriptions using a price
694
- # point that has been archived will continue using it until they're moved to
695
- # another price point.
696
- # @param [Integer] component_id Required parameter: The Chargify id of the
697
- # component to which the price point belongs
698
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
699
- # price point
700
- # @return [ComponentPricePointResponse] response from the API call
701
- def archive_component_price_point(component_id,
702
- price_point_id)
703
- new_api_call_builder
704
- .request(new_request_builder(HttpMethodEnum::DELETE,
705
- '/components/{component_id}/price_points/{price_point_id}.json',
706
- Server::DEFAULT)
707
- .template_param(new_parameter(component_id, key: 'component_id')
708
- .is_required(true)
709
- .should_encode(true))
710
- .template_param(new_parameter(price_point_id, key: 'price_point_id')
711
- .is_required(true)
712
- .should_encode(true))
713
- .header_param(new_parameter('application/json', key: 'accept'))
714
- .auth(Single.new('BasicAuth')))
715
- .response(new_response_handler
716
- .deserializer(APIHelper.method(:custom_type_deserializer))
717
- .deserialize_into(ComponentPricePointResponse.method(:from_hash))
718
- .local_error_template('422',
719
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
720
- ' Response: \'{$response.body}\'.',
721
- ErrorListResponseException))
722
- .execute
723
- end
724
-
725
- # Use this endpoint to unarchive a component price point.
726
- # @param [Integer] component_id Required parameter: The Chargify id of the
727
- # component to which the price point belongs
728
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
729
- # price point
730
- # @return [ComponentPricePointResponse] response from the API call
731
- def unarchive_component_price_point(component_id,
732
- price_point_id)
733
- new_api_call_builder
734
- .request(new_request_builder(HttpMethodEnum::PUT,
735
- '/components/{component_id}/price_points/{price_point_id}/unarchive.json',
736
- Server::DEFAULT)
737
- .template_param(new_parameter(component_id, key: 'component_id')
738
- .is_required(true)
739
- .should_encode(true))
740
- .template_param(new_parameter(price_point_id, key: 'price_point_id')
741
- .is_required(true)
742
- .should_encode(true))
743
- .header_param(new_parameter('application/json', key: 'accept'))
744
- .auth(Single.new('BasicAuth')))
745
- .response(new_response_handler
746
- .deserializer(APIHelper.method(:custom_type_deserializer))
747
- .deserialize_into(ComponentPricePointResponse.method(:from_hash)))
748
- .execute
749
- end
750
-
751
- # This endpoint allows you to create currency prices for a given currency
752
- # that has been defined on the site level in your settings.
753
- # When creating currency prices, they need to mirror the structure of your
754
- # primary pricing. For each price level defined on the component price
755
- # point, there should be a matching price level created in the given
756
- # currency.
757
- # Note: Currency Prices are not able to be created for custom price points.
758
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
759
- # price point
760
- # @param [CreateCurrencyPricesRequest] body Optional parameter: Example:
761
- # @return [ComponentCurrencyPricesResponse] response from the API call
762
- def create_currency_prices(price_point_id,
763
- body: nil)
764
- new_api_call_builder
765
- .request(new_request_builder(HttpMethodEnum::POST,
766
- '/price_points/{price_point_id}/currency_prices.json',
767
- Server::DEFAULT)
768
- .template_param(new_parameter(price_point_id, key: 'price_point_id')
769
- .is_required(true)
770
- .should_encode(true))
771
- .header_param(new_parameter('application/json', key: 'Content-Type'))
772
- .body_param(new_parameter(body))
773
- .header_param(new_parameter('application/json', key: 'accept'))
774
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
775
- .auth(Single.new('BasicAuth')))
776
- .response(new_response_handler
777
- .deserializer(APIHelper.method(:custom_type_deserializer))
778
- .deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
779
- .local_error('422',
780
- 'Unprocessable Entity (WebDAV)',
781
- ErrorArrayMapResponseException))
782
- .execute
783
- end
784
-
785
- # This endpoint allows you to update currency prices for a given currency
786
- # that has been defined on the site level in your settings.
787
- # Note: Currency Prices are not able to be updated for custom price points.
788
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
789
- # price point
790
- # @param [UpdateCurrencyPricesRequest] body Optional parameter: Example:
791
- # @return [ComponentCurrencyPricesResponse] response from the API call
792
- def update_currency_prices(price_point_id,
793
- body: nil)
794
- new_api_call_builder
795
- .request(new_request_builder(HttpMethodEnum::PUT,
796
- '/price_points/{price_point_id}/currency_prices.json',
797
- Server::DEFAULT)
798
- .template_param(new_parameter(price_point_id, key: 'price_point_id')
799
- .is_required(true)
800
- .should_encode(true))
801
- .header_param(new_parameter('application/json', key: 'Content-Type'))
802
- .body_param(new_parameter(body))
803
- .header_param(new_parameter('application/json', key: 'accept'))
804
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
805
- .auth(Single.new('BasicAuth')))
806
- .response(new_response_handler
807
- .deserializer(APIHelper.method(:custom_type_deserializer))
808
- .deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
809
- .local_error('422',
810
- 'Unprocessable Entity (WebDAV)',
811
- ErrorArrayMapResponseException))
812
- .execute
813
- end
814
-
815
- # This method allows to retrieve a list of Components Price Points belonging
816
- # to a Site.
817
- # @param [ListComponentsPricePointsInclude] include Optional parameter:
818
- # Allows including additional data in the response. Use in query:
819
- # `include=currency_prices`.
820
- # @param [Integer] page Optional parameter: Result records are organized in
821
- # pages. By default, the first page of results is displayed. The page
822
- # parameter specifies a page number of results to fetch. You can start
823
- # navigating through the pages to consume the results. You do this by
824
- # passing in a page parameter. Retrieve the next page by adding ?page=2 to
825
- # the query string. If there are no results to return, then an empty result
826
- # set will be returned. Use in query `page=1`.
827
- # @param [Integer] per_page Optional parameter: This parameter indicates how
828
- # many records to fetch in each request. Default value is 20. The maximum
829
- # allowed values is 200; any per_page value over 200 will be changed to 200.
830
- # Use in query `per_page=200`.
831
- # @param [SortingDirection] direction Optional parameter: Controls the order
832
- # in which results are returned. Use in query `direction=asc`.
833
- # @param [ListPricePointsFilter] filter Optional parameter: Filter to use
834
- # for List PricePoints operations
835
- # @return [ListComponentsPricePointsResponse] response from the API call
836
- def list_all_component_price_points(options = {})
837
- new_api_call_builder
838
- .request(new_request_builder(HttpMethodEnum::GET,
839
- '/components_price_points.json',
840
- Server::DEFAULT)
841
- .query_param(new_parameter(options['include'], key: 'include'))
842
- .query_param(new_parameter(options['page'], key: 'page'))
843
- .query_param(new_parameter(options['per_page'], key: 'per_page'))
844
- .query_param(new_parameter(options['direction'], key: 'direction'))
845
- .query_param(new_parameter(options['filter'], key: 'filter'))
846
- .header_param(new_parameter('application/json', key: 'accept'))
847
- .auth(Single.new('BasicAuth'))
848
- .array_serialization_format(ArraySerializationFormat::CSV))
849
- .response(new_response_handler
850
- .deserializer(APIHelper.method(:custom_type_deserializer))
851
- .deserialize_into(ListComponentsPricePointsResponse.method(:from_hash))
852
- .local_error_template('422',
853
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
854
- ' Response: \'{$response.body}\'.',
855
- ErrorListResponseException))
856
- .execute
857
- end
858
511
  end
859
512
  end
@@ -8,8 +8,8 @@ module AdvancedBilling
8
8
  class ProductFamiliesController < BaseController
9
9
  # This method allows to retrieve a list of Products belonging to a Product
10
10
  # Family.
11
- # @param [Integer] product_family_id Required parameter: The Chargify id of
12
- # the product family to which the product belongs
11
+ # @param [String] product_family_id Required parameter: Either the product
12
+ # family's id or its handle prefixed with `handle:`
13
13
  # @param [Integer] page Optional parameter: Result records are organized in
14
14
  # pages. By default, the first page of results is displayed. The page
15
15
  # parameter specifies a page number of results to fetch. You can start
@@ -96,11 +96,13 @@ module AdvancedBilling
96
96
  # Use this endpoint to update a product price point.
97
97
  # Note: Custom product price points are not able to be updated.
98
98
  # @param [Integer | String] product_id Required parameter: The id or handle
99
- # of the product. When using the handle, it must be prefixed with
100
- # `handle:`
99
+ # of the product. When using the handle, it must be prefixed with `handle:`.
100
+ # Example: `123` for an integer ID, or `handle:example-product-handle` for a
101
+ # string handle.
101
102
  # @param [Integer | String] price_point_id Required parameter: The id or
102
103
  # handle of the price point. When using the handle, it must be prefixed with
103
- # `handle:`
104
+ # `handle:`. Example: `123` for an integer ID, or
105
+ # `handle:example-product-price-point-handle` for a string handle.
104
106
  # @param [UpdateProductPricePointRequest] body Optional parameter:
105
107
  # Example:
106
108
  # @return [ProductPricePointResponse] response from the API call
@@ -137,12 +139,15 @@ module AdvancedBilling
137
139
  end
138
140
 
139
141
  # Use this endpoint to retrieve details for a specific product price point.
142
+ # You can achieve this by using either the product price point ID or handle.
140
143
  # @param [Integer | String] product_id Required parameter: The id or handle
141
- # of the product. When using the handle, it must be prefixed with
142
- # `handle:`
144
+ # of the product. When using the handle, it must be prefixed with `handle:`.
145
+ # Example: `123` for an integer ID, or `handle:example-product-handle` for a
146
+ # string handle.
143
147
  # @param [Integer | String] price_point_id Required parameter: The id or
144
148
  # handle of the price point. When using the handle, it must be prefixed with
145
- # `handle:`
149
+ # `handle:`. Example: `123` for an integer ID, or
150
+ # `handle:example-product-price-point-handle` for a string handle.
146
151
  # @param [TrueClass | FalseClass] currency_prices Optional parameter: When
147
152
  # fetching a product's price points, if you have defined multiple currencies
148
153
  # at the site level, you can optionally pass the ?currency_prices=true query
@@ -183,11 +188,13 @@ module AdvancedBilling
183
188
 
184
189
  # Use this endpoint to archive a product price point.
185
190
  # @param [Integer | String] product_id Required parameter: The id or handle
186
- # of the product. When using the handle, it must be prefixed with
187
- # `handle:`
191
+ # of the product. When using the handle, it must be prefixed with `handle:`.
192
+ # Example: `123` for an integer ID, or `handle:example-product-handle` for a
193
+ # string handle.
188
194
  # @param [Integer | String] price_point_id Required parameter: The id or
189
195
  # handle of the price point. When using the handle, it must be prefixed with
190
- # `handle:`
196
+ # `handle:`. Example: `123` for an integer ID, or
197
+ # `handle:example-product-price-point-handle` for a string handle.
191
198
  # @return [ProductPricePointResponse] response from the API call
192
199
  def archive_product_price_point(product_id,
193
200
  price_point_id)
@@ -13,8 +13,8 @@ module AdvancedBilling
13
13
  # + [Changing a Subscription's
14
14
  # Product](https://maxio-chargify.zendesk.com/hc/en-us/articles/540422533466
15
15
  # 9-Product-Changes-Migrations)
16
- # @param [Integer] product_family_id Required parameter: The Chargify id of
17
- # the product family to which the product belongs
16
+ # @param [String] product_family_id Required parameter: Either the product
17
+ # family's id or its handle prefixed with `handle:`
18
18
  # @param [CreateOrUpdateProductRequest] body Optional parameter: Example:
19
19
  # @return [ProductResponse] response from the API call
20
20
  def create_product(product_family_id,
@@ -47,10 +47,8 @@ module AdvancedBilling
47
47
  ]
48
48
  end
49
49
 
50
- def initialize(balance_in_cents = SKIP,
51
- automatic_balance_in_cents = SKIP,
52
- remittance_balance_in_cents = SKIP,
53
- additional_properties = {})
50
+ def initialize(balance_in_cents: SKIP, automatic_balance_in_cents: SKIP,
51
+ remittance_balance_in_cents: SKIP, additional_properties: {})
54
52
  @balance_in_cents = balance_in_cents unless balance_in_cents == SKIP
55
53
  unless automatic_balance_in_cents == SKIP
56
54
  @automatic_balance_in_cents =
@@ -83,10 +81,10 @@ module AdvancedBilling
83
81
  names.each_value { |k| hash.delete(k) }
84
82
 
85
83
  # Create object from extracted values.
86
- AccountBalance.new(balance_in_cents,
87
- automatic_balance_in_cents,
88
- remittance_balance_in_cents,
89
- hash)
84
+ AccountBalance.new(balance_in_cents: balance_in_cents,
85
+ automatic_balance_in_cents: automatic_balance_in_cents,
86
+ remittance_balance_in_cents: remittance_balance_in_cents,
87
+ additional_properties: hash)
90
88
  end
91
89
  end
92
90
  end
@@ -58,12 +58,9 @@ module AdvancedBilling
58
58
  []
59
59
  end
60
60
 
61
- def initialize(open_invoices = SKIP,
62
- pending_invoices = SKIP,
63
- pending_discounts = SKIP,
64
- service_credits = SKIP,
65
- prepayments = SKIP,
66
- additional_properties = {})
61
+ def initialize(open_invoices: SKIP, pending_invoices: SKIP,
62
+ pending_discounts: SKIP, service_credits: SKIP,
63
+ prepayments: SKIP, additional_properties: {})
67
64
  @open_invoices = open_invoices unless open_invoices == SKIP
68
65
  @pending_invoices = pending_invoices unless pending_invoices == SKIP
69
66
  @pending_discounts = pending_discounts unless pending_discounts == SKIP
@@ -94,12 +91,12 @@ module AdvancedBilling
94
91
  names.each_value { |k| hash.delete(k) }
95
92
 
96
93
  # Create object from extracted values.
97
- AccountBalances.new(open_invoices,
98
- pending_invoices,
99
- pending_discounts,
100
- service_credits,
101
- prepayments,
102
- hash)
94
+ AccountBalances.new(open_invoices: open_invoices,
95
+ pending_invoices: pending_invoices,
96
+ pending_discounts: pending_discounts,
97
+ service_credits: service_credits,
98
+ prepayments: prepayments,
99
+ additional_properties: hash)
103
100
  end
104
101
  end
105
102
  end
@@ -55,11 +55,9 @@ module AdvancedBilling
55
55
  []
56
56
  end
57
57
 
58
- def initialize(agreement_terms = SKIP,
59
- authorizer_first_name = SKIP,
60
- authorizer_last_name = SKIP,
61
- ip_address = SKIP,
62
- additional_properties = {})
58
+ def initialize(agreement_terms: SKIP, authorizer_first_name: SKIP,
59
+ authorizer_last_name: SKIP, ip_address: SKIP,
60
+ additional_properties: {})
63
61
  @agreement_terms = agreement_terms unless agreement_terms == SKIP
64
62
  @authorizer_first_name = authorizer_first_name unless authorizer_first_name == SKIP
65
63
  @authorizer_last_name = authorizer_last_name unless authorizer_last_name == SKIP
@@ -88,11 +86,11 @@ module AdvancedBilling
88
86
  names.each_value { |k| hash.delete(k) }
89
87
 
90
88
  # Create object from extracted values.
91
- ACHAgreement.new(agreement_terms,
92
- authorizer_first_name,
93
- authorizer_last_name,
94
- ip_address,
95
- hash)
89
+ ACHAgreement.new(agreement_terms: agreement_terms,
90
+ authorizer_first_name: authorizer_first_name,
91
+ authorizer_last_name: authorizer_last_name,
92
+ ip_address: ip_address,
93
+ additional_properties: hash)
96
94
  end
97
95
 
98
96
  # Validates an instance of the object from a given value.
@@ -38,8 +38,7 @@ module AdvancedBilling
38
38
  ]
39
39
  end
40
40
 
41
- def initialize(revert_on_failure = SKIP,
42
- additional_properties = {})
41
+ def initialize(revert_on_failure: SKIP, additional_properties: {})
43
42
  @revert_on_failure = revert_on_failure unless revert_on_failure == SKIP
44
43
 
45
44
  # Add additional model properties to the instance.
@@ -60,8 +59,8 @@ module AdvancedBilling
60
59
  names.each_value { |k| hash.delete(k) }
61
60
 
62
61
  # Create object from extracted values.
63
- ActivateSubscriptionRequest.new(revert_on_failure,
64
- hash)
62
+ ActivateSubscriptionRequest.new(revert_on_failure: revert_on_failure,
63
+ additional_properties: hash)
65
64
  end
66
65
  end
67
66
  end
@@ -32,8 +32,7 @@ module AdvancedBilling
32
32
  []
33
33
  end
34
34
 
35
- def initialize(codes = SKIP,
36
- additional_properties = {})
35
+ def initialize(codes: SKIP, additional_properties: {})
37
36
  @codes = codes unless codes == 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
- AddCouponsRequest.new(codes,
57
- hash)
55
+ AddCouponsRequest.new(codes: codes,
56
+ additional_properties: hash)
58
57
  end
59
58
  end
60
59
  end
@@ -32,8 +32,7 @@ module AdvancedBilling
32
32
  []
33
33
  end
34
34
 
35
- def initialize(group = SKIP,
36
- additional_properties = {})
35
+ def initialize(group: SKIP, additional_properties: {})
37
36
  @group = group unless group == SKIP
38
37
 
39
38
  # Add additional model properties to the instance.
@@ -55,8 +54,8 @@ module AdvancedBilling
55
54
  names.each_value { |k| hash.delete(k) }
56
55
 
57
56
  # Create object from extracted values.
58
- AddSubscriptionToAGroup.new(group,
59
- hash)
57
+ AddSubscriptionToAGroup.new(group: group,
58
+ additional_properties: hash)
60
59
  end
61
60
 
62
61
  # Validates an instance of the object from a given value.
@@ -35,9 +35,7 @@ module AdvancedBilling
35
35
  []
36
36
  end
37
37
 
38
- def initialize(before = nil,
39
- after = nil,
40
- additional_properties = {})
38
+ def initialize(before:, after:, additional_properties: {})
41
39
  @before = before
42
40
  @after = after
43
41
 
@@ -59,9 +57,9 @@ module AdvancedBilling
59
57
  names.each_value { |k| hash.delete(k) }
60
58
 
61
59
  # Create object from extracted values.
62
- AddressChange.new(before,
63
- after,
64
- hash)
60
+ AddressChange.new(before: before,
61
+ after: after,
62
+ additional_properties: hash)
65
63
  end
66
64
  end
67
65
  end