subtain-apimatic-sdk 2.4.69 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (711) hide show
  1. checksums.yaml +4 -4
  2. data/bin/arch +1 -0
  3. data/bin/ash +1 -0
  4. data/bin/base64 +1 -0
  5. data/bin/bbconfig +1 -0
  6. data/bin/busybox +0 -0
  7. data/bin/cat +1 -0
  8. data/bin/chattr +1 -0
  9. data/bin/chgrp +1 -0
  10. data/bin/chmod +1 -0
  11. data/bin/chown +1 -0
  12. data/bin/cp +1 -0
  13. data/bin/date +1 -0
  14. data/bin/dd +1 -0
  15. data/bin/df +1 -0
  16. data/bin/dmesg +1 -0
  17. data/bin/dnsdomainname +1 -0
  18. data/bin/dumpkmap +1 -0
  19. data/bin/echo +1 -0
  20. data/bin/ed +1 -0
  21. data/bin/egrep +1 -0
  22. data/bin/false +1 -0
  23. data/bin/fatattr +1 -0
  24. data/bin/fdflush +1 -0
  25. data/bin/fgrep +1 -0
  26. data/bin/fsync +1 -0
  27. data/bin/getopt +1 -0
  28. data/bin/grep +1 -0
  29. data/bin/gunzip +1 -0
  30. data/bin/gzip +1 -0
  31. data/bin/hostname +1 -0
  32. data/bin/ionice +1 -0
  33. data/bin/iostat +1 -0
  34. data/bin/ipcalc +1 -0
  35. data/bin/kbd_mode +1 -0
  36. data/bin/kill +1 -0
  37. data/bin/link +1 -0
  38. data/bin/linux32 +1 -0
  39. data/bin/linux64 +1 -0
  40. data/bin/ln +1 -0
  41. data/bin/login +1 -0
  42. data/bin/ls +1 -0
  43. data/bin/lsattr +1 -0
  44. data/bin/lzop +1 -0
  45. data/bin/makemime +1 -0
  46. data/bin/mkdir +1 -0
  47. data/bin/mknod +1 -0
  48. data/bin/mktemp +1 -0
  49. data/bin/more +1 -0
  50. data/bin/mount +1 -0
  51. data/bin/mountpoint +1 -0
  52. data/bin/mpstat +1 -0
  53. data/bin/mv +1 -0
  54. data/bin/netstat +1 -0
  55. data/bin/nice +1 -0
  56. data/bin/pidof +0 -0
  57. data/bin/ping +1 -0
  58. data/bin/ping6 +1 -0
  59. data/bin/pipe_progress +1 -0
  60. data/bin/printenv +1 -0
  61. data/bin/ps +0 -0
  62. data/bin/pwait +0 -0
  63. data/bin/pwd +1 -0
  64. data/bin/reformime +1 -0
  65. data/bin/rev +1 -0
  66. data/bin/rm +1 -0
  67. data/bin/rmdir +1 -0
  68. data/bin/run-parts +1 -0
  69. data/bin/sed +1 -0
  70. data/bin/setpriv +1 -0
  71. data/bin/setserial +1 -0
  72. data/bin/sh +1 -0
  73. data/bin/slabtop +0 -0
  74. data/bin/sleep +1 -0
  75. data/bin/stat +1 -0
  76. data/bin/stty +1 -0
  77. data/bin/su +1 -0
  78. data/bin/sync +1 -0
  79. data/bin/tar +1 -0
  80. data/bin/tload +0 -0
  81. data/bin/touch +1 -0
  82. data/bin/true +1 -0
  83. data/bin/umount +1 -0
  84. data/bin/uname +1 -0
  85. data/bin/usleep +1 -0
  86. data/bin/vmstat +0 -0
  87. data/bin/w +0 -0
  88. data/bin/watch +0 -0
  89. data/bin/zcat +1 -0
  90. data/lib/apk/db/installed +3582 -0
  91. data/lib/apk/db/lock +0 -0
  92. data/lib/apk/db/scripts.tar +0 -0
  93. data/lib/apk/db/triggers +2 -0
  94. data/lib/ld-musl-x86_64.so.1 +0 -0
  95. data/lib/libapk.so.3.12.0 +0 -0
  96. data/lib/libc.musl-x86_64.so.1 +1 -0
  97. data/lib/libcrypto.so.1.1 +0 -0
  98. data/lib/libprocps.so.8 +1 -0
  99. data/lib/libprocps.so.8.0.3 +0 -0
  100. data/lib/libssl.so.1.1 +0 -0
  101. data/lib/libz.so +1 -0
  102. data/lib/libz.so.1 +1 -0
  103. data/lib/libz.so.1.2.12 +0 -0
  104. data/lib/sysctl.d/00-alpine.conf +40 -0
  105. metadata +105 -608
  106. data/LICENSE +0 -28
  107. data/README.md +0 -377
  108. data/lib/advanced_billing/api_helper.rb +0 -10
  109. data/lib/advanced_billing/client.rb +0 -243
  110. data/lib/advanced_billing/configuration.rb +0 -158
  111. data/lib/advanced_billing/controllers/advance_invoice_controller.rb +0 -126
  112. data/lib/advanced_billing/controllers/api_exports_controller.rb +0 -268
  113. data/lib/advanced_billing/controllers/base_controller.rb +0 -71
  114. data/lib/advanced_billing/controllers/billing_portal_controller.rb +0 -165
  115. data/lib/advanced_billing/controllers/components_controller.rb +0 -747
  116. data/lib/advanced_billing/controllers/coupons_controller.rb +0 -691
  117. data/lib/advanced_billing/controllers/custom_fields_controller.rb +0 -465
  118. data/lib/advanced_billing/controllers/customers_controller.rb +0 -255
  119. data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +0 -334
  120. data/lib/advanced_billing/controllers/events_controller.rb +0 -229
  121. data/lib/advanced_billing/controllers/insights_controller.rb +0 -168
  122. data/lib/advanced_billing/controllers/invoices_controller.rb +0 -953
  123. data/lib/advanced_billing/controllers/offers_controller.rb +0 -132
  124. data/lib/advanced_billing/controllers/payment_profiles_controller.rb +0 -732
  125. data/lib/advanced_billing/controllers/product_families_controller.rb +0 -187
  126. data/lib/advanced_billing/controllers/product_price_points_controller.rb +0 -422
  127. data/lib/advanced_billing/controllers/products_controller.rb +0 -220
  128. data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +0 -381
  129. data/lib/advanced_billing/controllers/reason_codes_controller.rb +0 -158
  130. data/lib/advanced_billing/controllers/referral_codes_controller.rb +0 -42
  131. data/lib/advanced_billing/controllers/sales_commissions_controller.rb +0 -192
  132. data/lib/advanced_billing/controllers/sites_controller.rb +0 -96
  133. data/lib/advanced_billing/controllers/subscription_components_controller.rb +0 -992
  134. data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +0 -163
  135. data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +0 -157
  136. data/lib/advanced_billing/controllers/subscription_groups_controller.rb +0 -300
  137. data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +0 -226
  138. data/lib/advanced_billing/controllers/subscription_notes_controller.rb +0 -159
  139. data/lib/advanced_billing/controllers/subscription_products_controller.rb +0 -166
  140. data/lib/advanced_billing/controllers/subscription_status_controller.rb +0 -473
  141. data/lib/advanced_billing/controllers/subscriptions_controller.rb +0 -1357
  142. data/lib/advanced_billing/controllers/webhooks_controller.rb +0 -210
  143. data/lib/advanced_billing/exceptions/api_exception.rb +0 -10
  144. data/lib/advanced_billing/exceptions/component_allocation_error_exception.rb +0 -41
  145. data/lib/advanced_billing/exceptions/component_price_point_error_exception.rb +0 -41
  146. data/lib/advanced_billing/exceptions/customer_error_response_exception.rb +0 -34
  147. data/lib/advanced_billing/exceptions/error_list_response_exception.rb +0 -32
  148. data/lib/advanced_billing/exceptions/error_map_response_exception.rb +0 -32
  149. data/lib/advanced_billing/exceptions/event_based_billing_list_segments_errors_exception.rb +0 -32
  150. data/lib/advanced_billing/exceptions/event_based_billing_segment_errors_exception.rb +0 -35
  151. data/lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb +0 -32
  152. data/lib/advanced_billing/exceptions/nested_error_response_exception.rb +0 -32
  153. data/lib/advanced_billing/exceptions/proforma_bad_request_error_response_exception.rb +0 -32
  154. data/lib/advanced_billing/exceptions/refund_prepayment_aggregated_errors_response_exception.rb +0 -33
  155. data/lib/advanced_billing/exceptions/refund_prepayment_base_errors_response_exception.rb +0 -32
  156. data/lib/advanced_billing/exceptions/single_error_response_exception.rb +0 -32
  157. data/lib/advanced_billing/exceptions/single_string_error_response_exception.rb +0 -32
  158. data/lib/advanced_billing/exceptions/subscription_add_coupon_error_exception.rb +0 -42
  159. data/lib/advanced_billing/exceptions/subscription_component_allocation_error_exception.rb +0 -41
  160. data/lib/advanced_billing/exceptions/subscription_group_signup_error_response_exception.rb +0 -32
  161. data/lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb +0 -32
  162. data/lib/advanced_billing/exceptions/subscription_remove_coupon_errors_exception.rb +0 -32
  163. data/lib/advanced_billing/exceptions/subscriptions_mrr_error_response_exception.rb +0 -32
  164. data/lib/advanced_billing/exceptions/too_many_management_link_requests_error_exception.rb +0 -32
  165. data/lib/advanced_billing/http/auth/basic_auth.rb +0 -50
  166. data/lib/advanced_billing/http/http_call_back.rb +0 -10
  167. data/lib/advanced_billing/http/http_method_enum.rb +0 -10
  168. data/lib/advanced_billing/http/http_request.rb +0 -10
  169. data/lib/advanced_billing/http/http_response.rb +0 -10
  170. data/lib/advanced_billing/models/account_balance.rb +0 -51
  171. data/lib/advanced_billing/models/account_balances.rb +0 -83
  172. data/lib/advanced_billing/models/ach_agreement.rb +0 -88
  173. data/lib/advanced_billing/models/activate_subscription_request.rb +0 -57
  174. data/lib/advanced_billing/models/add_coupons_request.rb +0 -50
  175. data/lib/advanced_billing/models/add_subscription_to_a_group.rb +0 -62
  176. data/lib/advanced_billing/models/agreement_acceptance.rb +0 -117
  177. data/lib/advanced_billing/models/allocate_components.rb +0 -131
  178. data/lib/advanced_billing/models/allocation.rb +0 -239
  179. data/lib/advanced_billing/models/allocation_expiration_date.rb +0 -50
  180. data/lib/advanced_billing/models/allocation_payment.rb +0 -91
  181. data/lib/advanced_billing/models/allocation_preview.rb +0 -197
  182. data/lib/advanced_billing/models/allocation_preview_item.rb +0 -194
  183. data/lib/advanced_billing/models/allocation_preview_line_item.rb +0 -135
  184. data/lib/advanced_billing/models/allocation_preview_response.rb +0 -49
  185. data/lib/advanced_billing/models/allocation_response.rb +0 -50
  186. data/lib/advanced_billing/models/allocation_settings.rb +0 -75
  187. data/lib/advanced_billing/models/applied_credit_note.rb +0 -60
  188. data/lib/advanced_billing/models/apply_credit_note_event_data.rb +0 -179
  189. data/lib/advanced_billing/models/apply_debit_note_event_data.rb +0 -96
  190. data/lib/advanced_billing/models/apply_payment_event_data.rb +0 -133
  191. data/lib/advanced_billing/models/attribute_error.rb +0 -48
  192. data/lib/advanced_billing/models/auto_invite.rb +0 -23
  193. data/lib/advanced_billing/models/auto_resume.rb +0 -51
  194. data/lib/advanced_billing/models/bank_account.rb +0 -281
  195. data/lib/advanced_billing/models/bank_account_attributes.rb +0 -179
  196. data/lib/advanced_billing/models/bank_account_payment_profile.rb +0 -296
  197. data/lib/advanced_billing/models/bank_account_response.rb +0 -48
  198. data/lib/advanced_billing/models/bank_account_type.rb +0 -23
  199. data/lib/advanced_billing/models/bank_account_vault.rb +0 -32
  200. data/lib/advanced_billing/models/bank_account_verification.rb +0 -62
  201. data/lib/advanced_billing/models/bank_account_verification_request.rb +0 -50
  202. data/lib/advanced_billing/models/base_model.rb +0 -62
  203. data/lib/advanced_billing/models/base_refund_error.rb +0 -50
  204. data/lib/advanced_billing/models/base_string_error.rb +0 -50
  205. data/lib/advanced_billing/models/basic_date_field.rb +0 -23
  206. data/lib/advanced_billing/models/batch_job.rb +0 -94
  207. data/lib/advanced_billing/models/batch_job_response.rb +0 -48
  208. data/lib/advanced_billing/models/billing_address.rb +0 -107
  209. data/lib/advanced_billing/models/billing_manifest.rb +0 -147
  210. data/lib/advanced_billing/models/billing_manifest_item.rb +0 -189
  211. data/lib/advanced_billing/models/breakouts.rb +0 -84
  212. data/lib/advanced_billing/models/bulk_component_s_price_point_assignment.rb +0 -59
  213. data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +0 -57
  214. data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +0 -59
  215. data/lib/advanced_billing/models/bulk_create_segments.rb +0 -59
  216. data/lib/advanced_billing/models/bulk_update_segments.rb +0 -59
  217. data/lib/advanced_billing/models/bulk_update_segments_item.rb +0 -82
  218. data/lib/advanced_billing/models/calendar_billing.rb +0 -79
  219. data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +0 -51
  220. data/lib/advanced_billing/models/cancellation_method.rb +0 -30
  221. data/lib/advanced_billing/models/cancellation_options.rb +0 -63
  222. data/lib/advanced_billing/models/cancellation_request.rb +0 -48
  223. data/lib/advanced_billing/models/card_type.rb +0 -56
  224. data/lib/advanced_billing/models/card_type1.rb +0 -116
  225. data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +0 -72
  226. data/lib/advanced_billing/models/chargify_ebb.rb +0 -116
  227. data/lib/advanced_billing/models/cleanup_scope.rb +0 -26
  228. data/lib/advanced_billing/models/component.rb +0 -421
  229. data/lib/advanced_billing/models/component_allocation_change.rb +0 -146
  230. data/lib/advanced_billing/models/component_allocation_error_item.rb +0 -80
  231. data/lib/advanced_billing/models/component_cost_data.rb +0 -139
  232. data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +0 -94
  233. data/lib/advanced_billing/models/component_custom_price.rb +0 -82
  234. data/lib/advanced_billing/models/component_kind.rb +0 -32
  235. data/lib/advanced_billing/models/component_kind_path.rb +0 -32
  236. data/lib/advanced_billing/models/component_price.rb +0 -127
  237. data/lib/advanced_billing/models/component_price_point.rb +0 -201
  238. data/lib/advanced_billing/models/component_price_point_error_item.rb +0 -70
  239. data/lib/advanced_billing/models/component_price_point_item.rb +0 -90
  240. data/lib/advanced_billing/models/component_price_point_price.rb +0 -127
  241. data/lib/advanced_billing/models/component_price_point_response.rb +0 -48
  242. data/lib/advanced_billing/models/component_price_points_response.rb +0 -59
  243. data/lib/advanced_billing/models/component_response.rb +0 -48
  244. data/lib/advanced_billing/models/component_s_price_point_assignment.rb +0 -72
  245. data/lib/advanced_billing/models/compounding_strategy.rb +0 -23
  246. data/lib/advanced_billing/models/consolidated_invoice.rb +0 -59
  247. data/lib/advanced_billing/models/count_response.rb +0 -50
  248. data/lib/advanced_billing/models/coupon.rb +0 -382
  249. data/lib/advanced_billing/models/coupon_currency.rb +0 -80
  250. data/lib/advanced_billing/models/coupon_currency_request.rb +0 -57
  251. data/lib/advanced_billing/models/coupon_response.rb +0 -50
  252. data/lib/advanced_billing/models/coupon_restriction.rb +0 -92
  253. data/lib/advanced_billing/models/coupon_subcodes.rb +0 -50
  254. data/lib/advanced_billing/models/coupon_subcodes_response.rb +0 -71
  255. data/lib/advanced_billing/models/coupon_usage.rb +0 -118
  256. data/lib/advanced_billing/models/create_allocation.rb +0 -166
  257. data/lib/advanced_billing/models/create_allocation_request.rb +0 -48
  258. data/lib/advanced_billing/models/create_component_price_point.rb +0 -124
  259. data/lib/advanced_billing/models/create_component_price_point_request.rb +0 -64
  260. data/lib/advanced_billing/models/create_component_price_points_request.rb +0 -64
  261. data/lib/advanced_billing/models/create_currency_price.rb +0 -70
  262. data/lib/advanced_billing/models/create_currency_prices_request.rb +0 -57
  263. data/lib/advanced_billing/models/create_customer.rb +0 -221
  264. data/lib/advanced_billing/models/create_customer_request.rb +0 -48
  265. data/lib/advanced_billing/models/create_ebb_component.rb +0 -63
  266. data/lib/advanced_billing/models/create_invoice.rb +0 -168
  267. data/lib/advanced_billing/models/create_invoice_address.rb +0 -130
  268. data/lib/advanced_billing/models/create_invoice_coupon.rb +0 -118
  269. data/lib/advanced_billing/models/create_invoice_item.rb +0 -192
  270. data/lib/advanced_billing/models/create_invoice_payment.rb +0 -92
  271. data/lib/advanced_billing/models/create_invoice_payment_application.rb +0 -58
  272. data/lib/advanced_billing/models/create_invoice_payment_request.rb +0 -59
  273. data/lib/advanced_billing/models/create_invoice_request.rb +0 -48
  274. data/lib/advanced_billing/models/create_metadata.rb +0 -60
  275. data/lib/advanced_billing/models/create_metadata_request.rb +0 -57
  276. data/lib/advanced_billing/models/create_metafield.rb +0 -106
  277. data/lib/advanced_billing/models/create_metafields_request.rb +0 -64
  278. data/lib/advanced_billing/models/create_metered_component.rb +0 -63
  279. data/lib/advanced_billing/models/create_multi_invoice_payment.rb +0 -133
  280. data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +0 -48
  281. data/lib/advanced_billing/models/create_offer.rb +0 -120
  282. data/lib/advanced_billing/models/create_offer_component.rb +0 -61
  283. data/lib/advanced_billing/models/create_offer_request.rb +0 -48
  284. data/lib/advanced_billing/models/create_on_off_component.rb +0 -63
  285. data/lib/advanced_billing/models/create_or_update_coupon.rb +0 -86
  286. data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +0 -220
  287. data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +0 -221
  288. data/lib/advanced_billing/models/create_or_update_product.rb +0 -139
  289. data/lib/advanced_billing/models/create_or_update_product_request.rb +0 -48
  290. data/lib/advanced_billing/models/create_or_update_segment_price.rb +0 -88
  291. data/lib/advanced_billing/models/create_payment.rb +0 -77
  292. data/lib/advanced_billing/models/create_payment_profile.rb +0 -432
  293. data/lib/advanced_billing/models/create_payment_profile_request.rb +0 -49
  294. data/lib/advanced_billing/models/create_payment_profile_response.rb +0 -49
  295. data/lib/advanced_billing/models/create_prepaid_component.rb +0 -63
  296. data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +0 -192
  297. data/lib/advanced_billing/models/create_prepayment.rb +0 -93
  298. data/lib/advanced_billing/models/create_prepayment_request.rb +0 -48
  299. data/lib/advanced_billing/models/create_prepayment_response.rb +0 -48
  300. data/lib/advanced_billing/models/create_product_currency_price.rb +0 -66
  301. data/lib/advanced_billing/models/create_product_currency_prices_request.rb +0 -57
  302. data/lib/advanced_billing/models/create_product_family.rb +0 -62
  303. data/lib/advanced_billing/models/create_product_family_request.rb +0 -49
  304. data/lib/advanced_billing/models/create_product_price_point.rb +0 -188
  305. data/lib/advanced_billing/models/create_product_price_point_request.rb +0 -48
  306. data/lib/advanced_billing/models/create_quantity_based_component.rb +0 -64
  307. data/lib/advanced_billing/models/create_reason_code.rb +0 -68
  308. data/lib/advanced_billing/models/create_reason_code_request.rb +0 -48
  309. data/lib/advanced_billing/models/create_segment.rb +0 -145
  310. data/lib/advanced_billing/models/create_segment_request.rb +0 -48
  311. data/lib/advanced_billing/models/create_subscription.rb +0 -718
  312. data/lib/advanced_billing/models/create_subscription_component.rb +0 -126
  313. data/lib/advanced_billing/models/create_subscription_group.rb +0 -75
  314. data/lib/advanced_billing/models/create_subscription_group_request.rb +0 -49
  315. data/lib/advanced_billing/models/create_subscription_request.rb +0 -48
  316. data/lib/advanced_billing/models/create_usage.rb +0 -74
  317. data/lib/advanced_billing/models/create_usage_request.rb +0 -48
  318. data/lib/advanced_billing/models/created_payment_profile.rb +0 -341
  319. data/lib/advanced_billing/models/created_prepayment.rb +0 -117
  320. data/lib/advanced_billing/models/credit_account_balance_changed.rb +0 -122
  321. data/lib/advanced_billing/models/credit_card_attributes.rb +0 -72
  322. data/lib/advanced_billing/models/credit_card_payment_profile.rb +0 -288
  323. data/lib/advanced_billing/models/credit_note.rb +0 -409
  324. data/lib/advanced_billing/models/credit_note1.rb +0 -411
  325. data/lib/advanced_billing/models/credit_note_application.rb +0 -92
  326. data/lib/advanced_billing/models/credit_note_line_item.rb +0 -245
  327. data/lib/advanced_billing/models/credit_scheme.rb +0 -26
  328. data/lib/advanced_billing/models/credit_scheme_request.rb +0 -48
  329. data/lib/advanced_billing/models/credit_type.rb +0 -27
  330. data/lib/advanced_billing/models/credit_type1.rb +0 -28
  331. data/lib/advanced_billing/models/currency_price.rb +0 -102
  332. data/lib/advanced_billing/models/currency_price_role.rb +0 -26
  333. data/lib/advanced_billing/models/current_vault.rb +0 -99
  334. data/lib/advanced_billing/models/custom_field_value_change.rb +0 -148
  335. data/lib/advanced_billing/models/custom_price_used_for_subscription_create_update.rb +0 -203
  336. data/lib/advanced_billing/models/customer.rb +0 -358
  337. data/lib/advanced_billing/models/customer1.rb +0 -114
  338. data/lib/advanced_billing/models/customer_attributes.rb +0 -243
  339. data/lib/advanced_billing/models/customer_billing_address_change.rb +0 -60
  340. data/lib/advanced_billing/models/customer_change.rb +0 -83
  341. data/lib/advanced_billing/models/customer_changes_preview_response.rb +0 -48
  342. data/lib/advanced_billing/models/customer_custom_fields_change.rb +0 -78
  343. data/lib/advanced_billing/models/customer_error.rb +0 -60
  344. data/lib/advanced_billing/models/customer_payer_change.rb +0 -60
  345. data/lib/advanced_billing/models/customer_response.rb +0 -48
  346. data/lib/advanced_billing/models/customer_shipping_address_change.rb +0 -60
  347. data/lib/advanced_billing/models/deduct_service_credit.rb +0 -81
  348. data/lib/advanced_billing/models/deduct_service_credit_request.rb +0 -48
  349. data/lib/advanced_billing/models/delayed_cancellation_response.rb +0 -50
  350. data/lib/advanced_billing/models/delete_subscription_group_response.rb +0 -60
  351. data/lib/advanced_billing/models/direction.rb +0 -23
  352. data/lib/advanced_billing/models/discount_type.rb +0 -23
  353. data/lib/advanced_billing/models/dunner_data.rb +0 -96
  354. data/lib/advanced_billing/models/dunning_step_data.rb +0 -120
  355. data/lib/advanced_billing/models/dunning_step_reached.rb +0 -92
  356. data/lib/advanced_billing/models/ebb_component.rb +0 -280
  357. data/lib/advanced_billing/models/ebb_event.rb +0 -50
  358. data/lib/advanced_billing/models/enable_webhooks_request.rb +0 -49
  359. data/lib/advanced_billing/models/enable_webhooks_response.rb +0 -51
  360. data/lib/advanced_billing/models/endpoint.rb +0 -91
  361. data/lib/advanced_billing/models/endpoint_response.rb +0 -50
  362. data/lib/advanced_billing/models/errors.rb +0 -60
  363. data/lib/advanced_billing/models/event.rb +0 -149
  364. data/lib/advanced_billing/models/event_based_billing_segment_error.rb +0 -51
  365. data/lib/advanced_billing/models/event_response.rb +0 -48
  366. data/lib/advanced_billing/models/event_type.rb +0 -121
  367. data/lib/advanced_billing/models/extended_interval_unit.rb +0 -26
  368. data/lib/advanced_billing/models/failed_payment_action.rb +0 -37
  369. data/lib/advanced_billing/models/first_charge_type.rb +0 -26
  370. data/lib/advanced_billing/models/full_subscription_group_response.rb +0 -171
  371. data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +0 -261
  372. data/lib/advanced_billing/models/get_one_time_token_request.rb +0 -49
  373. data/lib/advanced_billing/models/group_billing.rb +0 -77
  374. data/lib/advanced_billing/models/group_settings.rb +0 -75
  375. data/lib/advanced_billing/models/group_target.rb +0 -62
  376. data/lib/advanced_billing/models/group_target_type.rb +0 -32
  377. data/lib/advanced_billing/models/holder_type.rb +0 -23
  378. data/lib/advanced_billing/models/include_not_null.rb +0 -20
  379. data/lib/advanced_billing/models/include_option.rb +0 -23
  380. data/lib/advanced_billing/models/interval_unit.rb +0 -23
  381. data/lib/advanced_billing/models/invoice.rb +0 -733
  382. data/lib/advanced_billing/models/invoice_address.rb +0 -107
  383. data/lib/advanced_billing/models/invoice_balance_item.rb +0 -71
  384. data/lib/advanced_billing/models/invoice_consolidation_level.rb +0 -34
  385. data/lib/advanced_billing/models/invoice_credit.rb +0 -115
  386. data/lib/advanced_billing/models/invoice_custom_field.rb +0 -80
  387. data/lib/advanced_billing/models/invoice_customer.rb +0 -115
  388. data/lib/advanced_billing/models/invoice_date_field.rb +0 -32
  389. data/lib/advanced_billing/models/invoice_discount.rb +0 -174
  390. data/lib/advanced_billing/models/invoice_discount_breakout.rb +0 -72
  391. data/lib/advanced_billing/models/invoice_display_settings.rb +0 -65
  392. data/lib/advanced_billing/models/invoice_event.rb +0 -105
  393. data/lib/advanced_billing/models/invoice_event1.rb +0 -389
  394. data/lib/advanced_billing/models/invoice_event_type.rb +0 -50
  395. data/lib/advanced_billing/models/invoice_issued.rb +0 -258
  396. data/lib/advanced_billing/models/invoice_line_item.rb +0 -332
  397. data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +0 -69
  398. data/lib/advanced_billing/models/invoice_line_item_event_data.rb +0 -263
  399. data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +0 -60
  400. data/lib/advanced_billing/models/invoice_payer.rb +0 -103
  401. data/lib/advanced_billing/models/invoice_payment.rb +0 -150
  402. data/lib/advanced_billing/models/invoice_payment_application.rb +0 -74
  403. data/lib/advanced_billing/models/invoice_payment_method.rb +0 -124
  404. data/lib/advanced_billing/models/invoice_payment_method_type.rb +0 -35
  405. data/lib/advanced_billing/models/invoice_payment_type.rb +0 -29
  406. data/lib/advanced_billing/models/invoice_previous_balance.rb +0 -69
  407. data/lib/advanced_billing/models/invoice_refund.rb +0 -106
  408. data/lib/advanced_billing/models/invoice_response.rb +0 -48
  409. data/lib/advanced_billing/models/invoice_seller.rb +0 -83
  410. data/lib/advanced_billing/models/invoice_sort_field.rb +0 -41
  411. data/lib/advanced_billing/models/invoice_tax.rb +0 -172
  412. data/lib/advanced_billing/models/invoice_tax_breakout.rb +0 -71
  413. data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +0 -81
  414. data/lib/advanced_billing/models/issue_advance_invoice_request.rb +0 -50
  415. data/lib/advanced_billing/models/issue_invoice_event_data.rb +0 -118
  416. data/lib/advanced_billing/models/issue_invoice_request.rb +0 -63
  417. data/lib/advanced_billing/models/issue_service_credit.rb +0 -81
  418. data/lib/advanced_billing/models/issue_service_credit_request.rb +0 -49
  419. data/lib/advanced_billing/models/item_category.rb +0 -33
  420. data/lib/advanced_billing/models/item_price_point_changed.rb +0 -133
  421. data/lib/advanced_billing/models/item_price_point_data.rb +0 -70
  422. data/lib/advanced_billing/models/list_components_price_points_include.rb +0 -20
  423. data/lib/advanced_billing/models/list_components_price_points_response.rb +0 -57
  424. data/lib/advanced_billing/models/list_credit_notes_response.rb +0 -57
  425. data/lib/advanced_billing/models/list_events_date_field.rb +0 -20
  426. data/lib/advanced_billing/models/list_invoice_events_response.rb +0 -89
  427. data/lib/advanced_billing/models/list_invoices_response.rb +0 -57
  428. data/lib/advanced_billing/models/list_metafields_response.rb +0 -99
  429. data/lib/advanced_billing/models/list_mrr_response.rb +0 -48
  430. data/lib/advanced_billing/models/list_mrr_response_result.rb +0 -120
  431. data/lib/advanced_billing/models/list_offers_response.rb +0 -59
  432. data/lib/advanced_billing/models/list_payment_profile_item.rb +0 -285
  433. data/lib/advanced_billing/models/list_payment_profiles_response.rb +0 -51
  434. data/lib/advanced_billing/models/list_product_price_points_response.rb +0 -57
  435. data/lib/advanced_billing/models/list_products_include.rb +0 -20
  436. data/lib/advanced_billing/models/list_products_price_points_include.rb +0 -20
  437. data/lib/advanced_billing/models/list_public_keys_meta.rb +0 -80
  438. data/lib/advanced_billing/models/list_public_keys_response.rb +0 -69
  439. data/lib/advanced_billing/models/list_sale_rep_item.rb +0 -93
  440. data/lib/advanced_billing/models/list_segments_response.rb +0 -59
  441. data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +0 -142
  442. data/lib/advanced_billing/models/list_subscription_components_include.rb +0 -20
  443. data/lib/advanced_billing/models/list_subscription_components_response.rb +0 -57
  444. data/lib/advanced_billing/models/list_subscription_components_sort.rb +0 -23
  445. data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +0 -49
  446. data/lib/advanced_billing/models/list_subscription_group_prepayment_date_field.rb +0 -23
  447. data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +0 -57
  448. data/lib/advanced_billing/models/list_subscription_groups_item.rb +0 -146
  449. data/lib/advanced_billing/models/list_subscription_groups_meta.rb +0 -60
  450. data/lib/advanced_billing/models/list_subscription_groups_response.rb +0 -69
  451. data/lib/advanced_billing/models/metadata.rb +0 -102
  452. data/lib/advanced_billing/models/metafield.rb +0 -116
  453. data/lib/advanced_billing/models/metafield_input.rb +0 -32
  454. data/lib/advanced_billing/models/metafield_scope.rb +0 -113
  455. data/lib/advanced_billing/models/metafields.rb +0 -106
  456. data/lib/advanced_billing/models/metafields1.rb +0 -106
  457. data/lib/advanced_billing/models/metered_component.rb +0 -302
  458. data/lib/advanced_billing/models/metered_usage.rb +0 -135
  459. data/lib/advanced_billing/models/movement.rb +0 -143
  460. data/lib/advanced_billing/models/movement_line_item.rb +0 -148
  461. data/lib/advanced_billing/models/mrr.rb +0 -103
  462. data/lib/advanced_billing/models/mrr_movement.rb +0 -81
  463. data/lib/advanced_billing/models/mrr_response.rb +0 -48
  464. data/lib/advanced_billing/models/multi_invoice_payment.rb +0 -92
  465. data/lib/advanced_billing/models/multi_invoice_payment_response.rb +0 -48
  466. data/lib/advanced_billing/models/net_terms.rb +0 -95
  467. data/lib/advanced_billing/models/offer.rb +0 -265
  468. data/lib/advanced_billing/models/offer_discount.rb +0 -70
  469. data/lib/advanced_billing/models/offer_item.rb +0 -134
  470. data/lib/advanced_billing/models/offer_response.rb +0 -50
  471. data/lib/advanced_billing/models/offer_signup_page.rb +0 -100
  472. data/lib/advanced_billing/models/on_off_component.rb +0 -299
  473. data/lib/advanced_billing/models/organization_address.rb +0 -129
  474. data/lib/advanced_billing/models/origin_invoice.rb +0 -60
  475. data/lib/advanced_billing/models/overage_pricing.rb +0 -88
  476. data/lib/advanced_billing/models/override_subscription.rb +0 -102
  477. data/lib/advanced_billing/models/override_subscription_request.rb +0 -48
  478. data/lib/advanced_billing/models/paginated_metadata.rb +0 -99
  479. data/lib/advanced_billing/models/pause_request.rb +0 -50
  480. data/lib/advanced_billing/models/payer_attributes.rb +0 -223
  481. data/lib/advanced_billing/models/payer_error.rb +0 -70
  482. data/lib/advanced_billing/models/payment.rb +0 -82
  483. data/lib/advanced_billing/models/payment_collection_method.rb +0 -32
  484. data/lib/advanced_billing/models/payment_collection_method1.rb +0 -30
  485. data/lib/advanced_billing/models/payment_collection_method_changed.rb +0 -80
  486. data/lib/advanced_billing/models/payment_method_apple_pay_type.rb +0 -60
  487. data/lib/advanced_billing/models/payment_method_bank_account_type.rb +0 -82
  488. data/lib/advanced_billing/models/payment_method_credit_card_type.rb +0 -104
  489. data/lib/advanced_billing/models/payment_method_external_type.rb +0 -90
  490. data/lib/advanced_billing/models/payment_method_nested_data.rb +0 -156
  491. data/lib/advanced_billing/models/payment_method_paypal_type.rb +0 -70
  492. data/lib/advanced_billing/models/payment_profile.rb +0 -288
  493. data/lib/advanced_billing/models/payment_profile_attributes.rb +0 -370
  494. data/lib/advanced_billing/models/payment_profile_response.rb +0 -49
  495. data/lib/advanced_billing/models/payment_related_events.rb +0 -80
  496. data/lib/advanced_billing/models/payment_response.rb +0 -69
  497. data/lib/advanced_billing/models/payment_type.rb +0 -26
  498. data/lib/advanced_billing/models/pending_cancellation_change.rb +0 -80
  499. data/lib/advanced_billing/models/portal_management_link.rb +0 -104
  500. data/lib/advanced_billing/models/pre_payment.rb +0 -75
  501. data/lib/advanced_billing/models/prepaid_component_price_point.rb +0 -101
  502. data/lib/advanced_billing/models/prepaid_configuration.rb +0 -105
  503. data/lib/advanced_billing/models/prepaid_configuration_response.rb +0 -49
  504. data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +0 -111
  505. data/lib/advanced_billing/models/prepaid_usage.rb +0 -200
  506. data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +0 -71
  507. data/lib/advanced_billing/models/prepaid_usage_component.rb +0 -360
  508. data/lib/advanced_billing/models/prepayment1.rb +0 -137
  509. data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +0 -109
  510. data/lib/advanced_billing/models/prepayment_aggregated_error.rb +0 -71
  511. data/lib/advanced_billing/models/prepayment_method.rb +0 -41
  512. data/lib/advanced_billing/models/prepayment_response.rb +0 -48
  513. data/lib/advanced_billing/models/prepayments_response.rb +0 -59
  514. data/lib/advanced_billing/models/preview_allocations_request.rb +0 -70
  515. data/lib/advanced_billing/models/price.rb +0 -99
  516. data/lib/advanced_billing/models/price_point.rb +0 -177
  517. data/lib/advanced_billing/models/price_point_type.rb +0 -30
  518. data/lib/advanced_billing/models/pricing_scheme.rb +0 -31
  519. data/lib/advanced_billing/models/product.rb +0 -523
  520. data/lib/advanced_billing/models/product_family.rb +0 -114
  521. data/lib/advanced_billing/models/product_family_response.rb +0 -50
  522. data/lib/advanced_billing/models/product_price_point.rb +0 -302
  523. data/lib/advanced_billing/models/product_price_point_currency_price.rb +0 -102
  524. data/lib/advanced_billing/models/product_price_point_response.rb +0 -48
  525. data/lib/advanced_billing/models/product_response.rb +0 -48
  526. data/lib/advanced_billing/models/proforma_custom_field.rb +0 -90
  527. data/lib/advanced_billing/models/proforma_error.rb +0 -51
  528. data/lib/advanced_billing/models/proforma_invoice.rb +0 -484
  529. data/lib/advanced_billing/models/proforma_invoice_credit.rb +0 -82
  530. data/lib/advanced_billing/models/proforma_invoice_discount.rb +0 -111
  531. data/lib/advanced_billing/models/proforma_invoice_discount_breakout.rb +0 -62
  532. data/lib/advanced_billing/models/proforma_invoice_issued.rb +0 -205
  533. data/lib/advanced_billing/models/proforma_invoice_payment.rb +0 -82
  534. data/lib/advanced_billing/models/proforma_invoice_preview.rb +0 -484
  535. data/lib/advanced_billing/models/proforma_invoice_tax.rb +0 -120
  536. data/lib/advanced_billing/models/proforma_invoice_tax_breakout.rb +0 -61
  537. data/lib/advanced_billing/models/proration.rb +0 -52
  538. data/lib/advanced_billing/models/public_key.rb +0 -71
  539. data/lib/advanced_billing/models/public_signup_page.rb +0 -84
  540. data/lib/advanced_billing/models/quantity_based_component.rb +0 -312
  541. data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +0 -61
  542. data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +0 -135
  543. data/lib/advanced_billing/models/reactivate_subscription_request.rb +0 -125
  544. data/lib/advanced_billing/models/reactivation_billing.rb +0 -56
  545. data/lib/advanced_billing/models/reactivation_charge.rb +0 -30
  546. data/lib/advanced_billing/models/read_payment_profile_response.rb +0 -64
  547. data/lib/advanced_billing/models/reason_code.rb +0 -110
  548. data/lib/advanced_billing/models/reason_code_response.rb +0 -48
  549. data/lib/advanced_billing/models/reason_codes_json_response.rb +0 -50
  550. data/lib/advanced_billing/models/record_payment_request.rb +0 -48
  551. data/lib/advanced_billing/models/recurring_scheme.rb +0 -26
  552. data/lib/advanced_billing/models/referral_code.rb +0 -81
  553. data/lib/advanced_billing/models/referral_validation_response.rb +0 -50
  554. data/lib/advanced_billing/models/refund.rb +0 -128
  555. data/lib/advanced_billing/models/refund_consolidated_invoice.rb +0 -129
  556. data/lib/advanced_billing/models/refund_invoice.rb +0 -128
  557. data/lib/advanced_billing/models/refund_invoice_event_data.rb +0 -175
  558. data/lib/advanced_billing/models/refund_invoice_request.rb +0 -64
  559. data/lib/advanced_billing/models/refund_prepayment.rb +0 -108
  560. data/lib/advanced_billing/models/refund_prepayment_aggregated_error.rb +0 -50
  561. data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +0 -50
  562. data/lib/advanced_billing/models/refund_prepayment_request.rb +0 -48
  563. data/lib/advanced_billing/models/refund_success.rb +0 -93
  564. data/lib/advanced_billing/models/remove_payment_event_data.rb +0 -135
  565. data/lib/advanced_billing/models/renewal_preview.rb +0 -161
  566. data/lib/advanced_billing/models/renewal_preview_component.rb +0 -93
  567. data/lib/advanced_billing/models/renewal_preview_line_item.rb +0 -167
  568. data/lib/advanced_billing/models/renewal_preview_request.rb +0 -62
  569. data/lib/advanced_billing/models/renewal_preview_response.rb +0 -49
  570. data/lib/advanced_billing/models/replay_webhooks_request.rb +0 -48
  571. data/lib/advanced_billing/models/replay_webhooks_response.rb +0 -50
  572. data/lib/advanced_billing/models/resent_invitation.rb +0 -83
  573. data/lib/advanced_billing/models/resource_type.rb +0 -23
  574. data/lib/advanced_billing/models/restriction_type.rb +0 -23
  575. data/lib/advanced_billing/models/resume_options.rb +0 -76
  576. data/lib/advanced_billing/models/resumption_charge.rb +0 -27
  577. data/lib/advanced_billing/models/revoked_invitation.rb +0 -72
  578. data/lib/advanced_billing/models/sale_rep.rb +0 -100
  579. data/lib/advanced_billing/models/sale_rep_item_mrr.rb +0 -70
  580. data/lib/advanced_billing/models/sale_rep_settings.rb +0 -113
  581. data/lib/advanced_billing/models/sale_rep_subscription.rb +0 -143
  582. data/lib/advanced_billing/models/segment.rb +0 -194
  583. data/lib/advanced_billing/models/segment_price.rb +0 -126
  584. data/lib/advanced_billing/models/segment_response.rb +0 -50
  585. data/lib/advanced_billing/models/seller.rb +0 -82
  586. data/lib/advanced_billing/models/send_invoice_request.rb +0 -73
  587. data/lib/advanced_billing/models/service_credit.rb +0 -92
  588. data/lib/advanced_billing/models/service_credit_response.rb +0 -48
  589. data/lib/advanced_billing/models/service_credit_type.rb +0 -23
  590. data/lib/advanced_billing/models/shipping_address.rb +0 -107
  591. data/lib/advanced_billing/models/signup_proforma_preview.rb +0 -62
  592. data/lib/advanced_billing/models/signup_proforma_preview_response.rb +0 -50
  593. data/lib/advanced_billing/models/site.rb +0 -220
  594. data/lib/advanced_billing/models/site_response.rb +0 -48
  595. data/lib/advanced_billing/models/site_statistics.rb +0 -174
  596. data/lib/advanced_billing/models/site_summary.rb +0 -90
  597. data/lib/advanced_billing/models/snap_day.rb +0 -21
  598. data/lib/advanced_billing/models/sorting_direction.rb +0 -23
  599. data/lib/advanced_billing/models/status.rb +0 -37
  600. data/lib/advanced_billing/models/status1.rb +0 -23
  601. data/lib/advanced_billing/models/subscription.rb +0 -805
  602. data/lib/advanced_billing/models/subscription_bank_account.rb +0 -281
  603. data/lib/advanced_billing/models/subscription_component.rb +0 -416
  604. data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +0 -60
  605. data/lib/advanced_billing/models/subscription_component_response.rb +0 -50
  606. data/lib/advanced_billing/models/subscription_component_subscription.rb +0 -61
  607. data/lib/advanced_billing/models/subscription_date_field.rb +0 -44
  608. data/lib/advanced_billing/models/subscription_group.rb +0 -96
  609. data/lib/advanced_billing/models/subscription_group_balances.rb +0 -82
  610. data/lib/advanced_billing/models/subscription_group_bank_account.rb +0 -225
  611. data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +0 -107
  612. data/lib/advanced_billing/models/subscription_group_credit_card.rb +0 -277
  613. data/lib/advanced_billing/models/subscription_group_customer.rb +0 -90
  614. data/lib/advanced_billing/models/subscription_group_inlined.rb +0 -94
  615. data/lib/advanced_billing/models/subscription_group_item.rb +0 -152
  616. data/lib/advanced_billing/models/subscription_group_member_error.rb +0 -70
  617. data/lib/advanced_billing/models/subscription_group_payment_profile.rb +0 -81
  618. data/lib/advanced_billing/models/subscription_group_prepayment.rb +0 -75
  619. data/lib/advanced_billing/models/subscription_group_prepayment_method.rb +0 -35
  620. data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +0 -48
  621. data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +0 -92
  622. data/lib/advanced_billing/models/subscription_group_response.rb +0 -49
  623. data/lib/advanced_billing/models/subscription_group_signup.rb +0 -154
  624. data/lib/advanced_billing/models/subscription_group_signup_component.rb +0 -110
  625. data/lib/advanced_billing/models/subscription_group_signup_error.rb +0 -112
  626. data/lib/advanced_billing/models/subscription_group_signup_failure.rb +0 -83
  627. data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +0 -140
  628. data/lib/advanced_billing/models/subscription_group_signup_item.rb +0 -197
  629. data/lib/advanced_billing/models/subscription_group_signup_request.rb +0 -49
  630. data/lib/advanced_billing/models/subscription_group_signup_response.rb +0 -171
  631. data/lib/advanced_billing/models/subscription_group_signup_success.rb +0 -81
  632. data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +0 -125
  633. data/lib/advanced_billing/models/subscription_group_subscription_error.rb +0 -87
  634. data/lib/advanced_billing/models/subscription_group_update_error.rb +0 -59
  635. data/lib/advanced_billing/models/subscription_include.rb +0 -23
  636. data/lib/advanced_billing/models/subscription_included_coupon.rb +0 -115
  637. data/lib/advanced_billing/models/subscription_list_date_field.rb +0 -20
  638. data/lib/advanced_billing/models/subscription_migration_preview.rb +0 -90
  639. data/lib/advanced_billing/models/subscription_migration_preview_options.rb +0 -163
  640. data/lib/advanced_billing/models/subscription_migration_preview_request.rb +0 -49
  641. data/lib/advanced_billing/models/subscription_migration_preview_response.rb +0 -48
  642. data/lib/advanced_billing/models/subscription_mrr.rb +0 -70
  643. data/lib/advanced_billing/models/subscription_mrr_breakout.rb +0 -59
  644. data/lib/advanced_billing/models/subscription_mrr_response.rb +0 -57
  645. data/lib/advanced_billing/models/subscription_note.rb +0 -101
  646. data/lib/advanced_billing/models/subscription_note_response.rb +0 -48
  647. data/lib/advanced_billing/models/subscription_preview.rb +0 -62
  648. data/lib/advanced_billing/models/subscription_preview_response.rb +0 -49
  649. data/lib/advanced_billing/models/subscription_product_change.rb +0 -81
  650. data/lib/advanced_billing/models/subscription_product_migration.rb +0 -152
  651. data/lib/advanced_billing/models/subscription_product_migration_request.rb +0 -48
  652. data/lib/advanced_billing/models/subscription_purge_type.rb +0 -23
  653. data/lib/advanced_billing/models/subscription_response.rb +0 -50
  654. data/lib/advanced_billing/models/subscription_sort.rb +0 -35
  655. data/lib/advanced_billing/models/subscription_state.rb +0 -53
  656. data/lib/advanced_billing/models/subscription_state_change.rb +0 -81
  657. data/lib/advanced_billing/models/tax_configuration.rb +0 -74
  658. data/lib/advanced_billing/models/tax_configuration_kind.rb +0 -29
  659. data/lib/advanced_billing/models/tax_destination_address.rb +0 -29
  660. data/lib/advanced_billing/models/too_many_management_link_requests.rb +0 -64
  661. data/lib/advanced_billing/models/update_allocation_expiration_date.rb +0 -50
  662. data/lib/advanced_billing/models/update_component.rb +0 -142
  663. data/lib/advanced_billing/models/update_component_price_point.rb +0 -69
  664. data/lib/advanced_billing/models/update_component_price_point_request.rb +0 -51
  665. data/lib/advanced_billing/models/update_component_request.rb +0 -48
  666. data/lib/advanced_billing/models/update_coupon_currency.rb +0 -57
  667. data/lib/advanced_billing/models/update_currency_price.rb +0 -57
  668. data/lib/advanced_billing/models/update_currency_prices_request.rb +0 -57
  669. data/lib/advanced_billing/models/update_customer.rb +0 -223
  670. data/lib/advanced_billing/models/update_customer_request.rb +0 -48
  671. data/lib/advanced_billing/models/update_endpoint.rb +0 -58
  672. data/lib/advanced_billing/models/update_endpoint_request.rb +0 -48
  673. data/lib/advanced_billing/models/update_metadata.rb +0 -70
  674. data/lib/advanced_billing/models/update_metadata_request.rb +0 -50
  675. data/lib/advanced_billing/models/update_metafield.rb +0 -106
  676. data/lib/advanced_billing/models/update_metafields_request.rb +0 -62
  677. data/lib/advanced_billing/models/update_payment_profile.rb +0 -194
  678. data/lib/advanced_billing/models/update_payment_profile_request.rb +0 -49
  679. data/lib/advanced_billing/models/update_payment_profile_response.rb +0 -49
  680. data/lib/advanced_billing/models/update_price.rb +0 -92
  681. data/lib/advanced_billing/models/update_product_price_point.rb +0 -61
  682. data/lib/advanced_billing/models/update_product_price_point_request.rb +0 -48
  683. data/lib/advanced_billing/models/update_reason_code.rb +0 -70
  684. data/lib/advanced_billing/models/update_reason_code_request.rb +0 -48
  685. data/lib/advanced_billing/models/update_segment.rb +0 -75
  686. data/lib/advanced_billing/models/update_segment_request.rb +0 -48
  687. data/lib/advanced_billing/models/update_subscription.rb +0 -277
  688. data/lib/advanced_billing/models/update_subscription_component.rb +0 -61
  689. data/lib/advanced_billing/models/update_subscription_group.rb +0 -50
  690. data/lib/advanced_billing/models/update_subscription_group_request.rb +0 -49
  691. data/lib/advanced_billing/models/update_subscription_note.rb +0 -57
  692. data/lib/advanced_billing/models/update_subscription_note_request.rb +0 -48
  693. data/lib/advanced_billing/models/update_subscription_request.rb +0 -48
  694. data/lib/advanced_billing/models/updated_payment_profile.rb +0 -265
  695. data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +0 -95
  696. data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +0 -49
  697. data/lib/advanced_billing/models/usage.rb +0 -146
  698. data/lib/advanced_billing/models/usage_response.rb +0 -48
  699. data/lib/advanced_billing/models/void_invoice.rb +0 -48
  700. data/lib/advanced_billing/models/void_invoice_event_data.rb +0 -113
  701. data/lib/advanced_billing/models/void_invoice_event_data1.rb +0 -102
  702. data/lib/advanced_billing/models/void_invoice_request.rb +0 -48
  703. data/lib/advanced_billing/models/webhook.rb +0 -173
  704. data/lib/advanced_billing/models/webhook_order.rb +0 -23
  705. data/lib/advanced_billing/models/webhook_response.rb +0 -50
  706. data/lib/advanced_billing/models/webhook_status.rb +0 -29
  707. data/lib/advanced_billing/models/webhook_subscription.rb +0 -124
  708. data/lib/advanced_billing/utilities/date_time_helper.rb +0 -11
  709. data/lib/advanced_billing/utilities/file_wrapper.rb +0 -16
  710. data/lib/advanced_billing/utilities/union_type_lookup.rb +0 -1240
  711. data/lib/advanced_billing.rb +0 -666
@@ -1,1357 +0,0 @@
1
- # advanced_billing
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module AdvancedBilling
7
- # SubscriptionsController
8
- class SubscriptionsController < BaseController
9
- # Full documentation on how subscriptions operate within Chargify can be
10
- # located under the following topics:
11
- # + [Subscriptions
12
- # Reference](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405577172
13
- # 749-Subscription-Introduction)
14
- # + [Subscriptions
15
- # Actions](https://maxio-chargify.zendesk.com/hc/en-us/articles/540551055655
16
- # 7-Actions)
17
- # + [Subscription
18
- # Cancellation](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405510
19
- # 556557-Actions#initiate-cancellation)
20
- # + [Subscription
21
- # Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404559
22
- # 291021-Reactivating-and-Resuming)
23
- # + [Subscription
24
- # Import](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404863655821
25
- # -Imports)
26
- # When creating a subscription, you must specify a product and a customer.
27
- # Credit card details may be required, depending on the options for the
28
- # Product being subscribed ([see Product
29
- # Options](https://maxio-chargify.zendesk.com/hc/en-us/articles/540524678222
30
- # 1#payment-method-settings)).
31
- # The product may be specified by `product_id` or by `product_handle` (API
32
- # Handle). In similar fashion, to pass a particular product price point, you
33
- # may either use `product_price_point_handle` or `product_price_point_id`.
34
- # An existing customer may be specified by a `customer_id` (ID within
35
- # Chargify) or a `customer_reference` (unique value within your app that you
36
- # have shared with Chargify via the reference attribute on a customer). You
37
- # may also pass in an existing payment profile for that customer with
38
- # `payment_profile_id`. A new customer may be created by providing
39
- # `customer_attributes`.
40
- # Credit card details may be required, depending on the options for the
41
- # product being subscribed. The product can be specified by `product_id` or
42
- # by `product_handle` (API Handle).
43
- # If you are creating a subscription with a payment profile, the attribute
44
- # to send will be `credit_card_attributes` or `bank_account_attributes` for
45
- # ACH and Direct Debit. That said, when you read the subscription after
46
- # creation, we return the profile details under `credit_card` or
47
- # `bank_account`.
48
- # ## Taxable Subscriptions
49
- # If your intent is to charge your subscribers tax via [Avalara
50
- # Taxes](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405275711885-
51
- # Avalara-VAT-Tax) or [Custom
52
- # Taxes](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405069041549-
53
- # Custom-Taxes), there are a few considerations to be made regarding
54
- # collecting subscription data.
55
- # For subscribers to be eligible to be taxed, the following information for
56
- # the `customer` object or `payment_profile` object must by supplied:
57
- # + A subscription to a [taxable
58
- # product](https://maxio-chargify.zendesk.com/hc/en-us/articles/540524678222
59
- # 1-Product-Editing#tax-settings)
60
- # + [Full valid billing or shipping
61
- # address](https://maxio-chargify.zendesk.com/hc/en-us/articles/540535611431
62
- # 7#full-address-required-for-taxable-subscriptions) to identify the tax
63
- # locale
64
- # + The portion of the address that houses the [state
65
- # information](https://maxio-chargify.zendesk.com/hc/en-us/articles/54053561
66
- # 14317#required-state-format-for-taxable-subscriptions) of either adddress
67
- # must adhere to the ISO standard of a 2-3 character limit/format.
68
- # + The portion of the address that houses the [country
69
- # information](https://maxio-chargify.zendesk.com/hc/en-us/articles/54053561
70
- # 14317#required-country-format-for-taxable-subscriptions) must adhere to
71
- # the ISO standard of a 2 character limit/format.
72
- # ## Subscription Request Examples
73
- # The subscription examples below will be split into two sections.
74
- # The first section, "Subscription Customization", will focus on passing
75
- # different information with a subscription, such as components, calendar
76
- # billing, and custom fields. These examples will presume you are using a
77
- # secure `chargify_token` generated by Chargify.js.
78
- # The second section, "Passing Payment Information", will focus on passing
79
- # payment information into Chargify. Please be aware that <b>collecting and
80
- # sending Chargify raw card details requires PCI compliance on your end</b>;
81
- # these examples are provided as guidance. If your business is not PCI
82
- # compliant, we recommend using Chargify.js to collect credit cards or bank
83
- # accounts.
84
- # # Subscription Customization
85
- # ## With Components
86
- # Different components require slightly different data. For example,
87
- # quantity-based and on/off components accept `allocated_quantity`, while
88
- # metered components accept `unit_balance`.
89
- # When creating a subscription with a component, a `price_point_id` can be
90
- # passed in along with the `component_id` to specify which price point to
91
- # use. If not passed in, the default price point will be used.
92
- # Note: if an invalid `price_point_id` is used, the subscription will still
93
- # proceed but will use the component's default price point.
94
- # Components and their price points may be added by ID or by handle. See the
95
- # example request body labeled "Components By Handle (Quantity-Based)"; the
96
- # format will be the same for other component types.
97
- # ## With Coupon(s)
98
- # Pass an array of `coupon_codes`. See the example request body "With
99
- # Coupon".
100
- # ## With Manual Invoice Collection
101
- # The `invoice` collection method works only on legacy Statement
102
- # Architecture.
103
- # On Relationship Invoicing Architecture use the `remittance` collection
104
- # method.
105
- # ## Prepaid Subscription
106
- # A prepaid subscription can be created with the usual subscription creation
107
- # parameters, specifying `prepaid` as the `payment_collection_method` and
108
- # including a nested `prepaid_subscription_configuration`.
109
- # After a prepaid subscription has been created, additional funds can be
110
- # manually added to the prepayment account through the [Create Prepayment
111
- # Endpoint](https://developers.chargify.com/docs/api-docs/7ec482de77ba7-crea
112
- # te-prepayment).
113
- # Prepaid subscriptions do not work on legacy Statement Architecture.
114
- # ## With Metafields
115
- # Metafields can either attach to subscriptions or customers. Metafields are
116
- # popuplated with the supplied metadata to the resource specified.
117
- # If the metafield doesn't exist yet, it will be created on-the-fly.
118
- # ## With Custom Pricing
119
- # Custom pricing is pricing specific to the subscription in question.
120
- # Create a subscription with custom pricing by passing pricing information
121
- # instead of a price point.
122
- # For a custom priced product, pass the custom_price object in place of
123
- # `product_price_point_id`. For a custom priced component, pass the
124
- # `custom_price` object within the component object.
125
- # Custom prices and price points can exist in harmony on a subscription.
126
- # # Passing Payment Information
127
- # ## Subscription with Chargify.js token
128
- # The `chargify_token` can be obtained using
129
- # [chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0
130
- # NjAzNDI0-overview). The token represents payment profile attributes that
131
- # were provided by the customer in their browser and stored at the payment
132
- # gateway.
133
- # The `payment_type` attribute may either be `credit_card` or
134
- # `bank_account`, depending on the type of payment method being added. If a
135
- # bank account is being passed, the payment attributes should be changed to
136
- # `bank_account_attributes`.
137
- # ```json
138
- # {
139
- # "subscription": {
140
- # "product_handle": "pro-plan",
141
- # "customer_attributes": {
142
- # "first_name": "Joe",
143
- # "last_name": "Smith",
144
- # "email": "j.smith@example.com"
145
- # },
146
- # "credit_card_attributes": {
147
- # "chargify_token": "tok_cwhvpfcnbtgkd8nfkzf9dnjn",
148
- # "payment_type": "credit_card"
149
- # }
150
- # }
151
- # }
152
- # ```
153
- # ## Subscription with vault token
154
- # If you already have a customer and card stored in your payment gateway,
155
- # you may create a subscription with a `vault_token`. Providing the
156
- # last_four, card type and expiration date will allow the card to be
157
- # displayed properly in the Chargify UI.
158
- # ```json
159
- # {
160
- # "subscription": {
161
- # "product_handle": "pro-plan",
162
- # "customer_attributes": {
163
- # "first_name": "Joe",
164
- # "last_name": "Smith",
165
- # "email": "j.smith@example.com"
166
- # },
167
- # "credit_card_attributes": {
168
- # first_name: "Joe,
169
- # last_name: "Smith",
170
- # card_type: "visa",
171
- # expiration_month: "05",
172
- # expiration_year: "2025",
173
- # last_four: "1234",
174
- # vault_token: "12345abc",
175
- # current_vault: "braintree_blue"
176
- # }
177
- # }
178
- # ```
179
- # ## Subscription with Credit Card
180
- # ```json
181
- # "subscription": {
182
- # "product_handle": "basic",
183
- # "customer_attributes": {
184
- # "first_name": "Joe",
185
- # "last_name": "Blow",
186
- # "email": "joe@example.com",
187
- # "zip": "02120",
188
- # "state": "MA",
189
- # "reference": "XYZ",
190
- # "phone": "(617) 111 - 0000",
191
- # "organization": "Acme",
192
- # "country": "US",
193
- # "city": "Boston",
194
- # "address_2": null,
195
- # "address": "123 Mass Ave."
196
- # },
197
- # "credit_card_attributes": {
198
- # "last_name": "Smith",
199
- # "first_name": "Joe",
200
- # "full_number": "4111111111111111",
201
- # "expiration_year": "2021",
202
- # "expiration_month": "1",
203
- # "card_type": "visa",
204
- # "billing_zip": "02120",
205
- # "billing_state": "MA",
206
- # "billing_country": "US",
207
- # "billing_city": "Boston",
208
- # "billing_address_2": null,
209
- # "billing_address": "123 Mass Ave."
210
- # }
211
- # }
212
- # ```
213
- # ## Subscription with ACH as Payment Profile
214
- # ```json
215
- # {
216
- # "subscription": {
217
- # "product_handle": "gold-product",
218
- # "customer_attributes": {
219
- # "first_name": "Joe",
220
- # "last_name": "Blow",
221
- # "email": "joe@example.com",
222
- # "zip": "02120",
223
- # "state": "MA",
224
- # "reference": "XYZ",
225
- # "phone": "(617) 111 - 0000",
226
- # "organization": "Acme",
227
- # "country": "US",
228
- # "city": "Boston",
229
- # "address_2": null,
230
- # "address": "123 Mass Ave."
231
- # },
232
- # "bank_account_attributes": {
233
- # "bank_name": "Best Bank",
234
- # "bank_routing_number": "021000089",
235
- # "bank_account_number": "111111111111",
236
- # "bank_account_type": "checking",
237
- # "bank_account_holder_type": "business",
238
- # "payment_type": "bank_account"
239
- # }
240
- # }
241
- # }
242
- # ```
243
- # ## Subscription with PayPal payment profile
244
- # ### With the nonce from Braintree JS
245
- # ```json
246
- # { "subscription": {
247
- # "product_handle":"test-product-b",
248
- # "customer_attributes": {
249
- # "first_name":"Amelia",
250
- # "last_name":"Johnson",
251
- # "email":"amelia@example.com",
252
- # "organization":"My Awesome Company"
253
- # },
254
- # "payment_profile_attributes":{
255
- # "paypal_email": "amelia@example.com",
256
- # "current_vault": "braintree_blue",
257
- # "payment_method_nonce":"abc123",
258
- # "payment_type":"paypal_account"
259
- # }
260
- # }
261
- # ```
262
- # ### With the Braintree Customer ID as the vault token:
263
- # ```json
264
- # { "subscription": {
265
- # "product_handle":"test-product-b",
266
- # "customer_attributes": {
267
- # "first_name":"Amelia",
268
- # "last_name":"Johnson",
269
- # "email":"amelia@example.com",
270
- # "organization":"My Awesome Company"
271
- # },
272
- # "payment_profile_attributes":{
273
- # "paypal_email": "amelia@example.com",
274
- # "current_vault": "braintree_blue",
275
- # "vault_token":"58271347",
276
- # "payment_type":"paypal_account"
277
- # }
278
- # }
279
- # ```
280
- # ## Subscription using GoCardless Bank Number
281
- # These examples creates a customer, bank account and mandate in GoCardless.
282
- # For more information on GoCardless, please view the following two
283
- # resources:
284
- # + [Payment Profiles via API for
285
- # GoCardless](https://developers.chargify.com/docs/api-docs/1f10a4f170405-cr
286
- # eate-payment-profile#gocardless)
287
- # + [Full documentation on
288
- # GoCardless](https://maxio-chargify.zendesk.com/hc/en-us/articles/540450188
289
- # 9677)
290
- # + [Using Chargify.js with GoCardless - minimal
291
- # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
292
- # DIy-examples#minimal-example-with-direct-debit-gocardless-gateway)
293
- # + [Using Chargify.js with GoCardless - full
294
- # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
295
- # DIy-examples#full-example-with-direct-debit-gocardless-gateway)
296
- # ```json
297
- # {
298
- # "subscription": {
299
- # "product_handle": "gold-product",
300
- # "customer_attributes": {
301
- # "first_name": "Jane",
302
- # "last_name": "Doe",
303
- # "email": "jd@chargify.test"
304
- # },
305
- # "bank_account_attributes": {
306
- # "bank_name": "Royal Bank of France",
307
- # "bank_account_number": "0000000",
308
- # "bank_routing_number": "0003",
309
- # "bank_branch_code": "00006",
310
- # "payment_type": "bank_account",
311
- # "billing_address": "20 Place de la Gare",
312
- # "billing_city": "Colombes",
313
- # "billing_state": "Île-de-France",
314
- # "billing_zip": "92700",
315
- # "billing_country": "FR"
316
- # }
317
- # }
318
- # }
319
- # ```
320
- # ## Subscription using GoCardless IBAN Number
321
- # ```json
322
- # {
323
- # "subscription": {
324
- # "product_handle": "gold-product",
325
- # "customer_attributes": {
326
- # "first_name": "Jane",
327
- # "last_name": "Doe",
328
- # "email": "jd@chargify.test"
329
- # },
330
- # "bank_account_attributes": {
331
- # "bank_name": "French Bank",
332
- # "bank_iban": "FR1420041010050500013M02606",
333
- # "payment_type": "bank_account",
334
- # "billing_address": "20 Place de la Gare",
335
- # "billing_city": "Colombes",
336
- # "billing_state": "Île-de-France",
337
- # "billing_zip": "92700",
338
- # "billing_country": "FR"
339
- # }
340
- # }
341
- # }
342
- # ```
343
- # ## Subscription using Stripe SEPA Direct Debit
344
- # For more information on Stripe Direct Debit, please view the following two
345
- # resources:
346
- # + [Payment Profiles via API for Stripe SEPA Direct
347
- # Debit](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-
348
- # payment-profile#sepa-direct-debit)
349
- # + [Full documentation on Stripe Direct
350
- # Debit](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405050826765-
351
- # Stripe-SEPA-and-BECS-Direct-Debit)
352
- # + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal
353
- # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
354
- # DIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway
355
- # )
356
- # + [Using Chargify.js with Stripe SEPA Direct Debit - full
357
- # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
358
- # DIy-examples#full-example-with-sepa-direct-debit-stripe-gateway)
359
- # ```json
360
- # {
361
- # "subscription": {
362
- # "product_handle": "gold-product",
363
- # "customer_attributes": {
364
- # "first_name": "Jane",
365
- # "last_name": "Doe",
366
- # "email": "jd@chargify.test"
367
- # },
368
- # "bank_account_attributes": {
369
- # "bank_name": "Test Bank",
370
- # "bank_iban": "DE89370400440532013000",
371
- # "payment_type": "bank_account"
372
- # }
373
- # }
374
- # }
375
- # ```
376
- # ## Subscription using Stripe BECS Direct Debit
377
- # For more information on Stripe Direct Debit, please view the following two
378
- # resources:
379
- # + [Payment Profiles via API for Stripe BECS Direct
380
- # Debit](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-
381
- # payment-profile#stripe-becs-direct-debit)
382
- # + [Full documentation on Stripe Direct
383
- # Debit](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405050826765-
384
- # Stripe-SEPA-and-BECS-Direct-Debit)
385
- # + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal
386
- # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
387
- # DIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway
388
- # )
389
- # + [Using Chargify.js with Stripe BECS Direct Debit - full
390
- # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
391
- # DIy-examples#full-example-with-becs-direct-debit-stripe-gateway)
392
- # ```json
393
- # {
394
- # "subscription": {
395
- # "product_handle": "gold-product",
396
- # "customer_attributes": {
397
- # "first_name": "Jane",
398
- # "last_name": "Doe",
399
- # "email": "jd@chargify.test"
400
- # },
401
- # "bank_account_attributes": {
402
- # "bank_name": "Test Bank",
403
- # "bank_branch_code": "000000",
404
- # "bank_account_number": "000123456",
405
- # "payment_type": "bank_account"
406
- # }
407
- # }
408
- # }
409
- # ```
410
- # ## 3D Secure - Stripe
411
- # It may happen that a payment needs 3D Secure Authentication when the
412
- # subscription is created; this is referred to in our help docs as a
413
- # [post-authentication
414
- # flow](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405177432077#p
415
- # sd2-flows-pre-authentication-and-post-authentication). The server returns
416
- # `422 Unprocessable Entity` in this case with the following response:
417
- # ```json
418
- # {
419
- # "errors": [
420
- # "Your card was declined. This transaction requires 3D secure
421
- # authentication."
422
- # ],
423
- # "gateway_payment_id": "pi_1F0aGoJ2UDb3Q4av7zU3sHPh",
424
- # "description": "This card requires 3D secure authentication. Redirect
425
- # the customer to the URL from the action_link attribute to authenticate.
426
- # Attach callback_url param to this URL if you want to be notified about the
427
- # result of 3D Secure authentication. Attach redirect_url param to this URL
428
- # if you want to redirect a customer back to your page after 3D Secure
429
- # authentication. Example:
430
- # https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time
431
- # _token_id=128&callback_url=https://localhost:4000&redirect_url=https://you
432
- # rpage.com will do a POST request to https://localhost:4000 after payment
433
- # is authenticated and will redirect a customer to https://yourpage.com
434
- # after 3DS authentication.",
435
- # "action_link":
436
- # "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_time_t
437
- # oken_id=242"
438
- # }
439
- # ```
440
- # To let the customer go through 3D Secure Authentication, they need to be
441
- # redirected to the URL specified in `action_link`.
442
- # Optionally, you can specify `callback_url` parameter in the `action_link`
443
- # URL if you’d like to be notified about the result of 3D Secure
444
- # Authentication. The `callback_url` will return the following information:
445
- # - whether the authentication was successful (`success`)
446
- # - the gateway ID for the payment (`gateway_payment_id`)
447
- # - the subscription ID (`subscription_id`)
448
- # Lastly, you can also specify a `redirect_url` within the `action_link` URL
449
- # if you’d like to redirect a customer back to your site.
450
- # It is not possible to use `action_link` in an iframe inside a custom
451
- # application. You have to redirect the customer directly to the
452
- # `action_link`, then, to be notified about the result, use `redirect_url`
453
- # or `callback_url`.
454
- # The final URL that you send a customer to to complete 3D Secure may
455
- # resemble the following, where the first half is the `action_link` and the
456
- # second half contains a `redirect_url` and `callback_url`:
457
- # `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_tim
458
- # e_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yo
459
- # urpage.com`
460
- # ## 3D Secure - Checkout
461
- # It may happen that a payment needs 3D Secure Authentication when the
462
- # subscription is created; this is referred to in our help docs as a
463
- # [post-authentication
464
- # flow](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405177432077#p
465
- # sd2-flows-pre-authentication-and-post-authentication). The server returns
466
- # `422 Unprocessable Entity` in this case with the following response:
467
- # ```json
468
- # {
469
- # "errors": [
470
- # "Your card was declined. This transaction requires 3D secure
471
- # authentication."
472
- # ],
473
- # "gateway_payment_id": "pay_6gjofv7dlyrkpizlolsuspvtiu",
474
- # "description": "This card requires 3D secure authentication. Redirect
475
- # the customer to the URL from the action_link attribute to authenticate.
476
- # Attach callback_url param to this URL if you want to be notified about the
477
- # result of 3D Secure authentication. Attach redirect_url param to this URL
478
- # if you want to redirect a customer back to your page after 3D Secure
479
- # authentication. Example:
480
- # https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_t
481
- # ime_token_id=123&callback_url=https://localhost:4000&redirect_url=https://
482
- # yourpage.com will do a POST request to https://localhost:4000 after
483
- # payment is authenticated and will redirect a customer to
484
- # https://yourpage.com after 3DS authentication.",
485
- # "action_link":
486
- # "http://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_t
487
- # ime_token_id=123"
488
- # }
489
- # ```
490
- # To let the customer go through 3D Secure Authentication, they need to be
491
- # redirected to the URL specified in `action_link`.
492
- # Optionally, you can specify `callback_url` parameter in the `action_link`
493
- # URL if you’d like to be notified about the result of 3D Secure
494
- # Authentication. The `callback_url` will return the following information:
495
- # - whether the authentication was successful (`success`)
496
- # - the gateway ID for the payment (`gateway_payment_id`)
497
- # - the subscription ID (`subscription_id`)
498
- # Lastly, you can also specify a `redirect_url` parameter within the
499
- # `action_link` URL if you’d like to redirect a customer back to your site.
500
- # It is not possible to use `action_link` in an iframe inside a custom
501
- # application. You have to redirect the customer directly to the
502
- # `action_link`, then, to be notified about the result, use `redirect_url`
503
- # or `callback_url`.
504
- # The final URL that you send a customer to complete 3D Secure may resemble
505
- # the following, where the first half is the `action_link` and the second
506
- # half contains a `redirect_url` and `callback_url`:
507
- # `https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_
508
- # time_token_id=123&callback_url=https://localhost:4000&redirect_url=https:/
509
- # /yourpage.com`
510
- # ### Example Redirect Flow
511
- # You may wish to redirect customers to different pages depending on whether
512
- # their SCA was performed successfully. Here's an example flow to use as a
513
- # reference:
514
- # 1. Create a subscription via API; it requires 3DS
515
- # 2. You receive a `gateway_payment_id` in the `action_link` along other
516
- # params in the response.
517
- # 3. Use this `gateway_payment_id` to, for example, connect with your
518
- # internal resources or generate a session_id
519
- # 4. Include 1 of those attributes inside the `callback_url` and
520
- # `redirect_url` to be aware which “session” this applies to
521
- # 5. Redirect the customer to the `action_link` with `callback_url` and
522
- # `redirect_url` applied
523
- # 6. After the customer finishes 3DS authentication, we let you know the
524
- # result by making a request to applied `callback_url`.
525
- # 7. After that, we redirect the customer to the `redirect_url`; at this
526
- # point the result of authentication is known
527
- # 8. Optionally, you can use the applied "msg" param in the `redirect_url`
528
- # to determine whether it was successful or not
529
- # ## Subscriptions Import
530
- # Subscriptions can be “imported” via the API to handle the following
531
- # scenarios:
532
- # + You already have existing subscriptions with specific start and renewal
533
- # dates that you would like to import to Chargify
534
- # + You already have credit cards stored in your provider’s vault and you
535
- # would like to create subscriptions using those tokens
536
- # Before importing, you should have already set up your products to match
537
- # your offerings. Then, you can create Subscriptions via the API just like
538
- # you normally would, but using a few special attributes.
539
- # Full documentation on how import Subscriptions using the **import tool**
540
- # in the Chargify UI can be located
541
- # [here](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404863655821#
542
- # imports-0-0).
543
- # ### Important Notices and Disclaimers regarding Imports
544
- # Before performing a bulk import of subscriptions via the API, we suggest
545
- # reading the [Subscriptions
546
- # Import](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404863655821
547
- # #important-notices-and-disclaimers) instructions to understand the
548
- # repurcussions of a large import.
549
- # ### Subscription Input Attributes
550
- # The following _additional_ attributes to the subscription input attributes
551
- # make imports possible: `next_billing_at`, `previous_billing_at`, and
552
- # `import_mrr`.
553
- # ### Current Vault
554
- # If you are using a Legacy gateway such as "eWAY Rapid (Legacy)" or "Stripe
555
- # (Legacy)" then please contact Support for further instructions on
556
- # subscription imports.
557
- # ### Braintree Blue (Braintree v2) Imports
558
- # Braintree Blue is Braintree’s newer (version 2) API. For this gateway,
559
- # please provide the `vault_token` parameter with the value from Braintree’s
560
- # “Customer ID” rather than the “Payment Profile Token”. At this time we do
561
- # not use `current_vault_token` with the Braintree Blue gateway, and we only
562
- # support a single payment profile per Braintree Customer.
563
- # When importing PayPal type payment profiles, please set `payment_type` to
564
- # `paypal_account`.
565
- # ### Stripe ACH Imports
566
- # If the bank account has already been verified, currently you will need to
567
- # create the customer, create the payment profile in Chargify - setting
568
- # verified=true, then create a subscription using the customer_id and
569
- # payment_profile_id.
570
- # ### Webhooks During Import
571
- # If no `next_billing_at` is provided, webhooks will be fired as normal. If
572
- # you do set a future `next_billing_at`, only a subset of the webhooks are
573
- # fired when the subscription is created. Keep reading for more information
574
- # as to what webhooks will be fired under which scenarios.
575
- # #### Successful creation with Billing Date
576
- # Scenario: If `next_billing_at` provided
577
- # + `signup_success`
578
- # + `billing_date_change`
579
- # #### Successful creation without Billing Date
580
- # Scenario: If no `next_billing_at` provided
581
- # + `signup_success`
582
- # + `payment_success`
583
- # #### Unsuccessful creation
584
- # Scenario: If card can’t be charged, and no `next_billing_at` provided
585
- # + signup_failure
586
- # #### Webhooks fired when next_billing_at is reached:
587
- # + `renewal_success or renewal_failure`
588
- # + `payment_success or payment_failure`
589
- # ### Date and Time Formats
590
- # We will attempt to parse any string you send as the value of
591
- # next_billing_at in to a date or time. For best results, use a known format
592
- # like described in “Date and Time Specification” of RFC 2822 or ISO 8601 .
593
- # The following are all equivalent and will work as input to
594
- # `next_billing_at`:
595
- # ```
596
- # Aug 06 2030 11:34:00 -0400
597
- # Aug 06 2030 11:34 -0400
598
- # 2030-08-06T11:34:00-04:00
599
- # 8/6/2030 11:34:00 EDT
600
- # 8/6/2030 8:34:00 PDT
601
- # 2030-08-06T15:34:00Z
602
- # ```
603
- # You may also pass just a date, in which case we will assume the time to be
604
- # noon
605
- # ```
606
- # 2010-08-06
607
- # ```
608
- # ## Subscription Hierarchies & WhoPays
609
- # When subscription groups were first added to our Relationship Invoicing
610
- # architecture, to group together invoices for related subscriptions and
611
- # allow for complex customer hierarchies and WhoPays scenarios, they were
612
- # designed to consist of a primary and a collection of group members. The
613
- # primary would control many aspects of the group, such as when the
614
- # consolidated invoice is generated. As of today, groups still function this
615
- # way.
616
- # In the future, the concept of a "primary" will be removed in order to
617
- # offer more flexibility into group management and reduce confusion
618
- # concerning what actions must be done on a primary level, rather than a
619
- # member level.
620
- # We have introduced a two scheme system as a bridge between these two group
621
- # organizations. Scheme 1, which is relevant to all subscription groups
622
- # today, marks the group as being "ruled" by a primary.
623
- # When reading a subscription via API, they will return a top-level
624
- # attribute called `group`, which will denote which scheme is being used. At
625
- # this time, the `scheme` attribute will always be 1.
626
- # ### Subscription in a Customer Hierarchy
627
- # For sites making use of the [Relationship
628
- # Billing](https://maxio-chargify.zendesk.com/hc/en-us/articles/540507879425
629
- # 3-Introduction-to-Invoices) and [Customer
630
- # Hierarchy](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404900384
631
- # 141) features, it is possible to create subscriptions within a customer
632
- # hierarchy. This can be achieved through the API by passing group
633
- # parameters in the **Create Subscription** request.
634
- # + The `group` parameters are optional and consist of the required `target`
635
- # and optional `billing` parameters.
636
- # When the `target` parameter specifies a customer that is already part of a
637
- # hierarchy, the new subscription will become a member of the customer
638
- # hierarchy as well. If the target customer is not part of a hierarchy, a
639
- # new customer hierarchy will be created and both the target customer and
640
- # the new subscription will become part of the hierarchy with the specified
641
- # target customer set as the responsible payer for the hierarchy's
642
- # subscriptions.
643
- # Rather than specifying a customer, the `target` parameter could instead
644
- # simply have a value of `self` which indicates the subscription will be
645
- # paid for not by some other customer, but by the subscribing customer.
646
- # This will be true whether the customer is being created new, is already
647
- # part of a hierarchy, or already exists outside a hierarchy. A valid
648
- # payment method must also be specified in the subscription parameters.
649
- # Note that when creating subscriptions in a customer hierarchy, if the
650
- # customer hierarchy does not already have a payment method, passing valid
651
- # credit card attributes in the subscription parameters will also result in
652
- # the payment method being established as the default payment method for the
653
- # customer hierarchy irrespective of the responsible payer.
654
- # The optional `billing` parameters specify how some aspects of the billing
655
- # for the new subscription should be handled. Rather than capturing payment
656
- # immediately, the `accrue` parameter can be included so that the new
657
- # subscription charges accrue until the next assessment date. Regarding the
658
- # date, the `align_date` parameter can be included so that the billing date
659
- # of the new subscription matches up with the default subscription group in
660
- # the customer hierarchy. When choosing to align the dates, the `prorate`
661
- # parameter can also be specified so that the new subscription charges are
662
- # prorated based on the billing period of the default subscription group in
663
- # the customer hierarchy also.
664
- # ### Subscription in a Subscription Group
665
- # For sites making use of [Relationship
666
- # Billing](https://maxio-chargify.zendesk.com/hc/en-us/articles/540507879425
667
- # 3-Introduction-to-Invoices) it may be desireable to create a subscription
668
- # as part of a [subscription
669
- # group](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405577356173)
670
- # in order to rely on [invoice
671
- # consolidation](https://maxio-chargify.zendesk.com/hc/en-us/articles/540498
672
- # 0119949). This can be achieved through the API by passing group parameters
673
- # in the Create Subscription request. The `group` parameters are optional
674
- # and consist of the required `target` and optional `billing` parameters.
675
- # The `target` parameters specify an existing subscription with which the
676
- # newly created subscription should be grouped. If the target subscription
677
- # is already part of a group, the new subscription will become a member of
678
- # the group as well. If the target subscription is not part of a group, a
679
- # new group will be created and both the target and the new subscription
680
- # will become part of the group with the target as the group's primary
681
- # subscription.
682
- # The optional `billing` parameters specify how some aspects of the billing
683
- # for the new subscription should be handled. Rather than capturing payment
684
- # immediately, the `accrue` parameter can be included so that the new
685
- # subscription charges accrue until the next assessment date. Regarding the
686
- # date, the `align_date` parameter can be included so that the billing date
687
- # of the new subscription matches up with the target subscription. When
688
- # choosing to align the dates, the `prorate` parameter can also be specified
689
- # so that the new subscription charges are prorated based on the billing
690
- # period of the target subscription also.
691
- # ## Providing Agreement Acceptance Params
692
- # It is possible to provide a proof of customer's acceptance of terms and
693
- # policies.
694
- # We will be storing this proof in case it might be required (i.e.
695
- # chargeback).
696
- # Currently, we already keep it for subscriptions created via Public Signup
697
- # Pages.
698
- # In order to create a subscription with the proof of agreement acceptance,
699
- # you must provide additional parameters `agreement acceptance` with
700
- # `ip_address` and at least one url to the policy that was accepted:
701
- # `terms_url` or `privacy_policy_url`. Additional urls that can be provided:
702
- # `return_refund_policy_url`, `delivery_policy_url` and
703
- # `secure_checkout_policy_url`.
704
- # ```json
705
- # "subscription": {
706
- # "product_handle": "gold-product",
707
- # "customer_attributes": {
708
- # "first_name": "Jane",
709
- # "last_name": "Doe",
710
- # "email": "jd@chargify.test"
711
- # },
712
- # "agreement_acceptance": {
713
- # "ip_address": "1.2.3.4",
714
- # "terms_url": "https://terms.url",
715
- # "privacy_policy_url": "https://privacy_policy.url",
716
- # "return_refund_policy_url": "https://return_refund_policy.url",
717
- # "delivery_policy_url": "https://delivery_policy.url",
718
- # "secure_checkout_policy_url": "https://secure_checkout_policy.url"
719
- # }
720
- # }
721
- # }
722
- # ```
723
- # **For Maxio Payments subscriptions, the agreement acceptance params are
724
- # required, with at least terms_url provided.**
725
- # ## Providing ACH Agreement params
726
- # It is also possible to provide a proof that a customer authorized ACH
727
- # agreement terms.
728
- # The proof will be stored and the email will be sent to the customer with a
729
- # copy of the terms (if enabled).
730
- # In order to create a subscription with the proof of authorized ACH
731
- # agreement terms, you must provide the additional parameter `ach_agreement`
732
- # with the following nested parameters: `agreement_terms`,
733
- # `authorizer_first_name`, `authorizer_last_name` and `ip_address`.
734
- # Each of them is required.
735
- # ```json
736
- # "subscription": {
737
- # "product_handle": "gold-product",
738
- # "customer_attributes": {
739
- # "first_name": "Jane",
740
- # "last_name": "Doe",
741
- # "email": "jd@chargify.test"
742
- # },
743
- # "bank_account_attributes": {
744
- # "bank_name": "Test Bank",
745
- # "bank_routing_number": "021000089",
746
- # "bank_account_number": "111111111111",
747
- # "bank_account_type": "checking",
748
- # "bank_account_holder_type": "business",
749
- # "payment_type": "bank_account"
750
- # },
751
- # "ach_agreement": {
752
- # "agreement_terms": "ACH agreement terms",
753
- # "authorizer_first_name": "Jane",
754
- # "authorizer_last_name": "Doe",
755
- # "ip_address": "1.2.3.4"
756
- # }
757
- # }
758
- # ```
759
- # @param [CreateSubscriptionRequest] body Optional parameter: Example:
760
- # @return [SubscriptionResponse] response from the API call
761
- def create_subscription(body: nil)
762
- new_api_call_builder
763
- .request(new_request_builder(HttpMethodEnum::POST,
764
- '/subscriptions.json',
765
- Server::DEFAULT)
766
- .header_param(new_parameter('application/json', key: 'Content-Type'))
767
- .body_param(new_parameter(body))
768
- .header_param(new_parameter('application/json', key: 'accept'))
769
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
770
- .auth(Single.new('BasicAuth')))
771
- .response(new_response_handler
772
- .is_nullify404(true)
773
- .deserializer(APIHelper.method(:custom_type_deserializer))
774
- .deserialize_into(SubscriptionResponse.method(:from_hash))
775
- .local_error('422',
776
- 'Unprocessable Entity (WebDAV)',
777
- ErrorListResponseException))
778
- .execute
779
- end
780
-
781
- # This API endpoint allows you to set certain subscription fields that are
782
- # usually managed for you automatically. Some of the fields can be set via
783
- # the normal Subscriptions Update API, but others can only be set using this
784
- # endpoint.
785
- # This endpoint is provided for cases where you need to “align” Chargify
786
- # data with data that happened in your system, perhaps before you started
787
- # using Chargify. For example, you may choose to import your historical
788
- # subscription data, and would like the activation and cancellation dates in
789
- # Chargify to match your existing historical dates. Chargify does not
790
- # backfill historical events (i.e. from the Events API), but some static
791
- # data can be changed via this API.
792
- # Why are some fields only settable from this endpoint, and not the normal
793
- # subscription create and update endpoints? Because we want users of this
794
- # endpoint to be aware that these fields are usually managed by Chargify,
795
- # and using this API means **you are stepping out on your own.**
796
- # Changing these fields will not affect any other attributes. For example,
797
- # adding an expiration date will not affect the next assessment date on the
798
- # subscription.
799
- # If you regularly need to override the current_period_starts_at for new
800
- # subscriptions, this can also be accomplished by setting both
801
- # `previous_billing_at` and `next_billing_at` at subscription creation. See
802
- # the documentation on [Importing
803
- # Subscriptions](./b3A6MTQxMDgzODg-create-subscription#subscriptions-import)
804
- # for more information.
805
- # ## Limitations
806
- # When passing `current_period_starts_at` some validations are made:
807
- # 1. The subscription needs to be unbilled (no statements or invoices).
808
- # 2. The value passed must be a valid date/time. We recommend using the iso
809
- # 8601 format.
810
- # 3. The value passed must be before the current date/time.
811
- # If unpermitted parameters are sent, a 400 HTTP response is sent along with
812
- # a string giving the reason for the problem.
813
- # @param [String] subscription_id Required parameter: The Chargify id of the
814
- # subscription
815
- # @param [OverrideSubscriptionRequest] body Optional parameter: Only these
816
- # fields are available to be set.
817
- # @return [void] response from the API call
818
- def override_subscription(subscription_id,
819
- body: nil)
820
- new_api_call_builder
821
- .request(new_request_builder(HttpMethodEnum::PUT,
822
- '/subscriptions/{subscription_id}/override.json',
823
- Server::DEFAULT)
824
- .template_param(new_parameter(subscription_id, key: 'subscription_id')
825
- .is_required(true)
826
- .should_encode(true))
827
- .header_param(new_parameter('application/json', key: 'Content-Type'))
828
- .body_param(new_parameter(body))
829
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
830
- .auth(Single.new('BasicAuth')))
831
- .response(new_response_handler
832
- .is_nullify404(true)
833
- .is_response_void(true)
834
- .local_error('400',
835
- 'Bad Request',
836
- APIException)
837
- .local_error('422',
838
- 'Unprocessable Entity (WebDAV)',
839
- APIException))
840
- .execute
841
- end
842
-
843
- # Chargify offers the ability to activate awaiting signup and trialing
844
- # subscriptions. This feature is only available on the Relationship
845
- # Invoicing architecture. Subscriptions in a group may not be activated
846
- # immediately.
847
- # For details on how the activation works, and how to activate subscriptions
848
- # through the application, see [activation](#).
849
- # The `revert_on_failure` parameter controls the behavior upon activation
850
- # failure.
851
- # - If set to `true` and something goes wrong i.e. payment fails, then
852
- # Chargify will not change the subscription's state. The subscription’s
853
- # billing period will also remain the same.
854
- # - If set to `false` and something goes wrong i.e. payment fails, then
855
- # Chargify will continue through with the activation and enter an end of
856
- # life state. For trialing subscriptions, that will either be trial ended
857
- # (if the trial is no obligation), past due (if the trial has an
858
- # obligation), or canceled (if the site has no dunning strategy, or has a
859
- # strategy that says to cancel immediately). For awaiting signup
860
- # subscriptions, that will always be canceled.
861
- # The default activation failure behavior can be configured per activation
862
- # attempt, or you may set a default value under Config > Settings >
863
- # Subscription Activation Settings.
864
- # ## Activation Scenarios
865
- # ### Activate Awaiting Signup subscription
866
- # - Given you have a product without trial
867
- # - Given you have a site without dunning strategy
868
- # ```mermaid
869
- # flowchart LR
870
- # AS[Awaiting Signup] --> A{Activate}
871
- # A -->|Success| Active
872
- # A -->|Failure| ROF{revert_on_failure}
873
- # ROF -->|true| AS
874
- # ROF -->|false| Canceled
875
- # ```
876
- # - Given you have a product with trial
877
- # - Given you have a site with dunning strategy
878
- # ```mermaid
879
- # flowchart LR
880
- # AS[Awaiting Signup] --> A{Activate}
881
- # A -->|Success| Trialing
882
- # A -->|Failure| ROF{revert_on_failure}
883
- # ROF -->|true| AS
884
- # ROF -->|false| PD[Past Due]
885
- # ```
886
- # ### Activate Trialing subscription
887
- # You can read more about the behavior of trialing subscriptions
888
- # [here](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404494617357#
889
- # trialing-subscriptions-0-0).
890
- # When the `revert_on_failure` parameter is set to `true`, the
891
- # subscription's state will remain as Trialing, we will void the invoice
892
- # from activation and return any prepayments and credits applied to the
893
- # invoice back to the subscription.
894
- # @param [String] subscription_id Required parameter: The Chargify id of the
895
- # subscription
896
- # @param [ActivateSubscriptionRequest] body Optional parameter: Example:
897
- # @return [SubscriptionResponse] response from the API call
898
- def activate_subscription(subscription_id,
899
- body: nil)
900
- new_api_call_builder
901
- .request(new_request_builder(HttpMethodEnum::PUT,
902
- '/subscriptions/{subscription_id}/activate.json',
903
- Server::DEFAULT)
904
- .template_param(new_parameter(subscription_id, key: 'subscription_id')
905
- .is_required(true)
906
- .should_encode(true))
907
- .header_param(new_parameter('application/json', key: 'Content-Type'))
908
- .body_param(new_parameter(body))
909
- .header_param(new_parameter('application/json', key: 'accept'))
910
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
911
- .auth(Single.new('BasicAuth')))
912
- .response(new_response_handler
913
- .is_nullify404(true)
914
- .deserializer(APIHelper.method(:custom_type_deserializer))
915
- .deserialize_into(SubscriptionResponse.method(:from_hash))
916
- .local_error('400',
917
- 'Bad Request',
918
- NestedErrorResponseException))
919
- .execute
920
- end
921
-
922
- # For sites in test mode, you may purge individual subscriptions.
923
- # Provide the subscription ID in the url. To confirm, supply the customer
924
- # ID in the query string `ack` parameter. You may also delete the customer
925
- # record and/or payment profiles by passing `cascade` parameters. For
926
- # example, to delete just the customer record, the query params would be:
927
- # `?ack={customer_id}&cascade[]=customer`
928
- # If you need to remove subscriptions from a live site, please contact
929
- # support to discuss your use case.
930
- # ### Delete customer and payment profile
931
- # The query params will be:
932
- # `?ack={customer_id}&cascade[]=customer&cascade[]=payment_profile`
933
- # @param [String] subscription_id Required parameter: The Chargify id of the
934
- # subscription
935
- # @param [Integer] ack Required parameter: id of the customer.
936
- # @param [Array[SubscriptionPurgeType]] cascade Optional parameter: Options
937
- # are "customer" or "payment_profile". Use in query:
938
- # `cascade[]=customer&cascade[]=payment_profile`.
939
- # @return [void] response from the API call
940
- def purge_subscription(subscription_id,
941
- ack,
942
- cascade: nil)
943
- new_api_call_builder
944
- .request(new_request_builder(HttpMethodEnum::POST,
945
- '/subscriptions/{subscription_id}/purge.json',
946
- Server::DEFAULT)
947
- .template_param(new_parameter(subscription_id, key: 'subscription_id')
948
- .is_required(true)
949
- .should_encode(true))
950
- .query_param(new_parameter(ack, key: 'ack')
951
- .is_required(true))
952
- .query_param(new_parameter(cascade, key: 'cascade[]'))
953
- .auth(Single.new('BasicAuth'))
954
- .array_serialization_format(ArraySerializationFormat::PLAIN))
955
- .response(new_response_handler
956
- .is_nullify404(true)
957
- .is_response_void(true)
958
- .local_error('400',
959
- 'Bad Request',
960
- APIException))
961
- .execute
962
- end
963
-
964
- # Use this endpoint to find subscription details.
965
- # ## Self-Service Page token
966
- # Self-Service Page token for the subscription is not returned by default.
967
- # If this information is desired, the include[]=self_service_page_token
968
- # parameter must be provided with the request.
969
- # @param [String] subscription_id Required parameter: The Chargify id of the
970
- # subscription
971
- # @param [Array[SubscriptionInclude]] include Optional parameter: Allows
972
- # including additional data in the response. Use in query:
973
- # `include[]=coupons&include[]=self_service_page_token`.
974
- # @return [SubscriptionResponse] response from the API call
975
- def read_subscription(subscription_id,
976
- include: nil)
977
- new_api_call_builder
978
- .request(new_request_builder(HttpMethodEnum::GET,
979
- '/subscriptions/{subscription_id}.json',
980
- Server::DEFAULT)
981
- .template_param(new_parameter(subscription_id, key: 'subscription_id')
982
- .is_required(true)
983
- .should_encode(true))
984
- .query_param(new_parameter(include, key: 'include[]'))
985
- .header_param(new_parameter('application/json', key: 'accept'))
986
- .auth(Single.new('BasicAuth'))
987
- .array_serialization_format(ArraySerializationFormat::PLAIN))
988
- .response(new_response_handler
989
- .is_nullify404(true)
990
- .deserializer(APIHelper.method(:custom_type_deserializer))
991
- .deserialize_into(SubscriptionResponse.method(:from_hash)))
992
- .execute
993
- end
994
-
995
- # The Chargify API allows you to preview a subscription by POSTing the same
996
- # JSON or XML as for a subscription creation.
997
- # The "Next Billing" amount and "Next Billing" date are represented in each
998
- # Subscriber's Summary. For more information, please see our documentation
999
- # [here](https://chargify.zendesk.com/hc/en-us/articles/4407884887835#next-b
1000
- # illing).
1001
- # ## Side effects
1002
- # A subscription will not be created by sending a POST to this endpoint. It
1003
- # is meant to serve as a prediction.
1004
- # ## Taxable Subscriptions
1005
- # This endpoint will preview taxes applicable to a purchase. In order for
1006
- # taxes to be previewed, the following conditions must be met:
1007
- # + Taxes must be configured on the subscription
1008
- # + The preview must be for the purchase of a taxable product or component,
1009
- # or combination of the two.
1010
- # + The subscription payload must contain a full billing or shipping address
1011
- # in order to calculate tax
1012
- # For more information about creating taxable previews, please see our
1013
- # documentation guide on how to create [taxable
1014
- # subscriptions.](https://chargify.zendesk.com/hc/en-us/articles/44079042177
1015
- # 55#creating-taxable-subscriptions)
1016
- # You do **not** need to include a card number to generate tax information
1017
- # when you are previewing a subscription. However, please note that when you
1018
- # actually want to create the subscription, you must include the credit card
1019
- # information if you want the billing address to be stored in Chargify. The
1020
- # billing address and the credit card information are stored together within
1021
- # the payment profile object. Also, you may not send a billing address to
1022
- # Chargify without payment profile information, as the address is stored on
1023
- # the card.
1024
- # You can pass shipping and billing addresses and still decide not to
1025
- # calculate taxes. To do that, pass `skip_billing_manifest_taxes: true`
1026
- # attribute.
1027
- # ## Non-taxable Subscriptions
1028
- # If you'd like to calculate subscriptions that do not include tax, please
1029
- # feel free to leave off the billing information.
1030
- # @param [CreateSubscriptionRequest] body Optional parameter: Example:
1031
- # @return [SubscriptionPreviewResponse] response from the API call
1032
- def preview_subscription(body: nil)
1033
- new_api_call_builder
1034
- .request(new_request_builder(HttpMethodEnum::POST,
1035
- '/subscriptions/preview.json',
1036
- Server::DEFAULT)
1037
- .header_param(new_parameter('application/json', key: 'Content-Type'))
1038
- .body_param(new_parameter(body))
1039
- .header_param(new_parameter('application/json', key: 'accept'))
1040
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
1041
- .auth(Single.new('BasicAuth')))
1042
- .response(new_response_handler
1043
- .is_nullify404(true)
1044
- .deserializer(APIHelper.method(:custom_type_deserializer))
1045
- .deserialize_into(SubscriptionPreviewResponse.method(:from_hash)))
1046
- .execute
1047
- end
1048
-
1049
- # Use this endpoint to remove a coupon from an existing subscription.
1050
- # For more information on the expected behaviour of removing a coupon from a
1051
- # subscription, please see our documentation
1052
- # [here.](https://chargify.zendesk.com/hc/en-us/articles/4407896488987#remov
1053
- # ing-a-coupon)
1054
- # @param [String] subscription_id Required parameter: The Chargify id of the
1055
- # subscription
1056
- # @param [String] coupon_code Optional parameter: The coupon code
1057
- # @return [String] response from the API call
1058
- def delete_coupon_from_subscription(subscription_id,
1059
- coupon_code: nil)
1060
- new_api_call_builder
1061
- .request(new_request_builder(HttpMethodEnum::DELETE,
1062
- '/subscriptions/{subscription_id}/remove_coupon.json',
1063
- Server::DEFAULT)
1064
- .template_param(new_parameter(subscription_id, key: 'subscription_id')
1065
- .is_required(true)
1066
- .should_encode(true))
1067
- .query_param(new_parameter(coupon_code, key: 'coupon_code'))
1068
- .auth(Single.new('BasicAuth')))
1069
- .response(new_response_handler
1070
- .is_nullify404(true)
1071
- .deserializer(APIHelper.method(:deserialize_primitive_types))
1072
- .deserialize_into(proc do |response| response.to_s end)
1073
- .is_primitive_response(true)
1074
- .local_error('422',
1075
- 'Unprocessable Entity (WebDAV)',
1076
- SubscriptionRemoveCouponErrorsException))
1077
- .execute
1078
- end
1079
-
1080
- # This method will return an array of subscriptions from a Site. Pay close
1081
- # attention to query string filters and pagination in order to control
1082
- # responses from the server.
1083
- # ## Search for a subscription
1084
- # Use the query strings below to search for a subscription using the
1085
- # criteria available. The return value will be an array.
1086
- # ## Self-Service Page token
1087
- # Self-Service Page token for the subscriptions is not returned by default.
1088
- # If this information is desired, the include[]=self_service_page_token
1089
- # parameter must be provided with the request.
1090
- # @param [Integer] page Optional parameter: Result records are organized in
1091
- # pages. By default, the first page of results is displayed. The page
1092
- # parameter specifies a page number of results to fetch. You can start
1093
- # navigating through the pages to consume the results. You do this by
1094
- # passing in a page parameter. Retrieve the next page by adding ?page=2 to
1095
- # the query string. If there are no results to return, then an empty result
1096
- # set will be returned. Use in query `page=1`.
1097
- # @param [Integer] per_page Optional parameter: This parameter indicates how
1098
- # many records to fetch in each request. Default value is 20. The maximum
1099
- # allowed values is 200; any per_page value over 200 will be changed to 200.
1100
- # Use in query `per_page=200`.
1101
- # @param [SubscriptionState] state Optional parameter: The current state of
1102
- # the subscription
1103
- # @param [Integer] product Optional parameter: The product id of the
1104
- # subscription. (Note that the product handle cannot be used.)
1105
- # @param [Integer] product_price_point_id Optional parameter: The ID of the
1106
- # product price point. If supplied, product is required
1107
- # @param [Integer] coupon Optional parameter: The numeric id of the coupon
1108
- # currently applied to the subscription. (This can be found in the URL when
1109
- # editing a coupon. Note that the coupon code cannot be used.)
1110
- # @param [SubscriptionDateField] date_field Optional parameter: The type of
1111
- # filter you'd like to apply to your search. Allowed Values: ,
1112
- # current_period_ends_at, current_period_starts_at, created_at,
1113
- # activated_at, canceled_at, expires_at, trial_started_at, trial_ended_at,
1114
- # updated_at
1115
- # @param [Date] start_date Optional parameter: The start date (format
1116
- # YYYY-MM-DD) with which to filter the date_field. Returns subscriptions
1117
- # with a timestamp at or after midnight (12:00:00 AM) in your site’s time
1118
- # zone on the date specified. Use in query `start_date=2022-07-01`.
1119
- # @param [Date] end_date Optional parameter: The end date (format
1120
- # YYYY-MM-DD) with which to filter the date_field. Returns subscriptions
1121
- # with a timestamp up to and including 11:59:59PM in your site’s time zone
1122
- # on the date specified. Use in query `end_date=2022-08-01`.
1123
- # @param [DateTime] start_datetime Optional parameter: The start date and
1124
- # time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field.
1125
- # Returns subscriptions with a timestamp at or after exact time provided in
1126
- # query. You can specify timezone in query - otherwise your site's time zone
1127
- # will be used. If provided, this parameter will be used instead of
1128
- # start_date. Use in query `start_datetime=2022-07-01 09:00:05`.
1129
- # @param [DateTime] end_datetime Optional parameter: The end date and time
1130
- # (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns
1131
- # subscriptions with a timestamp at or before exact time provided in query.
1132
- # You can specify timezone in query - otherwise your site's time zone will
1133
- # be used. If provided, this parameter will be used instead of end_date. Use
1134
- # in query `end_datetime=2022-08-01 10:00:05`.
1135
- # @param [Hash[String, String]] metadata Optional parameter: The value of
1136
- # the metadata field specified in the parameter. Use in query
1137
- # `metadata[my-field]=value&metadata[other-field]=another_value`.
1138
- # @param [SortingDirection | nil] direction Optional parameter: Controls the
1139
- # order in which results are returned. Use in query `direction=asc`.
1140
- # @param [SubscriptionSort] sort Optional parameter: The attribute by which
1141
- # to sort
1142
- # @return [Array[SubscriptionResponse]] response from the API call
1143
- def list_subscriptions(options = {})
1144
- new_api_call_builder
1145
- .request(new_request_builder(HttpMethodEnum::GET,
1146
- '/subscriptions.json',
1147
- Server::DEFAULT)
1148
- .query_param(new_parameter(options['page'], key: 'page'))
1149
- .query_param(new_parameter(options['per_page'], key: 'per_page'))
1150
- .query_param(new_parameter(options['state'], key: 'state'))
1151
- .query_param(new_parameter(options['product'], key: 'product'))
1152
- .query_param(new_parameter(options['product_price_point_id'], key: 'product_price_point_id'))
1153
- .query_param(new_parameter(options['coupon'], key: 'coupon'))
1154
- .query_param(new_parameter(options['date_field'], key: 'date_field'))
1155
- .query_param(new_parameter(options['start_date'], key: 'start_date'))
1156
- .query_param(new_parameter(options['end_date'], key: 'end_date'))
1157
- .query_param(new_parameter(options['start_datetime'], key: 'start_datetime'))
1158
- .query_param(new_parameter(options['end_datetime'], key: 'end_datetime'))
1159
- .query_param(new_parameter(options['metadata'], key: 'metadata'))
1160
- .query_param(new_parameter(options['direction'], key: 'direction')
1161
- .validator(proc do |value|
1162
- UnionTypeLookUp.get(:ListSubscriptionsInputDirection)
1163
- .validate(value)
1164
- end))
1165
- .query_param(new_parameter(options['sort'], key: 'sort'))
1166
- .header_param(new_parameter('application/json', key: 'accept'))
1167
- .auth(Single.new('BasicAuth'))
1168
- .array_serialization_format(ArraySerializationFormat::CSV))
1169
- .response(new_response_handler
1170
- .is_nullify404(true)
1171
- .deserializer(APIHelper.method(:custom_type_deserializer))
1172
- .deserialize_into(SubscriptionResponse.method(:from_hash))
1173
- .is_response_array(true))
1174
- .execute
1175
- end
1176
-
1177
- # The subscription endpoint allows you to instantly update one or many
1178
- # attributes about a subscription in a single call.
1179
- # ## Update Subscription Payment Method
1180
- # Change the card that your Subscriber uses for their subscription. You can
1181
- # also use this method to simply change the expiration date of the card **if
1182
- # your gateway allows**.
1183
- # Note that partial card updates for **Authorize.Net** are not allowed via
1184
- # this endpoint. The existing Payment Profile must be directly updated
1185
- # instead.
1186
- # You also use this method to change the subscription to a different product
1187
- # by setting a new value for product_handle. A product change can be done in
1188
- # two different ways, **product change** or **delayed product change**.
1189
- # ## Product Change
1190
- # This endpoint may be used to change a subscription's product. The new
1191
- # payment amount is calculated and charged at the normal start of the next
1192
- # period. If you desire complex product changes or prorated upgrades and
1193
- # downgrades instead, please see the documentation on Migrating Subscription
1194
- # Products.
1195
- # To perform a product change, simply set either the `product_handle` or
1196
- # `product_id` attribute to that of a different product from the same site
1197
- # as the subscription. You can also change the price point by passing in
1198
- # either `product_price_point_id` or `product_price_point_handle` -
1199
- # otherwise the new product's default price point will be used.
1200
- # ### Delayed Product Change
1201
- # This method also changes the product and/or price point, and the new
1202
- # payment amount is calculated and charged at the normal start of the next
1203
- # period.
1204
- # This method schedules the product change to happen automatically at the
1205
- # subscription’s next renewal date. To perform a Delayed Product Change, set
1206
- # the `product_handle` attribute as you would in a regular product change,
1207
- # but also set the `product_change_delayed` attribute to `true`. No
1208
- # proration applies in this case.
1209
- # You can also perform a delayed change to the price point by passing in
1210
- # either `product_price_point_id` or `product_price_point_handle`
1211
- # **Note: To cancel a delayed product change, set `next_product_id` to an
1212
- # empty string.**
1213
- # ## Billing Date Changes
1214
- # ### Regular Billing Date Changes
1215
- # Send the `next_billing_at` to set the next billing date for the
1216
- # subscription. After that date passes and the subscription is processed,
1217
- # the following billing date will be set according to the subscription's
1218
- # product period.
1219
- # Note that if you pass an invalid date, we will automatically interpret and
1220
- # set the correct date. For example, when February 30 is entered, the next
1221
- # billing will be set to March 2nd in a non-leap year.
1222
- # The server response will not return data under the key/value pair of
1223
- # `next_billing`. Please view the key/value pair of `current_period_ends_at`
1224
- # to verify that the `next_billing` date has been changed successfully.
1225
- # ### Snap Day Changes
1226
- # For a subscription using Calendar Billing, setting the next billing date
1227
- # is a bit different. Send the `snap_day` attribute to change the calendar
1228
- # billing date for **a subscription using a product eligible for calendar
1229
- # billing**.
1230
- # Note: If you change the product associated with a subscription that
1231
- # contains a `snap_date` and immediately `READ/GET` the subscription data,
1232
- # it will still contain evidence of the existing `snap_date`. This is due to
1233
- # the fact that a product change is instantanous and only affects the
1234
- # product associated with a subscription. After the `next_billing` date
1235
- # arrives, the `snap_day` associated with the subscription will return to
1236
- # `null.` Another way of looking at this is that you willl have to wait for
1237
- # the next billing cycle to arrive before the `snap_date` will reset to
1238
- # `null`.
1239
- # @param [String] subscription_id Required parameter: The Chargify id of the
1240
- # subscription
1241
- # @param [UpdateSubscriptionRequest] body Optional parameter: Example:
1242
- # @return [SubscriptionResponse] response from the API call
1243
- def update_subscription(subscription_id,
1244
- body: nil)
1245
- new_api_call_builder
1246
- .request(new_request_builder(HttpMethodEnum::PUT,
1247
- '/subscriptions/{subscription_id}.json',
1248
- Server::DEFAULT)
1249
- .template_param(new_parameter(subscription_id, key: 'subscription_id')
1250
- .is_required(true)
1251
- .should_encode(true))
1252
- .header_param(new_parameter('application/json', key: 'Content-Type'))
1253
- .body_param(new_parameter(body))
1254
- .header_param(new_parameter('application/json', key: 'accept'))
1255
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
1256
- .auth(Single.new('BasicAuth')))
1257
- .response(new_response_handler
1258
- .is_nullify404(true)
1259
- .deserializer(APIHelper.method(:custom_type_deserializer))
1260
- .deserialize_into(SubscriptionResponse.method(:from_hash))
1261
- .local_error('422',
1262
- 'Unprocessable Entity (WebDAV)',
1263
- ErrorListResponseException))
1264
- .execute
1265
- end
1266
-
1267
- # Use this endpoint to find a subscription by its reference.
1268
- # @param [String] reference Optional parameter: Subscription reference
1269
- # @return [SubscriptionResponse] response from the API call
1270
- def read_subscription_by_reference(reference: nil)
1271
- new_api_call_builder
1272
- .request(new_request_builder(HttpMethodEnum::GET,
1273
- '/subscriptions/lookup.json',
1274
- Server::DEFAULT)
1275
- .query_param(new_parameter(reference, key: 'reference'))
1276
- .header_param(new_parameter('application/json', key: 'accept'))
1277
- .auth(Single.new('BasicAuth')))
1278
- .response(new_response_handler
1279
- .is_nullify404(true)
1280
- .deserializer(APIHelper.method(:custom_type_deserializer))
1281
- .deserialize_into(SubscriptionResponse.method(:from_hash)))
1282
- .execute
1283
- end
1284
-
1285
- # Use this endpoint to update a subscription's prepaid configuration.
1286
- # @param [String] subscription_id Required parameter: The Chargify id of the
1287
- # subscription
1288
- # @param [UpsertPrepaidConfigurationRequest] body Optional parameter:
1289
- # Example:
1290
- # @return [PrepaidConfigurationResponse] response from the API call
1291
- def create_prepaid_subscription(subscription_id,
1292
- body: nil)
1293
- new_api_call_builder
1294
- .request(new_request_builder(HttpMethodEnum::POST,
1295
- '/subscriptions/{subscription_id}/prepaid_configurations.json',
1296
- Server::DEFAULT)
1297
- .template_param(new_parameter(subscription_id, key: 'subscription_id')
1298
- .is_required(true)
1299
- .should_encode(true))
1300
- .header_param(new_parameter('application/json', key: 'Content-Type'))
1301
- .body_param(new_parameter(body))
1302
- .header_param(new_parameter('application/json', key: 'accept'))
1303
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
1304
- .auth(Single.new('BasicAuth')))
1305
- .response(new_response_handler
1306
- .is_nullify404(true)
1307
- .deserializer(APIHelper.method(:custom_type_deserializer))
1308
- .deserialize_into(PrepaidConfigurationResponse.method(:from_hash)))
1309
- .execute
1310
- end
1311
-
1312
- # An existing subscription can accommodate multiple discounts/coupon codes.
1313
- # This is only applicable if each coupon is stackable. For more information
1314
- # on stackable coupons, we recommend reviewing our [coupon
1315
- # documentation.](https://chargify.zendesk.com/hc/en-us/articles/44077559095
1316
- # 31#stackable-coupons)
1317
- # ## Query Parameters vs Request Body Parameters
1318
- # Passing in a coupon code as a query parameter will add the code to the
1319
- # subscription, completely replacing all existing coupon codes on the
1320
- # subscription.
1321
- # For this reason, using this query parameter on this endpoint has been
1322
- # deprecated in favor of using the request body parameters as described
1323
- # below. When passing in request body parameters, the list of coupon codes
1324
- # will simply be added to any existing list of codes on the subscription.
1325
- # @param [String] subscription_id Required parameter: The Chargify id of the
1326
- # subscription
1327
- # @param [String] code Optional parameter: A code for the coupon that would
1328
- # be applied to a subscription
1329
- # @param [AddCouponsRequest] body Optional parameter: Example:
1330
- # @return [SubscriptionResponse] response from the API call
1331
- def apply_coupon_to_subscription(subscription_id,
1332
- code: nil,
1333
- body: nil)
1334
- new_api_call_builder
1335
- .request(new_request_builder(HttpMethodEnum::POST,
1336
- '/subscriptions/{subscription_id}/add_coupon.json',
1337
- Server::DEFAULT)
1338
- .template_param(new_parameter(subscription_id, key: 'subscription_id')
1339
- .is_required(true)
1340
- .should_encode(true))
1341
- .header_param(new_parameter('application/json', key: 'Content-Type'))
1342
- .query_param(new_parameter(code, key: 'code'))
1343
- .body_param(new_parameter(body))
1344
- .header_param(new_parameter('application/json', key: 'accept'))
1345
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
1346
- .auth(Single.new('BasicAuth')))
1347
- .response(new_response_handler
1348
- .is_nullify404(true)
1349
- .deserializer(APIHelper.method(:custom_type_deserializer))
1350
- .deserialize_into(SubscriptionResponse.method(:from_hash))
1351
- .local_error('422',
1352
- 'Unprocessable Entity (WebDAV)',
1353
- SubscriptionAddCouponErrorException))
1354
- .execute
1355
- end
1356
- end
1357
- end