maxio-advanced-billing-sdk 5.1.0 → 6.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 +48 -50
- data/lib/advanced_billing/client.rb +3 -4
- data/lib/advanced_billing/configuration.rb +21 -24
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +3 -3
- data/lib/advanced_billing/controllers/api_exports_controller.rb +9 -9
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/billing_portal_controller.rb +4 -4
- data/lib/advanced_billing/controllers/component_price_points_controller.rb +34 -20
- data/lib/advanced_billing/controllers/components_controller.rb +12 -12
- data/lib/advanced_billing/controllers/coupons_controller.rb +45 -27
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +9 -9
- data/lib/advanced_billing/controllers/customers_controller.rb +7 -7
- data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +6 -6
- data/lib/advanced_billing/controllers/events_controller.rb +26 -9
- data/lib/advanced_billing/controllers/insights_controller.rb +4 -4
- data/lib/advanced_billing/controllers/invoices_controller.rb +17 -17
- data/lib/advanced_billing/controllers/offers_controller.rb +10 -6
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +12 -12
- data/lib/advanced_billing/controllers/product_families_controller.rb +22 -20
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +14 -11
- data/lib/advanced_billing/controllers/products_controller.rb +6 -6
- data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +9 -9
- data/lib/advanced_billing/controllers/reason_codes_controller.rb +17 -9
- data/lib/advanced_billing/controllers/referral_codes_controller.rb +1 -1
- data/lib/advanced_billing/controllers/sales_commissions_controller.rb +3 -3
- data/lib/advanced_billing/controllers/sites_controller.rb +3 -3
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +21 -31
- data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +4 -4
- data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +4 -4
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +9 -9
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +6 -6
- data/lib/advanced_billing/controllers/subscription_notes_controller.rb +20 -8
- data/lib/advanced_billing/controllers/subscription_products_controller.rb +2 -2
- data/lib/advanced_billing/controllers/subscription_status_controller.rb +20 -12
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +40 -17
- data/lib/advanced_billing/controllers/webhooks_controller.rb +6 -6
- data/lib/advanced_billing/exceptions/subscription_response_error_exception.rb +32 -0
- data/lib/advanced_billing/models/account_balance.rb +7 -7
- data/lib/advanced_billing/models/account_balances.rb +7 -7
- data/lib/advanced_billing/models/ach_agreement.rb +7 -7
- data/lib/advanced_billing/models/activate_event_based_component.rb +6 -6
- data/lib/advanced_billing/models/activate_subscription_request.rb +4 -4
- data/lib/advanced_billing/models/add_coupons_request.rb +4 -4
- data/lib/advanced_billing/models/add_subscription_to_a_group.rb +6 -18
- data/lib/advanced_billing/models/address_change.rb +5 -5
- data/lib/advanced_billing/models/agreement_acceptance.rb +7 -7
- data/lib/advanced_billing/models/allocate_components.rb +7 -7
- data/lib/advanced_billing/models/allocation.rb +7 -7
- data/lib/advanced_billing/models/allocation_expiration_date.rb +4 -4
- data/lib/advanced_billing/models/allocation_preview.rb +7 -7
- data/lib/advanced_billing/models/allocation_preview_item.rb +7 -7
- data/lib/advanced_billing/models/allocation_preview_line_item.rb +7 -7
- data/lib/advanced_billing/models/allocation_preview_response.rb +4 -4
- data/lib/advanced_billing/models/allocation_response.rb +4 -4
- data/lib/advanced_billing/models/allocation_settings.rb +6 -6
- data/lib/advanced_billing/models/apple_pay_payment_profile.rb +7 -7
- data/lib/advanced_billing/models/applied_credit_note_data.rb +5 -5
- data/lib/advanced_billing/models/apply_credit_note_event.rb +7 -7
- data/lib/advanced_billing/models/apply_credit_note_event_data.rb +7 -7
- data/lib/advanced_billing/models/apply_debit_note_event.rb +7 -7
- data/lib/advanced_billing/models/apply_debit_note_event_data.rb +7 -7
- data/lib/advanced_billing/models/apply_payment_event.rb +7 -7
- data/lib/advanced_billing/models/apply_payment_event_data.rb +7 -7
- data/lib/advanced_billing/models/attribute_error.rb +4 -4
- data/lib/advanced_billing/models/auto_resume.rb +4 -4
- data/lib/advanced_billing/models/backport_invoice_event.rb +7 -7
- data/lib/advanced_billing/models/bank_account_attributes.rb +7 -7
- data/lib/advanced_billing/models/bank_account_payment_profile.rb +7 -7
- data/lib/advanced_billing/models/bank_account_response.rb +4 -4
- data/lib/advanced_billing/models/bank_account_verification.rb +5 -5
- data/lib/advanced_billing/models/bank_account_verification_request.rb +4 -4
- data/lib/advanced_billing/models/base_model.rb +76 -28
- data/lib/advanced_billing/models/base_refund_error.rb +4 -4
- data/lib/advanced_billing/models/base_string_error.rb +4 -4
- data/lib/advanced_billing/models/batch_job.rb +7 -7
- data/lib/advanced_billing/models/batch_job_response.rb +4 -4
- data/lib/advanced_billing/models/billing_manifest.rb +7 -7
- data/lib/advanced_billing/models/billing_manifest_item.rb +7 -7
- data/lib/advanced_billing/models/billing_schedule.rb +4 -4
- data/lib/advanced_billing/models/breakouts.rb +7 -7
- data/lib/advanced_billing/models/bulk_components_price_point_assignment.rb +4 -4
- data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +4 -4
- data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +4 -4
- data/lib/advanced_billing/models/bulk_create_segments.rb +4 -4
- data/lib/advanced_billing/models/bulk_update_segments.rb +4 -4
- data/lib/advanced_billing/models/bulk_update_segments_item.rb +6 -6
- data/lib/advanced_billing/models/calendar_billing.rb +7 -7
- data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +4 -4
- data/lib/advanced_billing/models/cancellation_options.rb +5 -5
- data/lib/advanced_billing/models/cancellation_request.rb +4 -4
- data/lib/advanced_billing/models/change_chargeback_status_event.rb +7 -7
- data/lib/advanced_billing/models/change_chargeback_status_event_data.rb +4 -4
- data/lib/advanced_billing/models/change_invoice_collection_method_event.rb +7 -7
- data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +5 -5
- data/lib/advanced_billing/models/change_invoice_status_event.rb +7 -7
- data/lib/advanced_billing/models/change_invoice_status_event_data.rb +7 -7
- data/lib/advanced_billing/models/chargify_ebb.rb +7 -7
- data/lib/advanced_billing/models/component.rb +9 -9
- data/lib/advanced_billing/models/component_allocation_change.rb +7 -7
- data/lib/advanced_billing/models/component_allocation_error_item.rb +7 -7
- data/lib/advanced_billing/models/component_cost_data.rb +7 -7
- data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +7 -7
- data/lib/advanced_billing/models/component_currency_price.rb +7 -7
- data/lib/advanced_billing/models/component_currency_prices_response.rb +4 -4
- data/lib/advanced_billing/models/component_custom_price.rb +7 -7
- data/lib/advanced_billing/models/component_price.rb +7 -7
- data/lib/advanced_billing/models/component_price_point.rb +92 -7
- data/lib/advanced_billing/models/component_price_point_assignment.rb +5 -5
- data/lib/advanced_billing/models/component_price_point_error_item.rb +6 -6
- data/lib/advanced_billing/models/component_price_point_item.rb +7 -7
- data/lib/advanced_billing/models/component_price_point_response.rb +4 -4
- data/lib/advanced_billing/models/component_price_points_response.rb +5 -5
- data/lib/advanced_billing/models/component_response.rb +4 -4
- data/lib/advanced_billing/models/compounding_strategy.rb +5 -1
- data/lib/advanced_billing/models/consolidated_invoice.rb +4 -4
- data/lib/advanced_billing/models/count_response.rb +4 -4
- data/lib/advanced_billing/models/coupon.rb +104 -29
- data/lib/advanced_billing/models/coupon_currency.rb +12 -9
- data/lib/advanced_billing/models/coupon_currency_request.rb +4 -4
- data/lib/advanced_billing/models/coupon_currency_response.rb +4 -4
- data/lib/advanced_billing/models/coupon_payload.rb +244 -0
- data/lib/advanced_billing/models/{create_or_update_coupon.rb → coupon_request.rb} +13 -25
- data/lib/advanced_billing/models/coupon_response.rb +4 -4
- data/lib/advanced_billing/models/coupon_restriction.rb +7 -7
- data/lib/advanced_billing/models/coupon_subcodes.rb +4 -4
- data/lib/advanced_billing/models/coupon_subcodes_response.rb +6 -6
- data/lib/advanced_billing/models/coupon_usage.rb +7 -7
- data/lib/advanced_billing/models/create_allocation.rb +7 -7
- data/lib/advanced_billing/models/create_allocation_request.rb +4 -4
- data/lib/advanced_billing/models/create_component_price_point.rb +11 -9
- data/lib/advanced_billing/models/create_component_price_point_request.rb +4 -4
- data/lib/advanced_billing/models/create_component_price_points_request.rb +4 -4
- data/lib/advanced_billing/models/create_credit_note_event.rb +7 -7
- data/lib/advanced_billing/models/create_currency_price.rb +6 -6
- data/lib/advanced_billing/models/create_currency_prices_request.rb +4 -4
- data/lib/advanced_billing/models/create_customer.rb +7 -7
- data/lib/advanced_billing/models/create_customer_request.rb +4 -4
- data/lib/advanced_billing/models/create_debit_note_event.rb +7 -7
- data/lib/advanced_billing/models/create_ebb_component.rb +4 -4
- data/lib/advanced_billing/models/create_invoice.rb +7 -7
- data/lib/advanced_billing/models/create_invoice_address.rb +7 -7
- data/lib/advanced_billing/models/create_invoice_coupon.rb +12 -8
- data/lib/advanced_billing/models/create_invoice_item.rb +7 -7
- data/lib/advanced_billing/models/create_invoice_payment.rb +24 -10
- data/lib/advanced_billing/models/create_invoice_payment_application.rb +5 -5
- data/lib/advanced_billing/models/create_invoice_payment_request.rb +5 -5
- data/lib/advanced_billing/models/create_invoice_request.rb +4 -4
- data/lib/advanced_billing/models/create_metadata.rb +5 -5
- data/lib/advanced_billing/models/create_metadata_request.rb +4 -4
- data/lib/advanced_billing/models/create_metafield.rb +7 -7
- data/lib/advanced_billing/models/create_metafields_request.rb +4 -4
- data/lib/advanced_billing/models/create_metered_component.rb +4 -4
- data/lib/advanced_billing/models/create_multi_invoice_payment.rb +7 -7
- data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +4 -4
- data/lib/advanced_billing/models/create_offer.rb +7 -7
- data/lib/advanced_billing/models/create_offer_component.rb +6 -6
- data/lib/advanced_billing/models/create_offer_request.rb +4 -4
- data/lib/advanced_billing/models/create_on_off_component.rb +4 -4
- data/lib/advanced_billing/models/create_or_update_endpoint.rb +5 -5
- data/lib/advanced_billing/models/create_or_update_endpoint_request.rb +4 -4
- data/lib/advanced_billing/models/create_or_update_product.rb +7 -7
- data/lib/advanced_billing/models/create_or_update_product_request.rb +4 -4
- data/lib/advanced_billing/models/create_or_update_segment_price.rb +6 -6
- data/lib/advanced_billing/models/create_payment.rb +7 -7
- data/lib/advanced_billing/models/create_payment_profile.rb +7 -7
- data/lib/advanced_billing/models/create_payment_profile_request.rb +4 -4
- data/lib/advanced_billing/models/create_prepaid_component.rb +4 -4
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +14 -13
- data/lib/advanced_billing/models/create_prepayment.rb +7 -7
- data/lib/advanced_billing/models/create_prepayment_request.rb +4 -4
- data/lib/advanced_billing/models/create_prepayment_response.rb +4 -4
- data/lib/advanced_billing/models/create_product_currency_price.rb +6 -6
- data/lib/advanced_billing/models/create_product_currency_prices_request.rb +4 -4
- data/lib/advanced_billing/models/create_product_family.rb +6 -6
- data/lib/advanced_billing/models/create_product_family_request.rb +4 -4
- data/lib/advanced_billing/models/create_product_price_point.rb +7 -7
- data/lib/advanced_billing/models/create_product_price_point_request.rb +4 -4
- data/lib/advanced_billing/models/create_quantity_based_component.rb +4 -4
- data/lib/advanced_billing/models/create_reason_code.rb +6 -6
- data/lib/advanced_billing/models/create_reason_code_request.rb +4 -4
- data/lib/advanced_billing/models/create_segment.rb +7 -7
- data/lib/advanced_billing/models/create_segment_request.rb +4 -4
- data/lib/advanced_billing/models/create_subscription.rb +7 -8
- data/lib/advanced_billing/models/create_subscription_component.rb +7 -7
- data/lib/advanced_billing/models/create_subscription_group.rb +5 -5
- data/lib/advanced_billing/models/create_subscription_group_request.rb +4 -4
- data/lib/advanced_billing/models/create_subscription_request.rb +4 -4
- data/lib/advanced_billing/models/create_usage.rb +7 -7
- data/lib/advanced_billing/models/create_usage_request.rb +4 -4
- data/lib/advanced_billing/models/created_prepayment.rb +7 -7
- data/lib/advanced_billing/models/credit_account_balance_changed.rb +7 -7
- data/lib/advanced_billing/models/credit_card_attributes.rb +6 -6
- data/lib/advanced_billing/models/credit_card_payment_profile.rb +7 -7
- data/lib/advanced_billing/models/credit_note.rb +7 -7
- data/lib/advanced_billing/models/credit_note_application.rb +7 -7
- data/lib/advanced_billing/models/credit_note_line_item.rb +7 -7
- data/lib/advanced_billing/models/credit_scheme_request.rb +4 -4
- data/lib/advanced_billing/models/currency_price.rb +27 -7
- data/lib/advanced_billing/models/currency_prices_response.rb +4 -4
- data/lib/advanced_billing/models/custom_field_value_change.rb +7 -7
- data/lib/advanced_billing/models/customer.rb +35 -8
- data/lib/advanced_billing/models/customer_attributes.rb +22 -6
- data/lib/advanced_billing/models/customer_change.rb +7 -7
- data/lib/advanced_billing/models/customer_changes_preview_response.rb +4 -4
- data/lib/advanced_billing/models/customer_custom_fields_change.rb +5 -5
- data/lib/advanced_billing/models/customer_error.rb +4 -4
- data/lib/advanced_billing/models/customer_payer_change.rb +5 -5
- data/lib/advanced_billing/models/customer_response.rb +4 -4
- data/lib/advanced_billing/models/debit_note.rb +7 -7
- data/lib/advanced_billing/models/deduct_service_credit.rb +5 -5
- data/lib/advanced_billing/models/deduct_service_credit_request.rb +4 -4
- data/lib/advanced_billing/models/delayed_cancellation_response.rb +4 -4
- data/lib/advanced_billing/models/delete_subscription_group_response.rb +5 -5
- data/lib/advanced_billing/models/dunner_data.rb +7 -7
- data/lib/advanced_billing/models/dunning_step_data.rb +7 -7
- data/lib/advanced_billing/models/dunning_step_reached.rb +6 -6
- data/lib/advanced_billing/models/ebb_component.rb +17 -53
- data/lib/advanced_billing/models/ebb_event.rb +4 -4
- data/lib/advanced_billing/models/enable_webhooks_request.rb +4 -4
- data/lib/advanced_billing/models/enable_webhooks_response.rb +4 -4
- data/lib/advanced_billing/models/endpoint.rb +7 -7
- data/lib/advanced_billing/models/endpoint_response.rb +4 -4
- data/lib/advanced_billing/models/errors.rb +5 -5
- data/lib/advanced_billing/models/event.rb +71 -11
- data/lib/advanced_billing/models/event_based_billing_segment_error.rb +4 -4
- data/lib/advanced_billing/models/event_key.rb +264 -0
- data/lib/advanced_billing/models/event_response.rb +4 -4
- data/lib/advanced_billing/models/failed_payment_event.rb +7 -7
- data/lib/advanced_billing/models/failed_payment_event_data.rb +7 -7
- data/lib/advanced_billing/models/full_subscription_group_response.rb +7 -7
- data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +7 -7
- data/lib/advanced_billing/models/get_one_time_token_request.rb +4 -4
- data/lib/advanced_billing/models/group_billing.rb +6 -6
- data/lib/advanced_billing/models/group_settings.rb +5 -5
- data/lib/advanced_billing/models/group_target.rb +5 -5
- data/lib/advanced_billing/models/historic_usage.rb +6 -6
- data/lib/advanced_billing/models/invoice.rb +52 -13
- data/lib/advanced_billing/models/invoice_address.rb +7 -7
- data/lib/advanced_billing/models/invoice_avatax_details.rb +130 -0
- data/lib/advanced_billing/models/invoice_balance_item.rb +6 -6
- data/lib/advanced_billing/models/invoice_credit.rb +7 -7
- data/lib/advanced_billing/models/invoice_custom_field.rb +7 -7
- data/lib/advanced_billing/models/invoice_customer.rb +7 -7
- data/lib/advanced_billing/models/invoice_debit.rb +148 -0
- data/lib/advanced_billing/models/invoice_discount.rb +7 -7
- data/lib/advanced_billing/models/invoice_discount_breakout.rb +6 -6
- data/lib/advanced_billing/models/invoice_display_settings.rb +7 -7
- data/lib/advanced_billing/models/invoice_issued.rb +7 -7
- data/lib/advanced_billing/models/invoice_line_item.rb +21 -8
- data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +4 -4
- data/lib/advanced_billing/models/invoice_line_item_event_data.rb +7 -7
- data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +5 -5
- data/lib/advanced_billing/models/invoice_payer.rb +7 -7
- data/lib/advanced_billing/models/invoice_payer_change.rb +7 -7
- data/lib/advanced_billing/models/invoice_payment.rb +31 -8
- data/lib/advanced_billing/models/invoice_payment_application.rb +6 -6
- data/lib/advanced_billing/models/invoice_payment_method.rb +7 -7
- data/lib/advanced_billing/models/invoice_pre_payment.rb +6 -6
- data/lib/advanced_billing/models/invoice_previous_balance.rb +5 -5
- data/lib/advanced_billing/models/invoice_refund.rb +7 -7
- data/lib/advanced_billing/models/invoice_response.rb +4 -4
- data/lib/advanced_billing/models/invoice_seller.rb +7 -7
- data/lib/advanced_billing/models/invoice_status.rb +4 -1
- data/lib/advanced_billing/models/invoice_tax.rb +7 -7
- data/lib/advanced_billing/models/invoice_tax_breakout.rb +7 -7
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +7 -7
- data/lib/advanced_billing/models/issue_advance_invoice_request.rb +4 -4
- data/lib/advanced_billing/models/issue_invoice_event.rb +7 -7
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +7 -7
- data/lib/advanced_billing/models/issue_invoice_request.rb +4 -4
- data/lib/advanced_billing/models/issue_service_credit.rb +5 -5
- data/lib/advanced_billing/models/issue_service_credit_request.rb +4 -4
- data/lib/advanced_billing/models/item_price_point_changed.rb +7 -7
- data/lib/advanced_billing/models/item_price_point_data.rb +6 -6
- data/lib/advanced_billing/models/list_components_filter.rb +5 -5
- data/lib/advanced_billing/models/list_components_price_points_response.rb +4 -4
- data/lib/advanced_billing/models/list_coupons_filter.rb +7 -7
- data/lib/advanced_billing/models/list_credit_notes_response.rb +4 -4
- data/lib/advanced_billing/models/list_invoice_events_response.rb +7 -7
- data/lib/advanced_billing/models/list_invoices_response.rb +4 -4
- data/lib/advanced_billing/models/list_metafields_response.rb +7 -7
- data/lib/advanced_billing/models/list_mrr_filter.rb +4 -4
- data/lib/advanced_billing/models/list_mrr_response.rb +4 -4
- data/lib/advanced_billing/models/list_mrr_response_result.rb +7 -7
- data/lib/advanced_billing/models/list_offers_response.rb +4 -4
- data/lib/advanced_billing/models/list_prepayments_filter.rb +6 -6
- data/lib/advanced_billing/models/list_price_points_filter.rb +7 -7
- data/lib/advanced_billing/models/list_product_price_points_response.rb +4 -4
- data/lib/advanced_billing/models/list_products_filter.rb +7 -7
- data/lib/advanced_billing/models/list_proforma_invoices_meta.rb +7 -7
- data/lib/advanced_billing/models/list_proforma_invoices_response.rb +5 -5
- data/lib/advanced_billing/models/list_public_keys_meta.rb +7 -7
- data/lib/advanced_billing/models/list_public_keys_response.rb +5 -5
- data/lib/advanced_billing/models/list_sale_rep_item.rb +7 -7
- data/lib/advanced_billing/models/list_segments_filter.rb +7 -7
- data/lib/advanced_billing/models/list_segments_response.rb +4 -4
- data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +7 -7
- data/lib/advanced_billing/models/list_subscription_components_filter.rb +5 -5
- data/lib/advanced_billing/models/list_subscription_components_for_site_filter.rb +6 -6
- data/lib/advanced_billing/models/list_subscription_components_response.rb +4 -4
- data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +4 -4
- data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +4 -4
- data/lib/advanced_billing/models/list_subscription_groups_item.rb +7 -7
- data/lib/advanced_billing/models/list_subscription_groups_meta.rb +5 -5
- data/lib/advanced_billing/models/list_subscription_groups_response.rb +5 -5
- data/lib/advanced_billing/models/metadata.rb +7 -7
- data/lib/advanced_billing/models/metafield.rb +7 -7
- data/lib/advanced_billing/models/metafield_scope.rb +7 -7
- data/lib/advanced_billing/models/metered_component.rb +22 -51
- data/lib/advanced_billing/models/metered_usage.rb +7 -7
- data/lib/advanced_billing/models/movement.rb +7 -7
- data/lib/advanced_billing/models/movement_line_item.rb +7 -7
- data/lib/advanced_billing/models/mrr.rb +7 -7
- data/lib/advanced_billing/models/mrr_movement.rb +7 -7
- data/lib/advanced_billing/models/mrr_response.rb +4 -4
- data/lib/advanced_billing/models/multi_invoice_payment.rb +7 -7
- data/lib/advanced_billing/models/multi_invoice_payment_response.rb +4 -4
- data/lib/advanced_billing/models/nested_subscription_group.rb +7 -7
- data/lib/advanced_billing/models/net_terms.rb +7 -7
- data/lib/advanced_billing/models/offer.rb +7 -7
- data/lib/advanced_billing/models/offer_discount.rb +6 -6
- data/lib/advanced_billing/models/offer_item.rb +7 -7
- data/lib/advanced_billing/models/offer_response.rb +4 -4
- data/lib/advanced_billing/models/offer_signup_page.rb +7 -7
- data/lib/advanced_billing/models/{reason_codes_json_response.rb → ok_response.rb} +7 -7
- data/lib/advanced_billing/models/on_off_component.rb +40 -61
- data/lib/advanced_billing/models/organization_address.rb +7 -7
- data/lib/advanced_billing/models/origin_invoice.rb +5 -5
- data/lib/advanced_billing/models/overage_pricing.rb +5 -5
- data/lib/advanced_billing/models/override_subscription.rb +7 -7
- data/lib/advanced_billing/models/override_subscription_request.rb +4 -4
- data/lib/advanced_billing/models/paginated_metadata.rb +7 -7
- data/lib/advanced_billing/models/paid_invoice.rb +7 -7
- data/lib/advanced_billing/models/pause_request.rb +4 -4
- data/lib/advanced_billing/models/payer_attributes.rb +7 -7
- data/lib/advanced_billing/models/payer_error.rb +6 -6
- data/lib/advanced_billing/models/payment_collection_method_changed.rb +5 -5
- data/lib/advanced_billing/models/payment_for_allocation.rb +7 -7
- data/lib/advanced_billing/models/payment_method_apple_pay.rb +4 -4
- data/lib/advanced_billing/models/payment_method_bank_account.rb +6 -6
- data/lib/advanced_billing/models/payment_method_credit_card.rb +7 -7
- data/lib/advanced_billing/models/payment_method_external.rb +7 -7
- data/lib/advanced_billing/models/payment_method_paypal.rb +5 -5
- data/lib/advanced_billing/models/payment_profile_attributes.rb +7 -7
- data/lib/advanced_billing/models/payment_profile_response.rb +4 -4
- data/lib/advanced_billing/models/payment_related_events.rb +5 -5
- data/lib/advanced_billing/models/paypal_payment_profile.rb +7 -7
- data/lib/advanced_billing/models/pending_cancellation_change.rb +5 -5
- data/lib/advanced_billing/models/portal_management_link.rb +7 -7
- data/lib/advanced_billing/models/prepaid_configuration.rb +7 -7
- data/lib/advanced_billing/models/prepaid_configuration_response.rb +4 -4
- data/lib/advanced_billing/models/prepaid_product_price_point_filter.rb +4 -4
- data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +7 -7
- data/lib/advanced_billing/models/prepaid_usage.rb +7 -7
- data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +6 -6
- data/lib/advanced_billing/models/prepaid_usage_component.rb +48 -41
- data/lib/advanced_billing/models/prepayment.rb +7 -7
- data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +7 -7
- data/lib/advanced_billing/models/prepayment_response.rb +4 -4
- data/lib/advanced_billing/models/prepayments_response.rb +4 -4
- data/lib/advanced_billing/models/preview_allocations_request.rb +7 -7
- data/lib/advanced_billing/models/price.rb +6 -6
- data/lib/advanced_billing/models/product.rb +7 -7
- data/lib/advanced_billing/models/product_family.rb +7 -7
- data/lib/advanced_billing/models/product_family_response.rb +4 -4
- data/lib/advanced_billing/models/product_price_point.rb +7 -7
- data/lib/advanced_billing/models/product_price_point_errors.rb +7 -7
- data/lib/advanced_billing/models/product_price_point_response.rb +4 -4
- data/lib/advanced_billing/models/product_response.rb +4 -4
- data/lib/advanced_billing/models/proforma_error.rb +4 -4
- data/lib/advanced_billing/models/proforma_invoice.rb +7 -7
- data/lib/advanced_billing/models/proforma_invoice_credit.rb +7 -7
- data/lib/advanced_billing/models/proforma_invoice_discount.rb +7 -7
- data/lib/advanced_billing/models/proforma_invoice_issued.rb +7 -7
- data/lib/advanced_billing/models/proforma_invoice_payment.rb +7 -7
- data/lib/advanced_billing/models/proforma_invoice_tax.rb +7 -7
- data/lib/advanced_billing/models/proration.rb +4 -4
- data/lib/advanced_billing/models/public_key.rb +6 -6
- data/lib/advanced_billing/models/public_signup_page.rb +7 -7
- data/lib/advanced_billing/models/quantity_based_component.rb +21 -23
- data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +5 -5
- data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +7 -7
- data/lib/advanced_billing/models/reactivate_subscription_request.rb +7 -7
- data/lib/advanced_billing/models/reactivation_billing.rb +4 -4
- data/lib/advanced_billing/models/reason_code.rb +7 -7
- data/lib/advanced_billing/models/reason_code_response.rb +4 -4
- data/lib/advanced_billing/models/record_payment_request.rb +4 -4
- data/lib/advanced_billing/models/record_payment_response.rb +5 -5
- data/lib/advanced_billing/models/referral_code.rb +7 -7
- data/lib/advanced_billing/models/referral_validation_response.rb +4 -4
- data/lib/advanced_billing/models/refund_consolidated_invoice.rb +7 -7
- data/lib/advanced_billing/models/refund_invoice.rb +7 -7
- data/lib/advanced_billing/models/refund_invoice_event.rb +7 -7
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +7 -7
- data/lib/advanced_billing/models/refund_invoice_request.rb +4 -4
- data/lib/advanced_billing/models/refund_prepayment.rb +7 -7
- data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +4 -4
- data/lib/advanced_billing/models/refund_prepayment_request.rb +4 -4
- data/lib/advanced_billing/models/refund_success.rb +6 -6
- data/lib/advanced_billing/models/remove_payment_event.rb +7 -7
- data/lib/advanced_billing/models/remove_payment_event_data.rb +7 -7
- data/lib/advanced_billing/models/renewal_preview.rb +7 -7
- data/lib/advanced_billing/models/renewal_preview_component.rb +6 -6
- data/lib/advanced_billing/models/renewal_preview_line_item.rb +7 -7
- data/lib/advanced_billing/models/renewal_preview_request.rb +4 -4
- data/lib/advanced_billing/models/renewal_preview_response.rb +4 -4
- data/lib/advanced_billing/models/replay_webhooks_request.rb +4 -4
- data/lib/advanced_billing/models/replay_webhooks_response.rb +4 -4
- data/lib/advanced_billing/models/resent_invitation.rb +7 -7
- data/lib/advanced_billing/models/resume_options.rb +5 -5
- data/lib/advanced_billing/models/revoked_invitation.rb +6 -6
- data/lib/advanced_billing/models/sale_rep.rb +7 -7
- data/lib/advanced_billing/models/sale_rep_item_mrr.rb +6 -6
- data/lib/advanced_billing/models/sale_rep_settings.rb +7 -7
- data/lib/advanced_billing/models/sale_rep_subscription.rb +7 -7
- data/lib/advanced_billing/models/segment.rb +7 -7
- data/lib/advanced_billing/models/segment_price.rb +7 -7
- data/lib/advanced_billing/models/segment_response.rb +4 -4
- data/lib/advanced_billing/models/send_invoice_request.rb +6 -6
- data/lib/advanced_billing/models/service_credit.rb +7 -7
- data/lib/advanced_billing/models/service_credit_response.rb +4 -4
- data/lib/advanced_billing/models/signup_proforma_preview.rb +5 -5
- data/lib/advanced_billing/models/signup_proforma_preview_response.rb +4 -4
- data/lib/advanced_billing/models/site.rb +7 -7
- data/lib/advanced_billing/models/site_response.rb +4 -4
- data/lib/advanced_billing/models/site_statistics.rb +7 -7
- data/lib/advanced_billing/models/site_summary.rb +7 -7
- data/lib/advanced_billing/models/subscription.rb +7 -7
- data/lib/advanced_billing/models/subscription_component.rb +7 -7
- data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +5 -5
- data/lib/advanced_billing/models/subscription_component_response.rb +4 -4
- data/lib/advanced_billing/models/subscription_component_subscription.rb +5 -5
- data/lib/advanced_billing/models/subscription_custom_price.rb +7 -7
- data/lib/advanced_billing/models/subscription_filter.rb +7 -7
- data/lib/advanced_billing/models/subscription_group.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_balances.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +6 -6
- data/lib/advanced_billing/models/subscription_group_credit_card.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_customer.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_item.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_members_array_error.rb +4 -4
- data/lib/advanced_billing/models/subscription_group_payment_profile.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_prepayment.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +4 -4
- data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_response.rb +4 -4
- data/lib/advanced_billing/models/subscription_group_signup.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_signup_component.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_signup_error.rb +7 -7
- data/lib/advanced_billing/models/{subscription_group_signup_success.rb → subscription_group_signup_event_data.rb} +17 -15
- data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_signup_item.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_signup_request.rb +4 -4
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_single_error.rb +4 -4
- data/lib/advanced_billing/models/subscription_group_subscription_error.rb +7 -7
- data/lib/advanced_billing/models/subscription_group_update_error.rb +6 -15
- data/lib/advanced_billing/models/subscription_included_coupon.rb +7 -7
- data/lib/advanced_billing/models/subscription_migration_preview.rb +7 -7
- data/lib/advanced_billing/models/subscription_migration_preview_options.rb +7 -7
- data/lib/advanced_billing/models/subscription_migration_preview_request.rb +4 -4
- data/lib/advanced_billing/models/subscription_migration_preview_response.rb +4 -4
- data/lib/advanced_billing/models/subscription_mrr.rb +6 -6
- data/lib/advanced_billing/models/subscription_mrr_breakout.rb +5 -5
- data/lib/advanced_billing/models/subscription_mrr_response.rb +4 -4
- data/lib/advanced_billing/models/subscription_note.rb +7 -7
- data/lib/advanced_billing/models/subscription_note_response.rb +4 -4
- data/lib/advanced_billing/models/subscription_preview.rb +5 -5
- data/lib/advanced_billing/models/subscription_preview_response.rb +4 -4
- data/lib/advanced_billing/models/subscription_product_change.rb +5 -5
- data/lib/advanced_billing/models/subscription_product_migration.rb +7 -7
- data/lib/advanced_billing/models/subscription_product_migration_request.rb +4 -4
- data/lib/advanced_billing/models/subscription_response.rb +4 -4
- data/lib/advanced_billing/models/subscription_state_change.rb +5 -5
- data/lib/advanced_billing/models/tax_configuration.rb +6 -6
- data/lib/advanced_billing/models/too_many_management_link_requests.rb +5 -5
- data/lib/advanced_billing/models/update_allocation_expiration_date.rb +4 -4
- data/lib/advanced_billing/models/update_component.rb +7 -7
- data/lib/advanced_billing/models/update_component_price_point.rb +7 -7
- data/lib/advanced_billing/models/update_component_price_point_request.rb +4 -4
- data/lib/advanced_billing/models/update_component_request.rb +4 -4
- data/lib/advanced_billing/models/update_coupon_currency.rb +5 -5
- data/lib/advanced_billing/models/update_currency_price.rb +6 -6
- data/lib/advanced_billing/models/update_currency_prices_request.rb +4 -4
- data/lib/advanced_billing/models/update_customer.rb +7 -7
- data/lib/advanced_billing/models/update_customer_request.rb +4 -4
- data/lib/advanced_billing/models/update_metadata.rb +6 -6
- data/lib/advanced_billing/models/update_metadata_request.rb +4 -4
- data/lib/advanced_billing/models/update_metafield.rb +7 -7
- data/lib/advanced_billing/models/update_metafields_request.rb +4 -4
- data/lib/advanced_billing/models/update_payment_profile.rb +7 -7
- data/lib/advanced_billing/models/update_payment_profile_request.rb +4 -4
- data/lib/advanced_billing/models/update_price.rb +7 -7
- data/lib/advanced_billing/models/update_product_price_point.rb +5 -5
- data/lib/advanced_billing/models/update_product_price_point_request.rb +4 -4
- data/lib/advanced_billing/models/update_reason_code.rb +6 -6
- data/lib/advanced_billing/models/update_reason_code_request.rb +4 -4
- data/lib/advanced_billing/models/update_segment.rb +5 -5
- data/lib/advanced_billing/models/update_segment_request.rb +4 -4
- data/lib/advanced_billing/models/update_subscription.rb +31 -8
- data/lib/advanced_billing/models/update_subscription_component.rb +5 -5
- data/lib/advanced_billing/models/update_subscription_group.rb +4 -4
- data/lib/advanced_billing/models/update_subscription_group_request.rb +4 -4
- data/lib/advanced_billing/models/update_subscription_note.rb +5 -5
- data/lib/advanced_billing/models/update_subscription_note_request.rb +4 -4
- data/lib/advanced_billing/models/update_subscription_request.rb +4 -4
- data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +7 -7
- data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +4 -4
- data/lib/advanced_billing/models/usage.rb +7 -7
- data/lib/advanced_billing/models/usage_response.rb +4 -4
- data/lib/advanced_billing/models/void_invoice.rb +4 -4
- data/lib/advanced_billing/models/void_invoice_event.rb +7 -7
- data/lib/advanced_billing/models/void_invoice_event_data.rb +7 -7
- data/lib/advanced_billing/models/void_invoice_request.rb +4 -4
- data/lib/advanced_billing/models/void_remainder_event.rb +7 -7
- data/lib/advanced_billing/models/void_remainder_event_data.rb +7 -7
- data/lib/advanced_billing/models/webhook.rb +7 -7
- data/lib/advanced_billing/models/webhook_response.rb +4 -4
- data/lib/advanced_billing/utilities/union_type_lookup.rb +12 -33
- data/lib/advanced_billing.rb +9 -11
- metadata +12 -14
- data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +0 -249
- data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +0 -250
- data/lib/advanced_billing/models/event_type.rb +0 -121
- data/lib/advanced_billing/models/prepaid_component_price_point.rb +0 -123
- data/lib/advanced_billing/models/subscription_group_member_error.rb +0 -78
- data/lib/advanced_billing/models/subscription_group_signup_failure.rb +0 -93
- data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +0 -185
@@ -25,7 +25,7 @@ module AdvancedBilling
|
|
25
25
|
new_api_call_builder
|
26
26
|
.request(new_request_builder(HttpMethodEnum::POST,
|
27
27
|
'/subscriptions/{subscription_id}/notes.json',
|
28
|
-
Server::
|
28
|
+
Server::PRODUCTION)
|
29
29
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
30
30
|
.is_required(true)
|
31
31
|
.should_encode(true))
|
@@ -36,7 +36,11 @@ module AdvancedBilling
|
|
36
36
|
.auth(Single.new('BasicAuth')))
|
37
37
|
.response(new_response_handler
|
38
38
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
39
|
-
.deserialize_into(SubscriptionNoteResponse.method(:from_hash))
|
39
|
+
.deserialize_into(SubscriptionNoteResponse.method(:from_hash))
|
40
|
+
.local_error_template('422',
|
41
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
42
|
+
' Response: \'{$response.body}\'.',
|
43
|
+
ErrorListResponseException))
|
40
44
|
.execute
|
41
45
|
end
|
42
46
|
|
@@ -60,7 +64,7 @@ module AdvancedBilling
|
|
60
64
|
new_api_call_builder
|
61
65
|
.request(new_request_builder(HttpMethodEnum::GET,
|
62
66
|
'/subscriptions/{subscription_id}/notes.json',
|
63
|
-
Server::
|
67
|
+
Server::PRODUCTION)
|
64
68
|
.template_param(new_parameter(options['subscription_id'], key: 'subscription_id')
|
65
69
|
.is_required(true)
|
66
70
|
.should_encode(true))
|
@@ -71,7 +75,11 @@ module AdvancedBilling
|
|
71
75
|
.response(new_response_handler
|
72
76
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
73
77
|
.deserialize_into(SubscriptionNoteResponse.method(:from_hash))
|
74
|
-
.is_response_array(true)
|
78
|
+
.is_response_array(true)
|
79
|
+
.local_error_template('422',
|
80
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
81
|
+
' Response: \'{$response.body}\'.',
|
82
|
+
ErrorListResponseException))
|
75
83
|
.execute
|
76
84
|
end
|
77
85
|
|
@@ -87,7 +95,7 @@ module AdvancedBilling
|
|
87
95
|
new_api_call_builder
|
88
96
|
.request(new_request_builder(HttpMethodEnum::GET,
|
89
97
|
'/subscriptions/{subscription_id}/notes/{note_id}.json',
|
90
|
-
Server::
|
98
|
+
Server::PRODUCTION)
|
91
99
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
92
100
|
.is_required(true)
|
93
101
|
.should_encode(true))
|
@@ -115,7 +123,7 @@ module AdvancedBilling
|
|
115
123
|
new_api_call_builder
|
116
124
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
117
125
|
'/subscriptions/{subscription_id}/notes/{note_id}.json',
|
118
|
-
Server::
|
126
|
+
Server::PRODUCTION)
|
119
127
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
120
128
|
.is_required(true)
|
121
129
|
.should_encode(true))
|
@@ -129,7 +137,11 @@ module AdvancedBilling
|
|
129
137
|
.auth(Single.new('BasicAuth')))
|
130
138
|
.response(new_response_handler
|
131
139
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
132
|
-
.deserialize_into(SubscriptionNoteResponse.method(:from_hash))
|
140
|
+
.deserialize_into(SubscriptionNoteResponse.method(:from_hash))
|
141
|
+
.local_error_template('422',
|
142
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
143
|
+
' Response: \'{$response.body}\'.',
|
144
|
+
ErrorListResponseException))
|
133
145
|
.execute
|
134
146
|
end
|
135
147
|
|
@@ -144,7 +156,7 @@ module AdvancedBilling
|
|
144
156
|
new_api_call_builder
|
145
157
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
146
158
|
'/subscriptions/{subscription_id}/notes/{note_id}.json',
|
147
|
-
Server::
|
159
|
+
Server::PRODUCTION)
|
148
160
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
149
161
|
.is_required(true)
|
150
162
|
.should_encode(true))
|
@@ -109,7 +109,7 @@ module AdvancedBilling
|
|
109
109
|
new_api_call_builder
|
110
110
|
.request(new_request_builder(HttpMethodEnum::POST,
|
111
111
|
'/subscriptions/{subscription_id}/migrations.json',
|
112
|
-
Server::
|
112
|
+
Server::PRODUCTION)
|
113
113
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
114
114
|
.is_required(true)
|
115
115
|
.should_encode(true))
|
@@ -146,7 +146,7 @@ module AdvancedBilling
|
|
146
146
|
new_api_call_builder
|
147
147
|
.request(new_request_builder(HttpMethodEnum::POST,
|
148
148
|
'/subscriptions/{subscription_id}/migrations/preview.json',
|
149
|
-
Server::
|
149
|
+
Server::PRODUCTION)
|
150
150
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
151
151
|
.is_required(true)
|
152
152
|
.should_encode(true))
|
@@ -19,7 +19,7 @@ module AdvancedBilling
|
|
19
19
|
new_api_call_builder
|
20
20
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
21
21
|
'/subscriptions/{subscription_id}/retry.json',
|
22
|
-
Server::
|
22
|
+
Server::PRODUCTION)
|
23
23
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
24
24
|
.is_required(true)
|
25
25
|
.should_encode(true))
|
@@ -46,7 +46,7 @@ module AdvancedBilling
|
|
46
46
|
new_api_call_builder
|
47
47
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
48
48
|
'/subscriptions/{subscription_id}.json',
|
49
|
-
Server::
|
49
|
+
Server::PRODUCTION)
|
50
50
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
51
51
|
.is_required(true)
|
52
52
|
.should_encode(true))
|
@@ -83,7 +83,7 @@ module AdvancedBilling
|
|
83
83
|
new_api_call_builder
|
84
84
|
.request(new_request_builder(HttpMethodEnum::POST,
|
85
85
|
'/subscriptions/{subscription_id}/resume.json',
|
86
|
-
Server::
|
86
|
+
Server::PRODUCTION)
|
87
87
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
88
88
|
.is_required(true)
|
89
89
|
.should_encode(true))
|
@@ -114,7 +114,7 @@ module AdvancedBilling
|
|
114
114
|
new_api_call_builder
|
115
115
|
.request(new_request_builder(HttpMethodEnum::POST,
|
116
116
|
'/subscriptions/{subscription_id}/hold.json',
|
117
|
-
Server::
|
117
|
+
Server::PRODUCTION)
|
118
118
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
119
119
|
.is_required(true)
|
120
120
|
.should_encode(true))
|
@@ -149,7 +149,7 @@ module AdvancedBilling
|
|
149
149
|
new_api_call_builder
|
150
150
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
151
151
|
'/subscriptions/{subscription_id}/hold.json',
|
152
|
-
Server::
|
152
|
+
Server::PRODUCTION)
|
153
153
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
154
154
|
.is_required(true)
|
155
155
|
.should_encode(true))
|
@@ -315,7 +315,7 @@ module AdvancedBilling
|
|
315
315
|
new_api_call_builder
|
316
316
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
317
317
|
'/subscriptions/{subscription_id}/reactivate.json',
|
318
|
-
Server::
|
318
|
+
Server::PRODUCTION)
|
319
319
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
320
320
|
.is_required(true)
|
321
321
|
.should_encode(true))
|
@@ -349,7 +349,7 @@ module AdvancedBilling
|
|
349
349
|
new_api_call_builder
|
350
350
|
.request(new_request_builder(HttpMethodEnum::POST,
|
351
351
|
'/subscriptions/{subscription_id}/delayed_cancel.json',
|
352
|
-
Server::
|
352
|
+
Server::PRODUCTION)
|
353
353
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
354
354
|
.is_required(true)
|
355
355
|
.should_encode(true))
|
@@ -363,7 +363,11 @@ module AdvancedBilling
|
|
363
363
|
.deserialize_into(DelayedCancellationResponse.method(:from_hash))
|
364
364
|
.local_error_template('404',
|
365
365
|
'Not Found:\'{$response.body}\'',
|
366
|
-
APIException)
|
366
|
+
APIException)
|
367
|
+
.local_error_template('422',
|
368
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
369
|
+
' Response: \'{$response.body}\'.',
|
370
|
+
ErrorListResponseException))
|
367
371
|
.execute
|
368
372
|
end
|
369
373
|
|
@@ -380,7 +384,7 @@ module AdvancedBilling
|
|
380
384
|
new_api_call_builder
|
381
385
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
382
386
|
'/subscriptions/{subscription_id}/delayed_cancel.json',
|
383
|
-
Server::
|
387
|
+
Server::PRODUCTION)
|
384
388
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
385
389
|
.is_required(true)
|
386
390
|
.should_encode(true))
|
@@ -404,7 +408,7 @@ module AdvancedBilling
|
|
404
408
|
new_api_call_builder
|
405
409
|
.request(new_request_builder(HttpMethodEnum::POST,
|
406
410
|
'/subscriptions/{subscription_id}/cancel_dunning.json',
|
407
|
-
Server::
|
411
|
+
Server::PRODUCTION)
|
408
412
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
409
413
|
.is_required(true)
|
410
414
|
.should_encode(true))
|
@@ -412,7 +416,11 @@ module AdvancedBilling
|
|
412
416
|
.auth(Single.new('BasicAuth')))
|
413
417
|
.response(new_response_handler
|
414
418
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
415
|
-
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
419
|
+
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
420
|
+
.local_error_template('422',
|
421
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
422
|
+
' Response: \'{$response.body}\'.',
|
423
|
+
ErrorListResponseException))
|
416
424
|
.execute
|
417
425
|
end
|
418
426
|
|
@@ -457,7 +465,7 @@ module AdvancedBilling
|
|
457
465
|
new_api_call_builder
|
458
466
|
.request(new_request_builder(HttpMethodEnum::POST,
|
459
467
|
'/subscriptions/{subscription_id}/renewals/preview.json',
|
460
|
-
Server::
|
468
|
+
Server::PRODUCTION)
|
461
469
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
462
470
|
.is_required(true)
|
463
471
|
.should_encode(true))
|
@@ -45,6 +45,16 @@ module AdvancedBilling
|
|
45
45
|
# ACH and Direct Debit. That said, when you read the subscription after
|
46
46
|
# creation, we return the profile details under `credit_card` or
|
47
47
|
# `bank_account`.
|
48
|
+
# ## Bulk creation of subscriptions
|
49
|
+
# Bulk creation of subscriptions is currently not supported. For scenarios
|
50
|
+
# where multiple subscriptions must be added, particularly when assigning to
|
51
|
+
# the same subscription group, it is essential to switch to a
|
52
|
+
# single-threaded approach.
|
53
|
+
# To avoid data conflicts or inaccuracies, incorporate a sleep interval
|
54
|
+
# between requests.
|
55
|
+
# While this single-threaded approach may impact performance, it ensures
|
56
|
+
# data consistency and accuracy in cases where concurrent creation attempts
|
57
|
+
# could otherwise lead to issues with subscription alignment and integrity.
|
48
58
|
# ## Taxable Subscriptions
|
49
59
|
# If your intent is to charge your subscribers tax via [Avalara
|
50
60
|
# Taxes](https://maxio.zendesk.com/hc/en-us/articles/24287043035661-Avalara-
|
@@ -800,7 +810,7 @@ module AdvancedBilling
|
|
800
810
|
new_api_call_builder
|
801
811
|
.request(new_request_builder(HttpMethodEnum::POST,
|
802
812
|
'/subscriptions.json',
|
803
|
-
Server::
|
813
|
+
Server::PRODUCTION)
|
804
814
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
805
815
|
.body_param(new_parameter(body))
|
806
816
|
.header_param(new_parameter('application/json', key: 'accept'))
|
@@ -886,7 +896,7 @@ module AdvancedBilling
|
|
886
896
|
new_api_call_builder
|
887
897
|
.request(new_request_builder(HttpMethodEnum::GET,
|
888
898
|
'/subscriptions.json',
|
889
|
-
Server::
|
899
|
+
Server::PRODUCTION)
|
890
900
|
.query_param(new_parameter(options['page'], key: 'page'))
|
891
901
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
892
902
|
.query_param(new_parameter(options['state'], key: 'state'))
|
@@ -983,7 +993,7 @@ module AdvancedBilling
|
|
983
993
|
new_api_call_builder
|
984
994
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
985
995
|
'/subscriptions/{subscription_id}.json',
|
986
|
-
Server::
|
996
|
+
Server::PRODUCTION)
|
987
997
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
988
998
|
.is_required(true)
|
989
999
|
.should_encode(true))
|
@@ -1018,7 +1028,7 @@ module AdvancedBilling
|
|
1018
1028
|
new_api_call_builder
|
1019
1029
|
.request(new_request_builder(HttpMethodEnum::GET,
|
1020
1030
|
'/subscriptions/{subscription_id}.json',
|
1021
|
-
Server::
|
1031
|
+
Server::PRODUCTION)
|
1022
1032
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
1023
1033
|
.is_required(true)
|
1024
1034
|
.should_encode(true))
|
@@ -1074,7 +1084,7 @@ module AdvancedBilling
|
|
1074
1084
|
new_api_call_builder
|
1075
1085
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
1076
1086
|
'/subscriptions/{subscription_id}/override.json',
|
1077
|
-
Server::
|
1087
|
+
Server::PRODUCTION)
|
1078
1088
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
1079
1089
|
.is_required(true)
|
1080
1090
|
.should_encode(true))
|
@@ -1098,13 +1108,16 @@ module AdvancedBilling
|
|
1098
1108
|
new_api_call_builder
|
1099
1109
|
.request(new_request_builder(HttpMethodEnum::GET,
|
1100
1110
|
'/subscriptions/lookup.json',
|
1101
|
-
Server::
|
1111
|
+
Server::PRODUCTION)
|
1102
1112
|
.query_param(new_parameter(reference, key: 'reference'))
|
1103
1113
|
.header_param(new_parameter('application/json', key: 'accept'))
|
1104
1114
|
.auth(Single.new('BasicAuth')))
|
1105
1115
|
.response(new_response_handler
|
1106
1116
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
1107
|
-
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
1117
|
+
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
1118
|
+
.local_error_template('404',
|
1119
|
+
'Not Found:\'{$response.body}\'',
|
1120
|
+
APIException))
|
1108
1121
|
.execute
|
1109
1122
|
end
|
1110
1123
|
|
@@ -1125,24 +1138,30 @@ module AdvancedBilling
|
|
1125
1138
|
# @param [Array[SubscriptionPurgeType]] cascade Optional parameter: Options
|
1126
1139
|
# are "customer" or "payment_profile". Use in query:
|
1127
1140
|
# `cascade[]=customer&cascade[]=payment_profile`.
|
1128
|
-
# @return [
|
1141
|
+
# @return [SubscriptionResponse] response from the API call.
|
1129
1142
|
def purge_subscription(subscription_id,
|
1130
1143
|
ack,
|
1131
1144
|
cascade: nil)
|
1132
1145
|
new_api_call_builder
|
1133
1146
|
.request(new_request_builder(HttpMethodEnum::POST,
|
1134
1147
|
'/subscriptions/{subscription_id}/purge.json',
|
1135
|
-
Server::
|
1148
|
+
Server::PRODUCTION)
|
1136
1149
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
1137
1150
|
.is_required(true)
|
1138
1151
|
.should_encode(true))
|
1139
1152
|
.query_param(new_parameter(ack, key: 'ack')
|
1140
1153
|
.is_required(true))
|
1141
1154
|
.query_param(new_parameter(cascade, key: 'cascade'))
|
1155
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
1142
1156
|
.auth(Single.new('BasicAuth'))
|
1143
|
-
.array_serialization_format(ArraySerializationFormat::
|
1157
|
+
.array_serialization_format(ArraySerializationFormat::UN_INDEXED))
|
1144
1158
|
.response(new_response_handler
|
1145
|
-
.
|
1159
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
1160
|
+
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
1161
|
+
.local_error_template('400',
|
1162
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
1163
|
+
' Response: \'{$response.body}\'.',
|
1164
|
+
SubscriptionResponseErrorException))
|
1146
1165
|
.execute
|
1147
1166
|
end
|
1148
1167
|
|
@@ -1157,7 +1176,7 @@ module AdvancedBilling
|
|
1157
1176
|
new_api_call_builder
|
1158
1177
|
.request(new_request_builder(HttpMethodEnum::POST,
|
1159
1178
|
'/subscriptions/{subscription_id}/prepaid_configurations.json',
|
1160
|
-
Server::
|
1179
|
+
Server::PRODUCTION)
|
1161
1180
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
1162
1181
|
.is_required(true)
|
1163
1182
|
.should_encode(true))
|
@@ -1168,7 +1187,11 @@ module AdvancedBilling
|
|
1168
1187
|
.auth(Single.new('BasicAuth')))
|
1169
1188
|
.response(new_response_handler
|
1170
1189
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
1171
|
-
.deserialize_into(PrepaidConfigurationResponse.method(:from_hash))
|
1190
|
+
.deserialize_into(PrepaidConfigurationResponse.method(:from_hash))
|
1191
|
+
.local_error_template('422',
|
1192
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
1193
|
+
' Response: \'{$response.body}\'.',
|
1194
|
+
APIException))
|
1172
1195
|
.execute
|
1173
1196
|
end
|
1174
1197
|
|
@@ -1213,7 +1236,7 @@ module AdvancedBilling
|
|
1213
1236
|
new_api_call_builder
|
1214
1237
|
.request(new_request_builder(HttpMethodEnum::POST,
|
1215
1238
|
'/subscriptions/preview.json',
|
1216
|
-
Server::
|
1239
|
+
Server::PRODUCTION)
|
1217
1240
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
1218
1241
|
.body_param(new_parameter(body))
|
1219
1242
|
.header_param(new_parameter('application/json', key: 'accept'))
|
@@ -1250,7 +1273,7 @@ module AdvancedBilling
|
|
1250
1273
|
new_api_call_builder
|
1251
1274
|
.request(new_request_builder(HttpMethodEnum::POST,
|
1252
1275
|
'/subscriptions/{subscription_id}/add_coupon.json',
|
1253
|
-
Server::
|
1276
|
+
Server::PRODUCTION)
|
1254
1277
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
1255
1278
|
.is_required(true)
|
1256
1279
|
.should_encode(true))
|
@@ -1284,7 +1307,7 @@ module AdvancedBilling
|
|
1284
1307
|
new_api_call_builder
|
1285
1308
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
1286
1309
|
'/subscriptions/{subscription_id}/remove_coupon.json',
|
1287
|
-
Server::
|
1310
|
+
Server::PRODUCTION)
|
1288
1311
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
1289
1312
|
.is_required(true)
|
1290
1313
|
.should_encode(true))
|
@@ -1361,7 +1384,7 @@ module AdvancedBilling
|
|
1361
1384
|
new_api_call_builder
|
1362
1385
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
1363
1386
|
'/subscriptions/{subscription_id}/activate.json',
|
1364
|
-
Server::
|
1387
|
+
Server::PRODUCTION)
|
1365
1388
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
1366
1389
|
.is_required(true)
|
1367
1390
|
.should_encode(true))
|
@@ -58,7 +58,7 @@ module AdvancedBilling
|
|
58
58
|
new_api_call_builder
|
59
59
|
.request(new_request_builder(HttpMethodEnum::GET,
|
60
60
|
'/webhooks.json',
|
61
|
-
Server::
|
61
|
+
Server::PRODUCTION)
|
62
62
|
.query_param(new_parameter(options['status'], key: 'status'))
|
63
63
|
.query_param(new_parameter(options['since_date'], key: 'since_date'))
|
64
64
|
.query_param(new_parameter(options['until_date'], key: 'until_date'))
|
@@ -82,7 +82,7 @@ module AdvancedBilling
|
|
82
82
|
new_api_call_builder
|
83
83
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
84
84
|
'/webhooks/settings.json',
|
85
|
-
Server::
|
85
|
+
Server::PRODUCTION)
|
86
86
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
87
87
|
.body_param(new_parameter(body))
|
88
88
|
.header_param(new_parameter('application/json', key: 'accept'))
|
@@ -105,7 +105,7 @@ module AdvancedBilling
|
|
105
105
|
new_api_call_builder
|
106
106
|
.request(new_request_builder(HttpMethodEnum::POST,
|
107
107
|
'/webhooks/replay.json',
|
108
|
-
Server::
|
108
|
+
Server::PRODUCTION)
|
109
109
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
110
110
|
.body_param(new_parameter(body))
|
111
111
|
.header_param(new_parameter('application/json', key: 'accept'))
|
@@ -129,7 +129,7 @@ module AdvancedBilling
|
|
129
129
|
new_api_call_builder
|
130
130
|
.request(new_request_builder(HttpMethodEnum::POST,
|
131
131
|
'/endpoints.json',
|
132
|
-
Server::
|
132
|
+
Server::PRODUCTION)
|
133
133
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
134
134
|
.body_param(new_parameter(body))
|
135
135
|
.header_param(new_parameter('application/json', key: 'accept'))
|
@@ -151,7 +151,7 @@ module AdvancedBilling
|
|
151
151
|
new_api_call_builder
|
152
152
|
.request(new_request_builder(HttpMethodEnum::GET,
|
153
153
|
'/endpoints.json',
|
154
|
-
Server::
|
154
|
+
Server::PRODUCTION)
|
155
155
|
.header_param(new_parameter('application/json', key: 'accept'))
|
156
156
|
.auth(Single.new('BasicAuth')))
|
157
157
|
.response(new_response_handler
|
@@ -182,7 +182,7 @@ module AdvancedBilling
|
|
182
182
|
new_api_call_builder
|
183
183
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
184
184
|
'/endpoints/{endpoint_id}.json',
|
185
|
-
Server::
|
185
|
+
Server::PRODUCTION)
|
186
186
|
.template_param(new_parameter(endpoint_id, key: 'endpoint_id')
|
187
187
|
.is_required(true)
|
188
188
|
.should_encode(true))
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AdvancedBilling
|
7
|
+
# Subscription Response_Error class.
|
8
|
+
class SubscriptionResponseErrorException < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Subscription]
|
14
|
+
attr_accessor :subscription
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
@subscription = Subscription.from_hash(hash['subscription']) if hash['subscription']
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -49,6 +49,11 @@ module AdvancedBilling
|
|
49
49
|
|
50
50
|
def initialize(balance_in_cents: SKIP, automatic_balance_in_cents: SKIP,
|
51
51
|
remittance_balance_in_cents: SKIP, additional_properties: {})
|
52
|
+
# Add additional model properties to the instance.
|
53
|
+
additional_properties.each do |_name, _value|
|
54
|
+
instance_variable_set("@#{_name}", _value)
|
55
|
+
end
|
56
|
+
|
52
57
|
@balance_in_cents = balance_in_cents unless balance_in_cents == SKIP
|
53
58
|
unless automatic_balance_in_cents == SKIP
|
54
59
|
@automatic_balance_in_cents =
|
@@ -58,11 +63,6 @@ module AdvancedBilling
|
|
58
63
|
@remittance_balance_in_cents =
|
59
64
|
remittance_balance_in_cents
|
60
65
|
end
|
61
|
-
|
62
|
-
# Add additional model properties to the instance.
|
63
|
-
additional_properties.each do |_name, _value|
|
64
|
-
instance_variable_set("@#{_name}", _value)
|
65
|
-
end
|
66
66
|
end
|
67
67
|
|
68
68
|
# Creates an instance of the object from a hash.
|
@@ -78,13 +78,13 @@ module AdvancedBilling
|
|
78
78
|
hash.key?('remittance_balance_in_cents') ? hash['remittance_balance_in_cents'] : SKIP
|
79
79
|
|
80
80
|
# Clean out expected properties from Hash.
|
81
|
-
|
81
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
82
82
|
|
83
83
|
# Create object from extracted values.
|
84
84
|
AccountBalance.new(balance_in_cents: balance_in_cents,
|
85
85
|
automatic_balance_in_cents: automatic_balance_in_cents,
|
86
86
|
remittance_balance_in_cents: remittance_balance_in_cents,
|
87
|
-
additional_properties:
|
87
|
+
additional_properties: additional_properties)
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
@@ -61,16 +61,16 @@ module AdvancedBilling
|
|
61
61
|
def initialize(open_invoices: SKIP, pending_invoices: SKIP,
|
62
62
|
pending_discounts: SKIP, service_credits: SKIP,
|
63
63
|
prepayments: SKIP, additional_properties: {})
|
64
|
+
# Add additional model properties to the instance.
|
65
|
+
additional_properties.each do |_name, _value|
|
66
|
+
instance_variable_set("@#{_name}", _value)
|
67
|
+
end
|
68
|
+
|
64
69
|
@open_invoices = open_invoices unless open_invoices == SKIP
|
65
70
|
@pending_invoices = pending_invoices unless pending_invoices == SKIP
|
66
71
|
@pending_discounts = pending_discounts unless pending_discounts == SKIP
|
67
72
|
@service_credits = service_credits unless service_credits == SKIP
|
68
73
|
@prepayments = prepayments unless prepayments == SKIP
|
69
|
-
|
70
|
-
# Add additional model properties to the instance.
|
71
|
-
additional_properties.each do |_name, _value|
|
72
|
-
instance_variable_set("@#{_name}", _value)
|
73
|
-
end
|
74
74
|
end
|
75
75
|
|
76
76
|
# Creates an instance of the object from a hash.
|
@@ -88,7 +88,7 @@ module AdvancedBilling
|
|
88
88
|
prepayments = AccountBalance.from_hash(hash['prepayments']) if hash['prepayments']
|
89
89
|
|
90
90
|
# Clean out expected properties from Hash.
|
91
|
-
|
91
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
92
92
|
|
93
93
|
# Create object from extracted values.
|
94
94
|
AccountBalances.new(open_invoices: open_invoices,
|
@@ -96,7 +96,7 @@ module AdvancedBilling
|
|
96
96
|
pending_discounts: pending_discounts,
|
97
97
|
service_credits: service_credits,
|
98
98
|
prepayments: prepayments,
|
99
|
-
additional_properties:
|
99
|
+
additional_properties: additional_properties)
|
100
100
|
end
|
101
101
|
end
|
102
102
|
end
|
@@ -58,15 +58,15 @@ module AdvancedBilling
|
|
58
58
|
def initialize(agreement_terms: SKIP, authorizer_first_name: SKIP,
|
59
59
|
authorizer_last_name: SKIP, ip_address: SKIP,
|
60
60
|
additional_properties: {})
|
61
|
-
@agreement_terms = agreement_terms unless agreement_terms == SKIP
|
62
|
-
@authorizer_first_name = authorizer_first_name unless authorizer_first_name == SKIP
|
63
|
-
@authorizer_last_name = authorizer_last_name unless authorizer_last_name == SKIP
|
64
|
-
@ip_address = ip_address unless ip_address == SKIP
|
65
|
-
|
66
61
|
# Add additional model properties to the instance.
|
67
62
|
additional_properties.each do |_name, _value|
|
68
63
|
instance_variable_set("@#{_name}", _value)
|
69
64
|
end
|
65
|
+
|
66
|
+
@agreement_terms = agreement_terms unless agreement_terms == SKIP
|
67
|
+
@authorizer_first_name = authorizer_first_name unless authorizer_first_name == SKIP
|
68
|
+
@authorizer_last_name = authorizer_last_name unless authorizer_last_name == SKIP
|
69
|
+
@ip_address = ip_address unless ip_address == SKIP
|
70
70
|
end
|
71
71
|
|
72
72
|
# Creates an instance of the object from a hash.
|
@@ -83,14 +83,14 @@ module AdvancedBilling
|
|
83
83
|
ip_address = hash.key?('ip_address') ? hash['ip_address'] : SKIP
|
84
84
|
|
85
85
|
# Clean out expected properties from Hash.
|
86
|
-
|
86
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
87
87
|
|
88
88
|
# Create object from extracted values.
|
89
89
|
ACHAgreement.new(agreement_terms: agreement_terms,
|
90
90
|
authorizer_first_name: authorizer_first_name,
|
91
91
|
authorizer_last_name: authorizer_last_name,
|
92
92
|
ip_address: ip_address,
|
93
|
-
additional_properties:
|
93
|
+
additional_properties: additional_properties)
|
94
94
|
end
|
95
95
|
|
96
96
|
# Validates an instance of the object from a given value.
|
@@ -50,14 +50,14 @@ module AdvancedBilling
|
|
50
50
|
|
51
51
|
def initialize(price_point_id: SKIP, billing_schedule: SKIP,
|
52
52
|
custom_price: SKIP, additional_properties: {})
|
53
|
-
@price_point_id = price_point_id unless price_point_id == SKIP
|
54
|
-
@billing_schedule = billing_schedule unless billing_schedule == SKIP
|
55
|
-
@custom_price = custom_price unless custom_price == SKIP
|
56
|
-
|
57
53
|
# Add additional model properties to the instance.
|
58
54
|
additional_properties.each do |_name, _value|
|
59
55
|
instance_variable_set("@#{_name}", _value)
|
60
56
|
end
|
57
|
+
|
58
|
+
@price_point_id = price_point_id unless price_point_id == SKIP
|
59
|
+
@billing_schedule = billing_schedule unless billing_schedule == SKIP
|
60
|
+
@custom_price = custom_price unless custom_price == SKIP
|
61
61
|
end
|
62
62
|
|
63
63
|
# Creates an instance of the object from a hash.
|
@@ -72,13 +72,13 @@ module AdvancedBilling
|
|
72
72
|
custom_price = ComponentCustomPrice.from_hash(hash['custom_price']) if hash['custom_price']
|
73
73
|
|
74
74
|
# Clean out expected properties from Hash.
|
75
|
-
|
75
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
76
76
|
|
77
77
|
# Create object from extracted values.
|
78
78
|
ActivateEventBasedComponent.new(price_point_id: price_point_id,
|
79
79
|
billing_schedule: billing_schedule,
|
80
80
|
custom_price: custom_price,
|
81
|
-
additional_properties:
|
81
|
+
additional_properties: additional_properties)
|
82
82
|
end
|
83
83
|
end
|
84
84
|
end
|
@@ -39,12 +39,12 @@ module AdvancedBilling
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def initialize(revert_on_failure: SKIP, additional_properties: {})
|
42
|
-
@revert_on_failure = revert_on_failure unless revert_on_failure == SKIP
|
43
|
-
|
44
42
|
# Add additional model properties to the instance.
|
45
43
|
additional_properties.each do |_name, _value|
|
46
44
|
instance_variable_set("@#{_name}", _value)
|
47
45
|
end
|
46
|
+
|
47
|
+
@revert_on_failure = revert_on_failure unless revert_on_failure == SKIP
|
48
48
|
end
|
49
49
|
|
50
50
|
# Creates an instance of the object from a hash.
|
@@ -56,11 +56,11 @@ module AdvancedBilling
|
|
56
56
|
hash.key?('revert_on_failure') ? hash['revert_on_failure'] : SKIP
|
57
57
|
|
58
58
|
# Clean out expected properties from Hash.
|
59
|
-
|
59
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
60
60
|
|
61
61
|
# Create object from extracted values.
|
62
62
|
ActivateSubscriptionRequest.new(revert_on_failure: revert_on_failure,
|
63
|
-
additional_properties:
|
63
|
+
additional_properties: additional_properties)
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|