maxio-advanced-billing-sdk 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -41
- data/lib/advanced_billing/client.rb +7 -1
- data/lib/advanced_billing/configuration.rb +1 -1
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/component_price_points_controller.rb +420 -0
- data/lib/advanced_billing/controllers/components_controller.rb +0 -347
- data/lib/advanced_billing/controllers/product_families_controller.rb +2 -2
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +16 -9
- data/lib/advanced_billing/controllers/products_controller.rb +2 -2
- data/lib/advanced_billing/models/account_balance.rb +6 -8
- data/lib/advanced_billing/models/account_balances.rb +9 -12
- data/lib/advanced_billing/models/ach_agreement.rb +8 -10
- data/lib/advanced_billing/models/activate_subscription_request.rb +3 -4
- data/lib/advanced_billing/models/add_coupons_request.rb +3 -4
- data/lib/advanced_billing/models/add_subscription_to_a_group.rb +3 -4
- data/lib/advanced_billing/models/address_change.rb +4 -6
- data/lib/advanced_billing/models/agreement_acceptance.rb +10 -14
- data/lib/advanced_billing/models/allocate_components.rb +14 -18
- data/lib/advanced_billing/models/allocation.rb +39 -52
- data/lib/advanced_billing/models/allocation_expiration_date.rb +3 -4
- data/lib/advanced_billing/models/allocation_preview.rb +20 -28
- data/lib/advanced_billing/models/allocation_preview_item.rb +28 -38
- data/lib/advanced_billing/models/allocation_preview_line_item.rb +15 -20
- data/lib/advanced_billing/models/allocation_preview_response.rb +3 -4
- data/lib/advanced_billing/models/allocation_response.rb +3 -4
- data/lib/advanced_billing/models/allocation_settings.rb +6 -8
- data/lib/advanced_billing/models/applied_credit_note_data.rb +4 -6
- data/lib/advanced_billing/models/apply_credit_note_event.rb +9 -12
- data/lib/advanced_billing/models/apply_credit_note_event_data.rb +15 -22
- data/lib/advanced_billing/models/apply_debit_note_event.rb +9 -12
- data/lib/advanced_billing/models/apply_debit_note_event_data.rb +10 -14
- data/lib/advanced_billing/models/apply_payment_event.rb +9 -12
- data/lib/advanced_billing/models/apply_payment_event_data.rb +17 -24
- data/lib/advanced_billing/models/attribute_error.rb +3 -4
- data/lib/advanced_billing/models/auto_resume.rb +3 -4
- data/lib/advanced_billing/models/backport_invoice_event.rb +9 -12
- data/lib/advanced_billing/models/bank_account_attributes.rb +19 -26
- data/lib/advanced_billing/models/bank_account_payment_profile.rb +34 -46
- data/lib/advanced_billing/models/bank_account_response.rb +3 -4
- data/lib/advanced_billing/models/bank_account_verification.rb +5 -6
- data/lib/advanced_billing/models/bank_account_verification_request.rb +3 -4
- data/lib/advanced_billing/models/base_refund_error.rb +3 -4
- data/lib/advanced_billing/models/base_string_error.rb +3 -4
- data/lib/advanced_billing/models/batch_job.rb +8 -12
- data/lib/advanced_billing/models/batch_job_response.rb +3 -4
- data/lib/advanced_billing/models/billing_manifest.rb +15 -20
- data/lib/advanced_billing/models/billing_manifest_item.rb +22 -30
- data/lib/advanced_billing/models/billing_schedule.rb +3 -4
- data/lib/advanced_billing/models/breakouts.rb +8 -10
- data/lib/advanced_billing/models/bulk_components_price_point_assignment.rb +3 -4
- data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +3 -4
- data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +3 -4
- data/lib/advanced_billing/models/bulk_create_segments.rb +3 -4
- data/lib/advanced_billing/models/bulk_update_segments.rb +3 -4
- data/lib/advanced_billing/models/bulk_update_segments_item.rb +5 -8
- data/lib/advanced_billing/models/calendar_billing.rb +5 -6
- data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +3 -4
- data/lib/advanced_billing/models/cancellation_options.rb +5 -6
- data/lib/advanced_billing/models/cancellation_request.rb +3 -4
- data/lib/advanced_billing/models/change_chargeback_status_event.rb +9 -12
- data/lib/advanced_billing/models/change_chargeback_status_event_data.rb +3 -4
- data/lib/advanced_billing/models/change_invoice_collection_method_event.rb +11 -12
- data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +5 -6
- data/lib/advanced_billing/models/change_invoice_status_event.rb +9 -12
- data/lib/advanced_billing/models/change_invoice_status_event_data.rb +9 -12
- data/lib/advanced_billing/models/chargify_ebb.rb +10 -14
- data/lib/advanced_billing/models/component.rb +49 -70
- data/lib/advanced_billing/models/component_allocation_change.rb +11 -16
- data/lib/advanced_billing/models/component_allocation_error_item.rb +7 -10
- data/lib/advanced_billing/models/component_cost_data.rb +11 -16
- data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +9 -12
- data/lib/advanced_billing/models/component_currency_price.rb +10 -14
- data/lib/advanced_billing/models/component_currency_prices_response.rb +3 -4
- data/lib/advanced_billing/models/component_custom_price.rb +7 -10
- data/lib/advanced_billing/models/component_price.rb +13 -18
- data/lib/advanced_billing/models/component_price_point.rb +25 -36
- data/lib/advanced_billing/models/component_price_point_assignment.rb +5 -6
- data/lib/advanced_billing/models/component_price_point_error_item.rb +6 -8
- data/lib/advanced_billing/models/component_price_point_item.rb +10 -14
- data/lib/advanced_billing/models/component_price_point_response.rb +3 -4
- data/lib/advanced_billing/models/component_price_points_response.rb +4 -6
- data/lib/advanced_billing/models/component_response.rb +3 -4
- data/lib/advanced_billing/models/consolidated_invoice.rb +3 -4
- data/lib/advanced_billing/models/count_response.rb +3 -4
- data/lib/advanced_billing/models/coupon.rb +45 -62
- data/lib/advanced_billing/models/coupon_currency.rb +7 -10
- data/lib/advanced_billing/models/coupon_currency_request.rb +3 -4
- data/lib/advanced_billing/models/coupon_currency_response.rb +3 -4
- data/lib/advanced_billing/models/coupon_response.rb +3 -4
- data/lib/advanced_billing/models/coupon_restriction.rb +8 -12
- data/lib/advanced_billing/models/coupon_subcodes.rb +3 -4
- data/lib/advanced_billing/models/coupon_subcodes_response.rb +6 -8
- data/lib/advanced_billing/models/coupon_usage.rb +11 -16
- data/lib/advanced_billing/models/create_allocation.rb +18 -24
- data/lib/advanced_billing/models/create_allocation_request.rb +3 -4
- data/lib/advanced_billing/models/create_component_price_point.rb +13 -18
- data/lib/advanced_billing/models/create_component_price_point_request.rb +3 -4
- data/lib/advanced_billing/models/create_component_price_points_request.rb +3 -4
- data/lib/advanced_billing/models/create_credit_note_event.rb +9 -12
- data/lib/advanced_billing/models/create_currency_price.rb +6 -8
- data/lib/advanced_billing/models/create_currency_prices_request.rb +3 -4
- data/lib/advanced_billing/models/create_customer.rb +25 -38
- data/lib/advanced_billing/models/create_customer_request.rb +3 -4
- data/lib/advanced_billing/models/create_debit_note_event.rb +9 -12
- data/lib/advanced_billing/models/create_ebb_component.rb +3 -4
- data/lib/advanced_billing/models/create_invoice.rb +15 -22
- data/lib/advanced_billing/models/create_invoice_address.rb +13 -20
- data/lib/advanced_billing/models/create_invoice_coupon.rb +10 -14
- data/lib/advanced_billing/models/create_invoice_item.rb +18 -26
- data/lib/advanced_billing/models/create_invoice_payment.rb +8 -12
- data/lib/advanced_billing/models/create_invoice_payment_application.rb +4 -6
- data/lib/advanced_billing/models/create_invoice_payment_request.rb +4 -6
- data/lib/advanced_billing/models/create_invoice_request.rb +3 -4
- data/lib/advanced_billing/models/create_metadata.rb +4 -6
- data/lib/advanced_billing/models/create_metadata_request.rb +3 -4
- data/lib/advanced_billing/models/create_metafield.rb +7 -10
- data/lib/advanced_billing/models/create_metafields_request.rb +3 -4
- data/lib/advanced_billing/models/create_metered_component.rb +3 -4
- data/lib/advanced_billing/models/create_multi_invoice_payment.rb +9 -14
- data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +3 -4
- data/lib/advanced_billing/models/create_offer.rb +11 -16
- data/lib/advanced_billing/models/create_offer_component.rb +6 -8
- data/lib/advanced_billing/models/create_offer_request.rb +3 -4
- data/lib/advanced_billing/models/create_on_off_component.rb +3 -4
- data/lib/advanced_billing/models/create_or_update_coupon.rb +6 -8
- data/lib/advanced_billing/models/create_or_update_endpoint.rb +4 -6
- data/lib/advanced_billing/models/create_or_update_endpoint_request.rb +3 -4
- data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +22 -28
- data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +22 -28
- data/lib/advanced_billing/models/create_or_update_product.rb +25 -34
- data/lib/advanced_billing/models/create_or_update_product_request.rb +3 -4
- data/lib/advanced_billing/models/create_or_update_segment_price.rb +6 -8
- data/lib/advanced_billing/models/create_payment.rb +7 -10
- data/lib/advanced_billing/models/create_payment_profile.rb +47 -66
- data/lib/advanced_billing/models/create_payment_profile_request.rb +3 -4
- data/lib/advanced_billing/models/create_prepaid_component.rb +3 -4
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +16 -22
- data/lib/advanced_billing/models/create_prepayment.rb +8 -12
- data/lib/advanced_billing/models/create_prepayment_request.rb +3 -4
- data/lib/advanced_billing/models/create_prepayment_response.rb +3 -4
- data/lib/advanced_billing/models/create_product_currency_price.rb +5 -8
- data/lib/advanced_billing/models/create_product_currency_prices_request.rb +3 -4
- data/lib/advanced_billing/models/create_product_family.rb +6 -8
- data/lib/advanced_billing/models/create_product_family_request.rb +3 -4
- data/lib/advanced_billing/models/create_product_price_point.rb +22 -30
- data/lib/advanced_billing/models/create_product_price_point_request.rb +3 -4
- data/lib/advanced_billing/models/create_quantity_based_component.rb +3 -4
- data/lib/advanced_billing/models/create_reason_code.rb +6 -8
- data/lib/advanced_billing/models/create_reason_code_request.rb +3 -4
- data/lib/advanced_billing/models/create_segment.rb +12 -14
- data/lib/advanced_billing/models/create_segment_request.rb +3 -4
- data/lib/advanced_billing/models/create_subscription.rb +78 -100
- data/lib/advanced_billing/models/create_subscription_component.rb +12 -16
- data/lib/advanced_billing/models/create_subscription_group.rb +5 -6
- data/lib/advanced_billing/models/create_subscription_group_request.rb +3 -4
- data/lib/advanced_billing/models/create_subscription_request.rb +3 -4
- data/lib/advanced_billing/models/create_usage.rb +7 -10
- data/lib/advanced_billing/models/create_usage_request.rb +3 -4
- data/lib/advanced_billing/models/created_prepayment.rb +12 -16
- data/lib/advanced_billing/models/credit_account_balance_changed.rb +9 -12
- data/lib/advanced_billing/models/credit_card_attributes.rb +6 -8
- data/lib/advanced_billing/models/credit_card_payment_profile.rb +33 -46
- data/lib/advanced_billing/models/credit_note.rb +38 -56
- data/lib/advanced_billing/models/credit_note_application.rb +8 -12
- data/lib/advanced_billing/models/credit_note_line_item.rb +27 -38
- data/lib/advanced_billing/models/credit_scheme_request.rb +3 -4
- data/lib/advanced_billing/models/currency_price.rb +10 -14
- data/lib/advanced_billing/models/currency_prices_response.rb +3 -4
- data/lib/advanced_billing/models/custom_field_value_change.rb +11 -16
- data/lib/advanced_billing/models/customer.rb +39 -56
- data/lib/advanced_billing/models/customer_attributes.rb +25 -38
- data/lib/advanced_billing/models/customer_change.rb +7 -10
- data/lib/advanced_billing/models/customer_changes_preview_response.rb +3 -4
- data/lib/advanced_billing/models/customer_custom_fields_change.rb +4 -6
- data/lib/advanced_billing/models/customer_error.rb +3 -4
- data/lib/advanced_billing/models/customer_payer_change.rb +4 -6
- data/lib/advanced_billing/models/customer_response.rb +3 -4
- data/lib/advanced_billing/models/debit_note.rb +33 -48
- data/lib/advanced_billing/models/deduct_service_credit.rb +4 -6
- data/lib/advanced_billing/models/deduct_service_credit_request.rb +3 -4
- data/lib/advanced_billing/models/delayed_cancellation_response.rb +3 -4
- data/lib/advanced_billing/models/delete_subscription_group_response.rb +4 -6
- data/lib/advanced_billing/models/dunner_data.rb +10 -14
- data/lib/advanced_billing/models/dunning_step_data.rb +12 -18
- data/lib/advanced_billing/models/dunning_step_reached.rb +6 -8
- data/lib/advanced_billing/models/ebb_component.rb +26 -36
- data/lib/advanced_billing/models/ebb_event.rb +3 -4
- data/lib/advanced_billing/models/enable_webhooks_request.rb +3 -4
- data/lib/advanced_billing/models/enable_webhooks_response.rb +3 -4
- data/lib/advanced_billing/models/endpoint.rb +8 -12
- data/lib/advanced_billing/models/endpoint_response.rb +3 -4
- data/lib/advanced_billing/models/errors.rb +4 -6
- data/lib/advanced_billing/models/event.rb +10 -16
- data/lib/advanced_billing/models/event_based_billing_segment_error.rb +3 -4
- data/lib/advanced_billing/models/event_response.rb +3 -4
- data/lib/advanced_billing/models/failed_payment_event.rb +9 -12
- data/lib/advanced_billing/models/failed_payment_event_data.rb +8 -12
- data/lib/advanced_billing/models/full_subscription_group_response.rb +19 -26
- data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +30 -44
- data/lib/advanced_billing/models/get_one_time_token_request.rb +3 -4
- data/lib/advanced_billing/models/group_billing.rb +6 -8
- data/lib/advanced_billing/models/group_settings.rb +4 -6
- data/lib/advanced_billing/models/group_target.rb +4 -6
- data/lib/advanced_billing/models/historic_usage.rb +6 -8
- data/lib/advanced_billing/models/invoice.rb +74 -106
- data/lib/advanced_billing/models/invoice_address.rb +9 -14
- data/lib/advanced_billing/models/invoice_balance_item.rb +6 -8
- data/lib/advanced_billing/models/invoice_credit.rb +11 -16
- data/lib/advanced_billing/models/invoice_custom_field.rb +8 -12
- data/lib/advanced_billing/models/invoice_customer.rb +11 -16
- data/lib/advanced_billing/models/invoice_discount.rb +18 -26
- data/lib/advanced_billing/models/invoice_discount_breakout.rb +6 -8
- data/lib/advanced_billing/models/invoice_display_settings.rb +5 -6
- data/lib/advanced_billing/models/invoice_issued.rb +20 -32
- data/lib/advanced_billing/models/invoice_line_item.rb +32 -46
- data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +3 -4
- data/lib/advanced_billing/models/invoice_line_item_event_data.rb +30 -42
- data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +4 -6
- data/lib/advanced_billing/models/invoice_payer.rb +10 -14
- data/lib/advanced_billing/models/invoice_payer_change.rb +7 -10
- data/lib/advanced_billing/models/invoice_payment.rb +16 -22
- data/lib/advanced_billing/models/invoice_payment_application.rb +6 -8
- data/lib/advanced_billing/models/invoice_payment_method.rb +12 -18
- data/lib/advanced_billing/models/invoice_pre_payment.rb +6 -8
- data/lib/advanced_billing/models/invoice_previous_balance.rb +4 -6
- data/lib/advanced_billing/models/invoice_refund.rb +13 -18
- data/lib/advanced_billing/models/invoice_response.rb +3 -4
- data/lib/advanced_billing/models/invoice_seller.rb +7 -10
- data/lib/advanced_billing/models/invoice_tax.rb +17 -24
- data/lib/advanced_billing/models/invoice_tax_breakout.rb +7 -10
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +7 -10
- data/lib/advanced_billing/models/issue_advance_invoice_request.rb +3 -4
- data/lib/advanced_billing/models/issue_invoice_event.rb +9 -12
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +8 -12
- data/lib/advanced_billing/models/issue_invoice_request.rb +4 -4
- data/lib/advanced_billing/models/issue_service_credit.rb +4 -6
- data/lib/advanced_billing/models/issue_service_credit_request.rb +3 -4
- data/lib/advanced_billing/models/item_price_point_changed.rb +10 -14
- data/lib/advanced_billing/models/item_price_point_data.rb +6 -8
- data/lib/advanced_billing/models/list_components_filter.rb +5 -6
- data/lib/advanced_billing/models/list_components_price_points_response.rb +3 -4
- data/lib/advanced_billing/models/list_coupons_filter.rb +13 -18
- data/lib/advanced_billing/models/list_credit_notes_response.rb +3 -4
- data/lib/advanced_billing/models/list_invoice_events_response.rb +7 -10
- data/lib/advanced_billing/models/list_invoices_response.rb +3 -4
- data/lib/advanced_billing/models/list_metafields_response.rb +8 -12
- data/lib/advanced_billing/models/list_mrr_filter.rb +3 -4
- data/lib/advanced_billing/models/list_mrr_response.rb +3 -4
- data/lib/advanced_billing/models/list_mrr_response_result.rb +11 -16
- data/lib/advanced_billing/models/list_offers_response.rb +3 -4
- data/lib/advanced_billing/models/list_prepayments_filter.rb +6 -8
- data/lib/advanced_billing/models/list_price_points_filter.rb +12 -18
- data/lib/advanced_billing/models/list_product_price_points_response.rb +3 -4
- data/lib/advanced_billing/models/list_products_filter.rb +5 -6
- data/lib/advanced_billing/models/list_proforma_invoices_meta.rb +7 -10
- data/lib/advanced_billing/models/list_proforma_invoices_response.rb +5 -6
- data/lib/advanced_billing/models/list_public_keys_meta.rb +7 -10
- data/lib/advanced_billing/models/list_public_keys_response.rb +5 -6
- data/lib/advanced_billing/models/list_sale_rep_item.rb +8 -12
- data/lib/advanced_billing/models/list_segments_filter.rb +9 -10
- data/lib/advanced_billing/models/list_segments_response.rb +3 -4
- data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +15 -20
- data/lib/advanced_billing/models/list_subscription_components_filter.rb +5 -6
- data/lib/advanced_billing/models/list_subscription_components_for_site_filter.rb +6 -8
- data/lib/advanced_billing/models/list_subscription_components_response.rb +3 -4
- data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +3 -4
- data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +3 -4
- data/lib/advanced_billing/models/list_subscription_groups_item.rb +18 -24
- data/lib/advanced_billing/models/list_subscription_groups_meta.rb +5 -6
- data/lib/advanced_billing/models/list_subscription_groups_response.rb +5 -6
- data/lib/advanced_billing/models/metadata.rb +10 -14
- data/lib/advanced_billing/models/metafield.rb +9 -14
- data/lib/advanced_billing/models/metafield_scope.rb +11 -16
- data/lib/advanced_billing/models/metered_component.rb +29 -40
- data/lib/advanced_billing/models/metered_usage.rb +10 -14
- data/lib/advanced_billing/models/movement.rb +14 -20
- data/lib/advanced_billing/models/movement_line_item.rb +14 -20
- data/lib/advanced_billing/models/mrr.rb +10 -14
- data/lib/advanced_billing/models/mrr_movement.rb +7 -10
- data/lib/advanced_billing/models/mrr_response.rb +3 -4
- data/lib/advanced_billing/models/multi_invoice_payment.rb +8 -10
- data/lib/advanced_billing/models/multi_invoice_payment_response.rb +3 -4
- data/lib/advanced_billing/models/nested_subscription_group.rb +7 -10
- data/lib/advanced_billing/models/net_terms.rb +10 -12
- data/lib/advanced_billing/models/offer.rb +28 -40
- data/lib/advanced_billing/models/offer_discount.rb +6 -8
- data/lib/advanced_billing/models/offer_item.rb +17 -22
- data/lib/advanced_billing/models/offer_response.rb +3 -4
- data/lib/advanced_billing/models/offer_signup_page.rb +9 -14
- data/lib/advanced_billing/models/on_off_component.rb +26 -36
- data/lib/advanced_billing/models/organization_address.rb +12 -18
- data/lib/advanced_billing/models/origin_invoice.rb +4 -6
- data/lib/advanced_billing/models/overage_pricing.rb +4 -6
- data/lib/advanced_billing/models/override_subscription.rb +9 -12
- data/lib/advanced_billing/models/override_subscription_request.rb +3 -4
- data/lib/advanced_billing/models/paginated_metadata.rb +8 -12
- data/lib/advanced_billing/models/paid_invoice.rb +7 -10
- data/lib/advanced_billing/models/pause_request.rb +3 -4
- data/lib/advanced_billing/models/payer_attributes.rb +25 -38
- data/lib/advanced_billing/models/payer_error.rb +6 -8
- data/lib/advanced_billing/models/payment_collection_method_changed.rb +4 -6
- data/lib/advanced_billing/models/payment_for_allocation.rb +7 -10
- data/lib/advanced_billing/models/payment_method_apple_pay.rb +3 -4
- data/lib/advanced_billing/models/payment_method_bank_account.rb +6 -8
- data/lib/advanced_billing/models/payment_method_credit_card.rb +9 -12
- data/lib/advanced_billing/models/payment_method_external.rb +6 -10
- data/lib/advanced_billing/models/payment_method_paypal.rb +4 -6
- data/lib/advanced_billing/models/payment_profile_attributes.rb +37 -52
- data/lib/advanced_billing/models/payment_profile_response.rb +3 -4
- data/lib/advanced_billing/models/payment_related_events.rb +5 -6
- data/lib/advanced_billing/models/pending_cancellation_change.rb +4 -6
- data/lib/advanced_billing/models/portal_management_link.rb +10 -14
- data/lib/advanced_billing/models/prepaid_component_price_point.rb +8 -12
- data/lib/advanced_billing/models/prepaid_configuration.rb +10 -12
- data/lib/advanced_billing/models/prepaid_configuration_response.rb +3 -4
- data/lib/advanced_billing/models/prepaid_product_price_point_filter.rb +2 -2
- data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +8 -10
- data/lib/advanced_billing/models/prepaid_usage.rb +16 -22
- data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +6 -8
- data/lib/advanced_billing/models/prepaid_usage_component.rb +33 -46
- data/lib/advanced_billing/models/prepayment.rb +15 -22
- data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +8 -10
- data/lib/advanced_billing/models/prepayment_response.rb +3 -4
- data/lib/advanced_billing/models/prepayments_response.rb +3 -4
- data/lib/advanced_billing/models/preview_allocations_request.rb +8 -10
- data/lib/advanced_billing/models/price.rb +6 -8
- data/lib/advanced_billing/models/product.rb +56 -76
- data/lib/advanced_billing/models/product_family.rb +11 -16
- data/lib/advanced_billing/models/product_family_response.rb +3 -4
- data/lib/advanced_billing/models/product_price_point.rb +36 -50
- data/lib/advanced_billing/models/product_price_point_errors.rb +10 -14
- data/lib/advanced_billing/models/product_price_point_response.rb +3 -4
- data/lib/advanced_billing/models/product_response.rb +3 -4
- data/lib/advanced_billing/models/proforma_error.rb +3 -4
- data/lib/advanced_billing/models/proforma_invoice.rb +51 -74
- data/lib/advanced_billing/models/proforma_invoice_credit.rb +7 -10
- data/lib/advanced_billing/models/proforma_invoice_discount.rb +13 -18
- data/lib/advanced_billing/models/proforma_invoice_issued.rb +15 -24
- data/lib/advanced_billing/models/proforma_invoice_payment.rb +7 -10
- data/lib/advanced_billing/models/proforma_invoice_tax.rb +11 -16
- data/lib/advanced_billing/models/proration.rb +3 -4
- data/lib/advanced_billing/models/public_key.rb +6 -8
- data/lib/advanced_billing/models/public_signup_page.rb +7 -10
- data/lib/advanced_billing/models/quantity_based_component.rb +30 -42
- data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +5 -6
- data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +15 -20
- data/lib/advanced_billing/models/reactivate_subscription_request.rb +11 -14
- data/lib/advanced_billing/models/reactivation_billing.rb +4 -4
- data/lib/advanced_billing/models/reason_code.rb +11 -16
- data/lib/advanced_billing/models/reason_code_response.rb +3 -4
- data/lib/advanced_billing/models/reason_codes_json_response.rb +3 -4
- data/lib/advanced_billing/models/record_payment_request.rb +3 -4
- data/lib/advanced_billing/models/record_payment_response.rb +5 -6
- data/lib/advanced_billing/models/referral_code.rb +7 -10
- data/lib/advanced_billing/models/referral_validation_response.rb +3 -4
- data/lib/advanced_billing/models/refund_consolidated_invoice.rb +9 -14
- data/lib/advanced_billing/models/refund_invoice.rb +10 -14
- data/lib/advanced_billing/models/refund_invoice_event.rb +9 -12
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +14 -20
- data/lib/advanced_billing/models/refund_invoice_request.rb +3 -4
- data/lib/advanced_billing/models/refund_prepayment.rb +7 -10
- data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +3 -4
- data/lib/advanced_billing/models/refund_prepayment_request.rb +3 -4
- data/lib/advanced_billing/models/refund_success.rb +6 -8
- data/lib/advanced_billing/models/remove_payment_event.rb +9 -12
- data/lib/advanced_billing/models/remove_payment_event_data.rb +11 -16
- data/lib/advanced_billing/models/renewal_preview.rb +15 -20
- data/lib/advanced_billing/models/renewal_preview_component.rb +6 -8
- data/lib/advanced_billing/models/renewal_preview_line_item.rb +22 -30
- data/lib/advanced_billing/models/renewal_preview_request.rb +3 -4
- data/lib/advanced_billing/models/renewal_preview_response.rb +3 -4
- data/lib/advanced_billing/models/replay_webhooks_request.rb +3 -4
- data/lib/advanced_billing/models/replay_webhooks_response.rb +3 -4
- data/lib/advanced_billing/models/resent_invitation.rb +8 -10
- data/lib/advanced_billing/models/resume_options.rb +5 -6
- data/lib/advanced_billing/models/revoked_invitation.rb +6 -8
- data/lib/advanced_billing/models/sale_rep.rb +9 -12
- data/lib/advanced_billing/models/sale_rep_item_mrr.rb +6 -8
- data/lib/advanced_billing/models/sale_rep_settings.rb +11 -16
- data/lib/advanced_billing/models/sale_rep_subscription.rb +15 -22
- data/lib/advanced_billing/models/segment.rb +20 -26
- data/lib/advanced_billing/models/segment_price.rb +13 -18
- data/lib/advanced_billing/models/segment_response.rb +3 -4
- data/lib/advanced_billing/models/send_invoice_request.rb +6 -8
- data/lib/advanced_billing/models/service_credit.rb +9 -12
- data/lib/advanced_billing/models/service_credit_response.rb +3 -4
- data/lib/advanced_billing/models/signup_proforma_preview.rb +5 -6
- data/lib/advanced_billing/models/signup_proforma_preview_response.rb +3 -4
- data/lib/advanced_billing/models/site.rb +25 -34
- data/lib/advanced_billing/models/site_response.rb +3 -4
- data/lib/advanced_billing/models/site_statistics.rb +20 -24
- data/lib/advanced_billing/models/site_summary.rb +8 -12
- data/lib/advanced_billing/models/subscription.rb +94 -126
- data/lib/advanced_billing/models/subscription_component.rb +48 -66
- data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +4 -6
- data/lib/advanced_billing/models/subscription_component_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_component_subscription.rb +4 -6
- data/lib/advanced_billing/models/subscription_custom_price.rb +21 -28
- data/lib/advanced_billing/models/subscription_filter.rb +10 -14
- data/lib/advanced_billing/models/subscription_group.rb +9 -12
- data/lib/advanced_billing/models/subscription_group_balances.rb +8 -10
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +26 -34
- data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +6 -8
- data/lib/advanced_billing/models/subscription_group_credit_card.rb +30 -42
- data/lib/advanced_billing/models/subscription_group_customer.rb +8 -12
- data/lib/advanced_billing/models/subscription_group_item.rb +16 -22
- data/lib/advanced_billing/models/subscription_group_member_error.rb +6 -8
- data/lib/advanced_billing/models/subscription_group_members_array_error.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_payment_profile.rb +7 -10
- data/lib/advanced_billing/models/subscription_group_prepayment.rb +6 -10
- data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +9 -12
- data/lib/advanced_billing/models/subscription_group_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_signup.rb +13 -18
- data/lib/advanced_billing/models/subscription_group_signup_component.rb +9 -12
- data/lib/advanced_billing/models/subscription_group_signup_error.rb +10 -14
- data/lib/advanced_billing/models/subscription_group_signup_failure.rb +4 -6
- data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +14 -18
- data/lib/advanced_billing/models/subscription_group_signup_item.rb +21 -28
- data/lib/advanced_billing/models/subscription_group_signup_request.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +18 -24
- data/lib/advanced_billing/models/subscription_group_signup_success.rb +4 -6
- data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +14 -20
- data/lib/advanced_billing/models/subscription_group_single_error.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_subscription_error.rb +14 -18
- data/lib/advanced_billing/models/subscription_group_update_error.rb +3 -4
- data/lib/advanced_billing/models/subscription_included_coupon.rb +11 -16
- data/lib/advanced_billing/models/subscription_migration_preview.rb +8 -10
- data/lib/advanced_billing/models/subscription_migration_preview_options.rb +17 -22
- data/lib/advanced_billing/models/subscription_migration_preview_request.rb +3 -4
- data/lib/advanced_billing/models/subscription_migration_preview_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_mrr.rb +6 -8
- data/lib/advanced_billing/models/subscription_mrr_breakout.rb +5 -6
- data/lib/advanced_billing/models/subscription_mrr_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_note.rb +10 -14
- data/lib/advanced_billing/models/subscription_note_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_preview.rb +5 -6
- data/lib/advanced_billing/models/subscription_preview_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_product_change.rb +5 -6
- data/lib/advanced_billing/models/subscription_product_migration.rb +15 -20
- data/lib/advanced_billing/models/subscription_product_migration_request.rb +3 -4
- data/lib/advanced_billing/models/subscription_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_state_change.rb +5 -6
- data/lib/advanced_billing/models/tax_configuration.rb +7 -8
- data/lib/advanced_billing/models/too_many_management_link_requests.rb +4 -6
- data/lib/advanced_billing/models/update_allocation_expiration_date.rb +3 -4
- data/lib/advanced_billing/models/update_component.rb +14 -20
- data/lib/advanced_billing/models/update_component_price_point.rb +13 -18
- data/lib/advanced_billing/models/update_component_price_point_request.rb +3 -4
- data/lib/advanced_billing/models/update_component_request.rb +3 -4
- data/lib/advanced_billing/models/update_coupon_currency.rb +4 -6
- data/lib/advanced_billing/models/update_currency_price.rb +4 -6
- data/lib/advanced_billing/models/update_currency_prices_request.rb +3 -4
- data/lib/advanced_billing/models/update_customer.rb +26 -40
- data/lib/advanced_billing/models/update_customer_request.rb +3 -4
- data/lib/advanced_billing/models/update_metadata.rb +6 -8
- data/lib/advanced_billing/models/update_metadata_request.rb +3 -4
- data/lib/advanced_billing/models/update_metafield.rb +8 -12
- data/lib/advanced_billing/models/update_metafields_request.rb +3 -4
- data/lib/advanced_billing/models/update_payment_profile.rb +21 -28
- data/lib/advanced_billing/models/update_payment_profile_request.rb +3 -4
- data/lib/advanced_billing/models/update_price.rb +9 -12
- data/lib/advanced_billing/models/update_product_price_point.rb +5 -6
- data/lib/advanced_billing/models/update_product_price_point_request.rb +3 -4
- data/lib/advanced_billing/models/update_reason_code.rb +6 -8
- data/lib/advanced_billing/models/update_reason_code_request.rb +3 -4
- data/lib/advanced_billing/models/update_segment.rb +4 -6
- data/lib/advanced_billing/models/update_segment_request.rb +3 -4
- data/lib/advanced_billing/models/update_subscription.rb +29 -36
- data/lib/advanced_billing/models/update_subscription_component.rb +5 -6
- data/lib/advanced_billing/models/update_subscription_group.rb +3 -4
- data/lib/advanced_billing/models/update_subscription_group_request.rb +3 -4
- data/lib/advanced_billing/models/update_subscription_note.rb +4 -6
- data/lib/advanced_billing/models/update_subscription_note_request.rb +3 -4
- data/lib/advanced_billing/models/update_subscription_request.rb +3 -4
- data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +9 -10
- data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +3 -4
- data/lib/advanced_billing/models/usage.rb +14 -20
- data/lib/advanced_billing/models/usage_response.rb +3 -4
- data/lib/advanced_billing/models/void_invoice.rb +3 -4
- data/lib/advanced_billing/models/void_invoice_event.rb +9 -12
- data/lib/advanced_billing/models/void_invoice_event_data.rb +10 -14
- data/lib/advanced_billing/models/void_invoice_request.rb +3 -4
- data/lib/advanced_billing/models/void_remainder_event.rb +9 -12
- data/lib/advanced_billing/models/void_remainder_event_data.rb +7 -10
- data/lib/advanced_billing/models/webhook.rb +18 -26
- data/lib/advanced_billing/models/webhook_response.rb +3 -4
- data/lib/advanced_billing/utilities/union_type_lookup.rb +42 -0
- data/lib/advanced_billing.rb +2 -0
- metadata +3 -2
@@ -440,40 +440,6 @@ module AdvancedBilling
|
|
440
440
|
.execute
|
441
441
|
end
|
442
442
|
|
443
|
-
# Sets a new default price point for the component. This new default will
|
444
|
-
# apply to all new subscriptions going forward - existing subscriptions will
|
445
|
-
# remain on their current price point.
|
446
|
-
# See [Price Points
|
447
|
-
# Documentation](https://chargify.zendesk.com/hc/en-us/articles/440775586588
|
448
|
-
# 3#price-points) for more information on price points and moving
|
449
|
-
# subscriptions between price points.
|
450
|
-
# Note: Custom price points are not able to be set as the default for a
|
451
|
-
# component.
|
452
|
-
# @param [Integer] component_id Required parameter: The Chargify id of the
|
453
|
-
# component to which the price point belongs
|
454
|
-
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
455
|
-
# price point
|
456
|
-
# @return [ComponentResponse] response from the API call
|
457
|
-
def promote_component_price_point_to_default(component_id,
|
458
|
-
price_point_id)
|
459
|
-
new_api_call_builder
|
460
|
-
.request(new_request_builder(HttpMethodEnum::PUT,
|
461
|
-
'/components/{component_id}/price_points/{price_point_id}/default.json',
|
462
|
-
Server::DEFAULT)
|
463
|
-
.template_param(new_parameter(component_id, key: 'component_id')
|
464
|
-
.is_required(true)
|
465
|
-
.should_encode(true))
|
466
|
-
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
467
|
-
.is_required(true)
|
468
|
-
.should_encode(true))
|
469
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
470
|
-
.auth(Single.new('BasicAuth')))
|
471
|
-
.response(new_response_handler
|
472
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
473
|
-
.deserialize_into(ComponentResponse.method(:from_hash)))
|
474
|
-
.execute
|
475
|
-
end
|
476
|
-
|
477
443
|
# This request will return a list of components for a particular product
|
478
444
|
# family.
|
479
445
|
# @param [Integer] product_family_id Required parameter: The Chargify id of
|
@@ -542,318 +508,5 @@ module AdvancedBilling
|
|
542
508
|
.is_response_array(true))
|
543
509
|
.execute
|
544
510
|
end
|
545
|
-
|
546
|
-
# This endpoint can be used to create a new price point for an existing
|
547
|
-
# component.
|
548
|
-
# @param [Integer] component_id Required parameter: The Chargify id of the
|
549
|
-
# component
|
550
|
-
# @param [CreateComponentPricePointRequest] body Optional parameter:
|
551
|
-
# Example:
|
552
|
-
# @return [ComponentPricePointResponse] response from the API call
|
553
|
-
def create_component_price_point(component_id,
|
554
|
-
body: nil)
|
555
|
-
new_api_call_builder
|
556
|
-
.request(new_request_builder(HttpMethodEnum::POST,
|
557
|
-
'/components/{component_id}/price_points.json',
|
558
|
-
Server::DEFAULT)
|
559
|
-
.template_param(new_parameter(component_id, key: 'component_id')
|
560
|
-
.is_required(true)
|
561
|
-
.should_encode(true))
|
562
|
-
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
563
|
-
.body_param(new_parameter(body))
|
564
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
565
|
-
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
566
|
-
.auth(Single.new('BasicAuth')))
|
567
|
-
.response(new_response_handler
|
568
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
569
|
-
.deserialize_into(ComponentPricePointResponse.method(:from_hash)))
|
570
|
-
.execute
|
571
|
-
end
|
572
|
-
|
573
|
-
# Use this endpoint to read current price points that are associated with a
|
574
|
-
# component.
|
575
|
-
# You may specify the component by using either the numeric id or the
|
576
|
-
# `handle:gold` syntax.
|
577
|
-
# When fetching a component's price points, if you have defined multiple
|
578
|
-
# currencies at the site level, you can optionally pass the
|
579
|
-
# `?currency_prices=true` query param to include an array of currency price
|
580
|
-
# data in the response.
|
581
|
-
# If the price point is set to `use_site_exchange_rate: true`, it will
|
582
|
-
# return pricing based on the current exchange rate. If the flag is set to
|
583
|
-
# false, it will return all of the defined prices for each currency.
|
584
|
-
# @param [Integer] component_id Required parameter: The Chargify id of the
|
585
|
-
# component
|
586
|
-
# @param [TrueClass | FalseClass] currency_prices Optional parameter:
|
587
|
-
# Include an array of currency price data
|
588
|
-
# @param [Integer] page Optional parameter: Result records are organized in
|
589
|
-
# pages. By default, the first page of results is displayed. The page
|
590
|
-
# parameter specifies a page number of results to fetch. You can start
|
591
|
-
# navigating through the pages to consume the results. You do this by
|
592
|
-
# passing in a page parameter. Retrieve the next page by adding ?page=2 to
|
593
|
-
# the query string. If there are no results to return, then an empty result
|
594
|
-
# set will be returned. Use in query `page=1`.
|
595
|
-
# @param [Integer] per_page Optional parameter: This parameter indicates how
|
596
|
-
# many records to fetch in each request. Default value is 20. The maximum
|
597
|
-
# allowed values is 200; any per_page value over 200 will be changed to 200.
|
598
|
-
# Use in query `per_page=200`.
|
599
|
-
# @param [Array[PricePointType]] filter_type Optional parameter: Use in
|
600
|
-
# query: `filter[type]=catalog,default`.
|
601
|
-
# @return [ComponentPricePointsResponse] response from the API call
|
602
|
-
def list_component_price_points(options = {})
|
603
|
-
new_api_call_builder
|
604
|
-
.request(new_request_builder(HttpMethodEnum::GET,
|
605
|
-
'/components/{component_id}/price_points.json',
|
606
|
-
Server::DEFAULT)
|
607
|
-
.template_param(new_parameter(options['component_id'], key: 'component_id')
|
608
|
-
.is_required(true)
|
609
|
-
.should_encode(true))
|
610
|
-
.query_param(new_parameter(options['currency_prices'], key: 'currency_prices'))
|
611
|
-
.query_param(new_parameter(options['page'], key: 'page'))
|
612
|
-
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
613
|
-
.query_param(new_parameter(options['filter_type'], key: 'filter[type]'))
|
614
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
615
|
-
.auth(Single.new('BasicAuth'))
|
616
|
-
.array_serialization_format(ArraySerializationFormat::CSV))
|
617
|
-
.response(new_response_handler
|
618
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
619
|
-
.deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
|
620
|
-
.execute
|
621
|
-
end
|
622
|
-
|
623
|
-
# Use this endpoint to create multiple component price points in one
|
624
|
-
# request.
|
625
|
-
# @param [String] component_id Required parameter: The Chargify id of the
|
626
|
-
# component for which you want to fetch price points.
|
627
|
-
# @param [CreateComponentPricePointsRequest] body Optional parameter:
|
628
|
-
# Example:
|
629
|
-
# @return [ComponentPricePointsResponse] response from the API call
|
630
|
-
def bulk_create_component_price_points(component_id,
|
631
|
-
body: nil)
|
632
|
-
new_api_call_builder
|
633
|
-
.request(new_request_builder(HttpMethodEnum::POST,
|
634
|
-
'/components/{component_id}/price_points/bulk.json',
|
635
|
-
Server::DEFAULT)
|
636
|
-
.template_param(new_parameter(component_id, key: 'component_id')
|
637
|
-
.is_required(true)
|
638
|
-
.should_encode(true))
|
639
|
-
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
640
|
-
.body_param(new_parameter(body))
|
641
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
642
|
-
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
643
|
-
.auth(Single.new('BasicAuth')))
|
644
|
-
.response(new_response_handler
|
645
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
646
|
-
.deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
|
647
|
-
.execute
|
648
|
-
end
|
649
|
-
|
650
|
-
# When updating a price point, it's prices can be updated as well by
|
651
|
-
# creating new prices or editing / removing existing ones.
|
652
|
-
# Passing in a price bracket without an `id` will attempt to create a new
|
653
|
-
# price.
|
654
|
-
# Including an `id` will update the corresponding price, and including the
|
655
|
-
# `_destroy` flag set to true along with the `id` will remove that price.
|
656
|
-
# Note: Custom price points cannot be updated directly. They must be edited
|
657
|
-
# through the Subscription.
|
658
|
-
# @param [Integer] component_id Required parameter: The Chargify id of the
|
659
|
-
# component to which the price point belongs
|
660
|
-
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
661
|
-
# price point
|
662
|
-
# @param [UpdateComponentPricePointRequest] body Optional parameter:
|
663
|
-
# Example:
|
664
|
-
# @return [ComponentPricePointResponse] response from the API call
|
665
|
-
def update_component_price_point(component_id,
|
666
|
-
price_point_id,
|
667
|
-
body: nil)
|
668
|
-
new_api_call_builder
|
669
|
-
.request(new_request_builder(HttpMethodEnum::PUT,
|
670
|
-
'/components/{component_id}/price_points/{price_point_id}.json',
|
671
|
-
Server::DEFAULT)
|
672
|
-
.template_param(new_parameter(component_id, key: 'component_id')
|
673
|
-
.is_required(true)
|
674
|
-
.should_encode(true))
|
675
|
-
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
676
|
-
.is_required(true)
|
677
|
-
.should_encode(true))
|
678
|
-
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
679
|
-
.body_param(new_parameter(body))
|
680
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
681
|
-
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
682
|
-
.auth(Single.new('BasicAuth')))
|
683
|
-
.response(new_response_handler
|
684
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
685
|
-
.deserialize_into(ComponentPricePointResponse.method(:from_hash))
|
686
|
-
.local_error_template('422',
|
687
|
-
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
688
|
-
' Response: \'{$response.body}\'.',
|
689
|
-
ErrorArrayMapResponseException))
|
690
|
-
.execute
|
691
|
-
end
|
692
|
-
|
693
|
-
# A price point can be archived at any time. Subscriptions using a price
|
694
|
-
# point that has been archived will continue using it until they're moved to
|
695
|
-
# another price point.
|
696
|
-
# @param [Integer] component_id Required parameter: The Chargify id of the
|
697
|
-
# component to which the price point belongs
|
698
|
-
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
699
|
-
# price point
|
700
|
-
# @return [ComponentPricePointResponse] response from the API call
|
701
|
-
def archive_component_price_point(component_id,
|
702
|
-
price_point_id)
|
703
|
-
new_api_call_builder
|
704
|
-
.request(new_request_builder(HttpMethodEnum::DELETE,
|
705
|
-
'/components/{component_id}/price_points/{price_point_id}.json',
|
706
|
-
Server::DEFAULT)
|
707
|
-
.template_param(new_parameter(component_id, key: 'component_id')
|
708
|
-
.is_required(true)
|
709
|
-
.should_encode(true))
|
710
|
-
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
711
|
-
.is_required(true)
|
712
|
-
.should_encode(true))
|
713
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
714
|
-
.auth(Single.new('BasicAuth')))
|
715
|
-
.response(new_response_handler
|
716
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
717
|
-
.deserialize_into(ComponentPricePointResponse.method(:from_hash))
|
718
|
-
.local_error_template('422',
|
719
|
-
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
720
|
-
' Response: \'{$response.body}\'.',
|
721
|
-
ErrorListResponseException))
|
722
|
-
.execute
|
723
|
-
end
|
724
|
-
|
725
|
-
# Use this endpoint to unarchive a component price point.
|
726
|
-
# @param [Integer] component_id Required parameter: The Chargify id of the
|
727
|
-
# component to which the price point belongs
|
728
|
-
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
729
|
-
# price point
|
730
|
-
# @return [ComponentPricePointResponse] response from the API call
|
731
|
-
def unarchive_component_price_point(component_id,
|
732
|
-
price_point_id)
|
733
|
-
new_api_call_builder
|
734
|
-
.request(new_request_builder(HttpMethodEnum::PUT,
|
735
|
-
'/components/{component_id}/price_points/{price_point_id}/unarchive.json',
|
736
|
-
Server::DEFAULT)
|
737
|
-
.template_param(new_parameter(component_id, key: 'component_id')
|
738
|
-
.is_required(true)
|
739
|
-
.should_encode(true))
|
740
|
-
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
741
|
-
.is_required(true)
|
742
|
-
.should_encode(true))
|
743
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
744
|
-
.auth(Single.new('BasicAuth')))
|
745
|
-
.response(new_response_handler
|
746
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
747
|
-
.deserialize_into(ComponentPricePointResponse.method(:from_hash)))
|
748
|
-
.execute
|
749
|
-
end
|
750
|
-
|
751
|
-
# This endpoint allows you to create currency prices for a given currency
|
752
|
-
# that has been defined on the site level in your settings.
|
753
|
-
# When creating currency prices, they need to mirror the structure of your
|
754
|
-
# primary pricing. For each price level defined on the component price
|
755
|
-
# point, there should be a matching price level created in the given
|
756
|
-
# currency.
|
757
|
-
# Note: Currency Prices are not able to be created for custom price points.
|
758
|
-
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
759
|
-
# price point
|
760
|
-
# @param [CreateCurrencyPricesRequest] body Optional parameter: Example:
|
761
|
-
# @return [ComponentCurrencyPricesResponse] response from the API call
|
762
|
-
def create_currency_prices(price_point_id,
|
763
|
-
body: nil)
|
764
|
-
new_api_call_builder
|
765
|
-
.request(new_request_builder(HttpMethodEnum::POST,
|
766
|
-
'/price_points/{price_point_id}/currency_prices.json',
|
767
|
-
Server::DEFAULT)
|
768
|
-
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
769
|
-
.is_required(true)
|
770
|
-
.should_encode(true))
|
771
|
-
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
772
|
-
.body_param(new_parameter(body))
|
773
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
774
|
-
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
775
|
-
.auth(Single.new('BasicAuth')))
|
776
|
-
.response(new_response_handler
|
777
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
778
|
-
.deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
|
779
|
-
.local_error('422',
|
780
|
-
'Unprocessable Entity (WebDAV)',
|
781
|
-
ErrorArrayMapResponseException))
|
782
|
-
.execute
|
783
|
-
end
|
784
|
-
|
785
|
-
# This endpoint allows you to update currency prices for a given currency
|
786
|
-
# that has been defined on the site level in your settings.
|
787
|
-
# Note: Currency Prices are not able to be updated for custom price points.
|
788
|
-
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
789
|
-
# price point
|
790
|
-
# @param [UpdateCurrencyPricesRequest] body Optional parameter: Example:
|
791
|
-
# @return [ComponentCurrencyPricesResponse] response from the API call
|
792
|
-
def update_currency_prices(price_point_id,
|
793
|
-
body: nil)
|
794
|
-
new_api_call_builder
|
795
|
-
.request(new_request_builder(HttpMethodEnum::PUT,
|
796
|
-
'/price_points/{price_point_id}/currency_prices.json',
|
797
|
-
Server::DEFAULT)
|
798
|
-
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
799
|
-
.is_required(true)
|
800
|
-
.should_encode(true))
|
801
|
-
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
802
|
-
.body_param(new_parameter(body))
|
803
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
804
|
-
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
805
|
-
.auth(Single.new('BasicAuth')))
|
806
|
-
.response(new_response_handler
|
807
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
808
|
-
.deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
|
809
|
-
.local_error('422',
|
810
|
-
'Unprocessable Entity (WebDAV)',
|
811
|
-
ErrorArrayMapResponseException))
|
812
|
-
.execute
|
813
|
-
end
|
814
|
-
|
815
|
-
# This method allows to retrieve a list of Components Price Points belonging
|
816
|
-
# to a Site.
|
817
|
-
# @param [ListComponentsPricePointsInclude] include Optional parameter:
|
818
|
-
# Allows including additional data in the response. Use in query:
|
819
|
-
# `include=currency_prices`.
|
820
|
-
# @param [Integer] page Optional parameter: Result records are organized in
|
821
|
-
# pages. By default, the first page of results is displayed. The page
|
822
|
-
# parameter specifies a page number of results to fetch. You can start
|
823
|
-
# navigating through the pages to consume the results. You do this by
|
824
|
-
# passing in a page parameter. Retrieve the next page by adding ?page=2 to
|
825
|
-
# the query string. If there are no results to return, then an empty result
|
826
|
-
# set will be returned. Use in query `page=1`.
|
827
|
-
# @param [Integer] per_page Optional parameter: This parameter indicates how
|
828
|
-
# many records to fetch in each request. Default value is 20. The maximum
|
829
|
-
# allowed values is 200; any per_page value over 200 will be changed to 200.
|
830
|
-
# Use in query `per_page=200`.
|
831
|
-
# @param [SortingDirection] direction Optional parameter: Controls the order
|
832
|
-
# in which results are returned. Use in query `direction=asc`.
|
833
|
-
# @param [ListPricePointsFilter] filter Optional parameter: Filter to use
|
834
|
-
# for List PricePoints operations
|
835
|
-
# @return [ListComponentsPricePointsResponse] response from the API call
|
836
|
-
def list_all_component_price_points(options = {})
|
837
|
-
new_api_call_builder
|
838
|
-
.request(new_request_builder(HttpMethodEnum::GET,
|
839
|
-
'/components_price_points.json',
|
840
|
-
Server::DEFAULT)
|
841
|
-
.query_param(new_parameter(options['include'], key: 'include'))
|
842
|
-
.query_param(new_parameter(options['page'], key: 'page'))
|
843
|
-
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
844
|
-
.query_param(new_parameter(options['direction'], key: 'direction'))
|
845
|
-
.query_param(new_parameter(options['filter'], key: 'filter'))
|
846
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
847
|
-
.auth(Single.new('BasicAuth'))
|
848
|
-
.array_serialization_format(ArraySerializationFormat::CSV))
|
849
|
-
.response(new_response_handler
|
850
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
851
|
-
.deserialize_into(ListComponentsPricePointsResponse.method(:from_hash))
|
852
|
-
.local_error_template('422',
|
853
|
-
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
854
|
-
' Response: \'{$response.body}\'.',
|
855
|
-
ErrorListResponseException))
|
856
|
-
.execute
|
857
|
-
end
|
858
511
|
end
|
859
512
|
end
|
@@ -8,8 +8,8 @@ module AdvancedBilling
|
|
8
8
|
class ProductFamiliesController < BaseController
|
9
9
|
# This method allows to retrieve a list of Products belonging to a Product
|
10
10
|
# Family.
|
11
|
-
# @param [
|
12
|
-
#
|
11
|
+
# @param [String] product_family_id Required parameter: Either the product
|
12
|
+
# family's id or its handle prefixed with `handle:`
|
13
13
|
# @param [Integer] page Optional parameter: Result records are organized in
|
14
14
|
# pages. By default, the first page of results is displayed. The page
|
15
15
|
# parameter specifies a page number of results to fetch. You can start
|
@@ -96,11 +96,13 @@ module AdvancedBilling
|
|
96
96
|
# Use this endpoint to update a product price point.
|
97
97
|
# Note: Custom product price points are not able to be updated.
|
98
98
|
# @param [Integer | String] product_id Required parameter: The id or handle
|
99
|
-
# of the product. When using the handle, it must be prefixed with
|
100
|
-
# `handle
|
99
|
+
# of the product. When using the handle, it must be prefixed with `handle:`.
|
100
|
+
# Example: `123` for an integer ID, or `handle:example-product-handle` for a
|
101
|
+
# string handle.
|
101
102
|
# @param [Integer | String] price_point_id Required parameter: The id or
|
102
103
|
# handle of the price point. When using the handle, it must be prefixed with
|
103
|
-
# `handle
|
104
|
+
# `handle:`. Example: `123` for an integer ID, or
|
105
|
+
# `handle:example-product-price-point-handle` for a string handle.
|
104
106
|
# @param [UpdateProductPricePointRequest] body Optional parameter:
|
105
107
|
# Example:
|
106
108
|
# @return [ProductPricePointResponse] response from the API call
|
@@ -137,12 +139,15 @@ module AdvancedBilling
|
|
137
139
|
end
|
138
140
|
|
139
141
|
# Use this endpoint to retrieve details for a specific product price point.
|
142
|
+
# You can achieve this by using either the product price point ID or handle.
|
140
143
|
# @param [Integer | String] product_id Required parameter: The id or handle
|
141
|
-
# of the product. When using the handle, it must be prefixed with
|
142
|
-
# `handle
|
144
|
+
# of the product. When using the handle, it must be prefixed with `handle:`.
|
145
|
+
# Example: `123` for an integer ID, or `handle:example-product-handle` for a
|
146
|
+
# string handle.
|
143
147
|
# @param [Integer | String] price_point_id Required parameter: The id or
|
144
148
|
# handle of the price point. When using the handle, it must be prefixed with
|
145
|
-
# `handle
|
149
|
+
# `handle:`. Example: `123` for an integer ID, or
|
150
|
+
# `handle:example-product-price-point-handle` for a string handle.
|
146
151
|
# @param [TrueClass | FalseClass] currency_prices Optional parameter: When
|
147
152
|
# fetching a product's price points, if you have defined multiple currencies
|
148
153
|
# at the site level, you can optionally pass the ?currency_prices=true query
|
@@ -183,11 +188,13 @@ module AdvancedBilling
|
|
183
188
|
|
184
189
|
# Use this endpoint to archive a product price point.
|
185
190
|
# @param [Integer | String] product_id Required parameter: The id or handle
|
186
|
-
# of the product. When using the handle, it must be prefixed with
|
187
|
-
# `handle
|
191
|
+
# of the product. When using the handle, it must be prefixed with `handle:`.
|
192
|
+
# Example: `123` for an integer ID, or `handle:example-product-handle` for a
|
193
|
+
# string handle.
|
188
194
|
# @param [Integer | String] price_point_id Required parameter: The id or
|
189
195
|
# handle of the price point. When using the handle, it must be prefixed with
|
190
|
-
# `handle
|
196
|
+
# `handle:`. Example: `123` for an integer ID, or
|
197
|
+
# `handle:example-product-price-point-handle` for a string handle.
|
191
198
|
# @return [ProductPricePointResponse] response from the API call
|
192
199
|
def archive_product_price_point(product_id,
|
193
200
|
price_point_id)
|
@@ -13,8 +13,8 @@ module AdvancedBilling
|
|
13
13
|
# + [Changing a Subscription's
|
14
14
|
# Product](https://maxio-chargify.zendesk.com/hc/en-us/articles/540422533466
|
15
15
|
# 9-Product-Changes-Migrations)
|
16
|
-
# @param [
|
17
|
-
#
|
16
|
+
# @param [String] product_family_id Required parameter: Either the product
|
17
|
+
# family's id or its handle prefixed with `handle:`
|
18
18
|
# @param [CreateOrUpdateProductRequest] body Optional parameter: Example:
|
19
19
|
# @return [ProductResponse] response from the API call
|
20
20
|
def create_product(product_family_id,
|
@@ -47,10 +47,8 @@ module AdvancedBilling
|
|
47
47
|
]
|
48
48
|
end
|
49
49
|
|
50
|
-
def initialize(balance_in_cents
|
51
|
-
|
52
|
-
remittance_balance_in_cents = SKIP,
|
53
|
-
additional_properties = {})
|
50
|
+
def initialize(balance_in_cents: SKIP, automatic_balance_in_cents: SKIP,
|
51
|
+
remittance_balance_in_cents: SKIP, additional_properties: {})
|
54
52
|
@balance_in_cents = balance_in_cents unless balance_in_cents == SKIP
|
55
53
|
unless automatic_balance_in_cents == SKIP
|
56
54
|
@automatic_balance_in_cents =
|
@@ -83,10 +81,10 @@ module AdvancedBilling
|
|
83
81
|
names.each_value { |k| hash.delete(k) }
|
84
82
|
|
85
83
|
# Create object from extracted values.
|
86
|
-
AccountBalance.new(balance_in_cents,
|
87
|
-
automatic_balance_in_cents,
|
88
|
-
remittance_balance_in_cents,
|
89
|
-
hash)
|
84
|
+
AccountBalance.new(balance_in_cents: balance_in_cents,
|
85
|
+
automatic_balance_in_cents: automatic_balance_in_cents,
|
86
|
+
remittance_balance_in_cents: remittance_balance_in_cents,
|
87
|
+
additional_properties: hash)
|
90
88
|
end
|
91
89
|
end
|
92
90
|
end
|
@@ -58,12 +58,9 @@ module AdvancedBilling
|
|
58
58
|
[]
|
59
59
|
end
|
60
60
|
|
61
|
-
def initialize(open_invoices
|
62
|
-
|
63
|
-
|
64
|
-
service_credits = SKIP,
|
65
|
-
prepayments = SKIP,
|
66
|
-
additional_properties = {})
|
61
|
+
def initialize(open_invoices: SKIP, pending_invoices: SKIP,
|
62
|
+
pending_discounts: SKIP, service_credits: SKIP,
|
63
|
+
prepayments: SKIP, additional_properties: {})
|
67
64
|
@open_invoices = open_invoices unless open_invoices == SKIP
|
68
65
|
@pending_invoices = pending_invoices unless pending_invoices == SKIP
|
69
66
|
@pending_discounts = pending_discounts unless pending_discounts == SKIP
|
@@ -94,12 +91,12 @@ module AdvancedBilling
|
|
94
91
|
names.each_value { |k| hash.delete(k) }
|
95
92
|
|
96
93
|
# Create object from extracted values.
|
97
|
-
AccountBalances.new(open_invoices,
|
98
|
-
pending_invoices,
|
99
|
-
pending_discounts,
|
100
|
-
service_credits,
|
101
|
-
prepayments,
|
102
|
-
hash)
|
94
|
+
AccountBalances.new(open_invoices: open_invoices,
|
95
|
+
pending_invoices: pending_invoices,
|
96
|
+
pending_discounts: pending_discounts,
|
97
|
+
service_credits: service_credits,
|
98
|
+
prepayments: prepayments,
|
99
|
+
additional_properties: hash)
|
103
100
|
end
|
104
101
|
end
|
105
102
|
end
|
@@ -55,11 +55,9 @@ module AdvancedBilling
|
|
55
55
|
[]
|
56
56
|
end
|
57
57
|
|
58
|
-
def initialize(agreement_terms
|
59
|
-
|
60
|
-
|
61
|
-
ip_address = SKIP,
|
62
|
-
additional_properties = {})
|
58
|
+
def initialize(agreement_terms: SKIP, authorizer_first_name: SKIP,
|
59
|
+
authorizer_last_name: SKIP, ip_address: SKIP,
|
60
|
+
additional_properties: {})
|
63
61
|
@agreement_terms = agreement_terms unless agreement_terms == SKIP
|
64
62
|
@authorizer_first_name = authorizer_first_name unless authorizer_first_name == SKIP
|
65
63
|
@authorizer_last_name = authorizer_last_name unless authorizer_last_name == SKIP
|
@@ -88,11 +86,11 @@ module AdvancedBilling
|
|
88
86
|
names.each_value { |k| hash.delete(k) }
|
89
87
|
|
90
88
|
# Create object from extracted values.
|
91
|
-
ACHAgreement.new(agreement_terms,
|
92
|
-
authorizer_first_name,
|
93
|
-
authorizer_last_name,
|
94
|
-
ip_address,
|
95
|
-
hash)
|
89
|
+
ACHAgreement.new(agreement_terms: agreement_terms,
|
90
|
+
authorizer_first_name: authorizer_first_name,
|
91
|
+
authorizer_last_name: authorizer_last_name,
|
92
|
+
ip_address: ip_address,
|
93
|
+
additional_properties: hash)
|
96
94
|
end
|
97
95
|
|
98
96
|
# Validates an instance of the object from a given value.
|
@@ -38,8 +38,7 @@ module AdvancedBilling
|
|
38
38
|
]
|
39
39
|
end
|
40
40
|
|
41
|
-
def initialize(revert_on_failure
|
42
|
-
additional_properties = {})
|
41
|
+
def initialize(revert_on_failure: SKIP, additional_properties: {})
|
43
42
|
@revert_on_failure = revert_on_failure unless revert_on_failure == SKIP
|
44
43
|
|
45
44
|
# Add additional model properties to the instance.
|
@@ -60,8 +59,8 @@ module AdvancedBilling
|
|
60
59
|
names.each_value { |k| hash.delete(k) }
|
61
60
|
|
62
61
|
# Create object from extracted values.
|
63
|
-
ActivateSubscriptionRequest.new(revert_on_failure,
|
64
|
-
hash)
|
62
|
+
ActivateSubscriptionRequest.new(revert_on_failure: revert_on_failure,
|
63
|
+
additional_properties: hash)
|
65
64
|
end
|
66
65
|
end
|
67
66
|
end
|
@@ -32,8 +32,7 @@ module AdvancedBilling
|
|
32
32
|
[]
|
33
33
|
end
|
34
34
|
|
35
|
-
def initialize(codes
|
36
|
-
additional_properties = {})
|
35
|
+
def initialize(codes: SKIP, additional_properties: {})
|
37
36
|
@codes = codes unless codes == SKIP
|
38
37
|
|
39
38
|
# Add additional model properties to the instance.
|
@@ -53,8 +52,8 @@ module AdvancedBilling
|
|
53
52
|
names.each_value { |k| hash.delete(k) }
|
54
53
|
|
55
54
|
# Create object from extracted values.
|
56
|
-
AddCouponsRequest.new(codes,
|
57
|
-
hash)
|
55
|
+
AddCouponsRequest.new(codes: codes,
|
56
|
+
additional_properties: hash)
|
58
57
|
end
|
59
58
|
end
|
60
59
|
end
|
@@ -32,8 +32,7 @@ module AdvancedBilling
|
|
32
32
|
[]
|
33
33
|
end
|
34
34
|
|
35
|
-
def initialize(group
|
36
|
-
additional_properties = {})
|
35
|
+
def initialize(group: SKIP, additional_properties: {})
|
37
36
|
@group = group unless group == SKIP
|
38
37
|
|
39
38
|
# Add additional model properties to the instance.
|
@@ -55,8 +54,8 @@ module AdvancedBilling
|
|
55
54
|
names.each_value { |k| hash.delete(k) }
|
56
55
|
|
57
56
|
# Create object from extracted values.
|
58
|
-
AddSubscriptionToAGroup.new(group,
|
59
|
-
hash)
|
57
|
+
AddSubscriptionToAGroup.new(group: group,
|
58
|
+
additional_properties: hash)
|
60
59
|
end
|
61
60
|
|
62
61
|
# Validates an instance of the object from a given value.
|
@@ -35,9 +35,7 @@ module AdvancedBilling
|
|
35
35
|
[]
|
36
36
|
end
|
37
37
|
|
38
|
-
def initialize(before
|
39
|
-
after = nil,
|
40
|
-
additional_properties = {})
|
38
|
+
def initialize(before:, after:, additional_properties: {})
|
41
39
|
@before = before
|
42
40
|
@after = after
|
43
41
|
|
@@ -59,9 +57,9 @@ module AdvancedBilling
|
|
59
57
|
names.each_value { |k| hash.delete(k) }
|
60
58
|
|
61
59
|
# Create object from extracted values.
|
62
|
-
AddressChange.new(before,
|
63
|
-
after,
|
64
|
-
hash)
|
60
|
+
AddressChange.new(before: before,
|
61
|
+
after: after,
|
62
|
+
additional_properties: hash)
|
65
63
|
end
|
66
64
|
end
|
67
65
|
end
|