maxio-advanced-billing-sdk 5.2.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 +7 -7
- 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 +7 -7
- data/lib/advanced_billing/models/customer_attributes.rb +7 -7
- 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 +7 -7
- 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 +7 -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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e10e983a5e5694c5523e99ac733f5020798ee6e91e59c06f8abfeaab90b2c25
|
4
|
+
data.tar.gz: d5ee7d244cf36bb1fbc293355087c317b12ec700fc2564608fe4b39e037b0bac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1329435ddfb3318d7691df8966775418b6d673c6d08de1707be53313532c3c4ee6bcbb737c589527835515801b9f5c9f941b4a23b4bba20269d852c20cb6e9ca
|
7
|
+
data.tar.gz: 51b9f93e072af910446c3673967994d8fce5b163401e6e0c0f4ae6a405d0eca4439caaadaa15f780b5af1395cbd68f4b89f5f9091dbf643af5fe9f0854230d9e
|
data/README.md
CHANGED
@@ -29,29 +29,28 @@ curl -u <api_key>:x -H Accept:application/json -H Content-Type:application/json
|
|
29
29
|
|
30
30
|
Install the gem from the command line:
|
31
31
|
|
32
|
-
```
|
33
|
-
gem install maxio-advanced-billing-sdk -v
|
32
|
+
```bash
|
33
|
+
gem install maxio-advanced-billing-sdk -v 6.0.0
|
34
34
|
```
|
35
35
|
|
36
36
|
Or add the gem to your Gemfile and run `bundle`:
|
37
37
|
|
38
38
|
```ruby
|
39
|
-
gem 'maxio-advanced-billing-sdk', '
|
39
|
+
gem 'maxio-advanced-billing-sdk', '6.0.0'
|
40
40
|
```
|
41
41
|
|
42
|
-
For additional gem details, see the [RubyGems page for the maxio-advanced-billing-sdk gem](https://rubygems.org/gems/maxio-advanced-billing-sdk/versions/
|
42
|
+
For additional gem details, see the [RubyGems page for the maxio-advanced-billing-sdk gem](https://rubygems.org/gems/maxio-advanced-billing-sdk/versions/6.0.0).
|
43
43
|
|
44
44
|
## Initialize the API Client
|
45
45
|
|
46
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
46
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/client.md)
|
47
47
|
|
48
48
|
The following parameters are configurable for the API Client:
|
49
49
|
|
50
50
|
| Parameter | Type | Description |
|
51
51
|
| --- | --- | --- |
|
52
|
-
| `
|
53
|
-
| `
|
54
|
-
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.PRODUCTION`** |
|
52
|
+
| `site` | `String` | The subdomain for your Advanced Billing site.<br>*Default*: `'subdomain'` |
|
53
|
+
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.US`** |
|
55
54
|
| `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
56
55
|
| `adapter` | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
57
56
|
| `timeout` | `Float` | The value to use for connection timeout. <br> **Default: 120** |
|
@@ -61,7 +60,7 @@ The following parameters are configurable for the API Client:
|
|
61
60
|
| `retry_statuses` | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
62
61
|
| `retry_methods` | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
63
62
|
| `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
64
|
-
| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
63
|
+
| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
|
65
64
|
|
66
65
|
The API client can be initialized as follows:
|
67
66
|
|
@@ -71,9 +70,8 @@ client = AdvancedBilling::Client.new(
|
|
71
70
|
username: 'BasicAuthUserName',
|
72
71
|
password: 'BasicAuthPassword'
|
73
72
|
),
|
74
|
-
environment: Environment::
|
75
|
-
|
76
|
-
domain: 'chargify.com'
|
73
|
+
environment: Environment::US,
|
74
|
+
site: 'subdomain'
|
77
75
|
)
|
78
76
|
```
|
79
77
|
|
@@ -85,53 +83,53 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
85
83
|
|
86
84
|
| Name | Description |
|
87
85
|
| --- | --- |
|
88
|
-
|
|
89
|
-
|
|
86
|
+
| US | **Default** Default Advanced Billing environment hosted in US. Valid for the majority of our customers. |
|
87
|
+
| EU | Advanced Billing environment hosted in EU. Use only when you requested EU hosting for your AB account. |
|
90
88
|
|
91
89
|
## Authorization
|
92
90
|
|
93
91
|
This API uses the following authentication schemes.
|
94
92
|
|
95
|
-
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
93
|
+
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/auth/basic-authentication.md)
|
96
94
|
|
97
95
|
## List of APIs
|
98
96
|
|
99
|
-
* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
100
|
-
* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
101
|
-
* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
102
|
-
* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
103
|
-
* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
104
|
-
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
105
|
-
* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
106
|
-
* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
107
|
-
* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
108
|
-
* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
109
|
-
* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
110
|
-
* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
111
|
-
* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
112
|
-
* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
113
|
-
* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
114
|
-
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
115
|
-
* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
116
|
-
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
117
|
-
* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
118
|
-
* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
119
|
-
* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
120
|
-
* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
121
|
-
* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
122
|
-
* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
123
|
-
* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
124
|
-
* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
125
|
-
* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
126
|
-
* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
127
|
-
* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
128
|
-
* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
129
|
-
* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
130
|
-
* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
97
|
+
* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/api-exports.md)
|
98
|
+
* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/advance-invoice.md)
|
99
|
+
* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/billing-portal.md)
|
100
|
+
* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/component-price-points.md)
|
101
|
+
* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/custom-fields.md)
|
102
|
+
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/events-based-billing-segments.md)
|
103
|
+
* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/payment-profiles.md)
|
104
|
+
* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/product-families.md)
|
105
|
+
* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/product-price-points.md)
|
106
|
+
* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/proforma-invoices.md)
|
107
|
+
* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/reason-codes.md)
|
108
|
+
* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/referral-codes.md)
|
109
|
+
* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/sales-commissions.md)
|
110
|
+
* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/subscription-components.md)
|
111
|
+
* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/subscription-groups.md)
|
112
|
+
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/subscription-group-invoice-account.md)
|
113
|
+
* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/subscription-group-status.md)
|
114
|
+
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/subscription-invoice-account.md)
|
115
|
+
* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/subscription-notes.md)
|
116
|
+
* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/subscription-products.md)
|
117
|
+
* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/subscription-status.md)
|
118
|
+
* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/coupons.md)
|
119
|
+
* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/components.md)
|
120
|
+
* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/customers.md)
|
121
|
+
* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/events.md)
|
122
|
+
* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/insights.md)
|
123
|
+
* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/invoices.md)
|
124
|
+
* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/offers.md)
|
125
|
+
* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/products.md)
|
126
|
+
* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/sites.md)
|
127
|
+
* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/subscriptions.md)
|
128
|
+
* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/controllers/webhooks.md)
|
131
129
|
|
132
130
|
## Classes Documentation
|
133
131
|
|
134
|
-
* [Utility Classes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
135
|
-
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
136
|
-
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
132
|
+
* [Utility Classes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/utility-classes.md)
|
133
|
+
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/http-response.md)
|
134
|
+
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/http-request.md)
|
137
135
|
|
@@ -206,8 +206,8 @@ module AdvancedBilling
|
|
206
206
|
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
207
207
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
208
208
|
retry_methods: %i[get put], http_callback: nil,
|
209
|
-
environment: Environment::
|
210
|
-
|
209
|
+
environment: Environment::US, site: 'subdomain',
|
210
|
+
basic_auth_credentials: nil, config: nil
|
211
211
|
)
|
212
212
|
@config = if config.nil?
|
213
213
|
Configuration.new(
|
@@ -216,8 +216,7 @@ module AdvancedBilling
|
|
216
216
|
backoff_factor: backoff_factor,
|
217
217
|
retry_statuses: retry_statuses,
|
218
218
|
retry_methods: retry_methods, http_callback: http_callback,
|
219
|
-
environment: environment,
|
220
|
-
domain: domain,
|
219
|
+
environment: environment, site: site,
|
221
220
|
basic_auth_credentials: basic_auth_credentials
|
222
221
|
)
|
223
222
|
else
|
@@ -6,18 +6,19 @@
|
|
6
6
|
module AdvancedBilling
|
7
7
|
# An enum for SDK environments.
|
8
8
|
class Environment
|
9
|
-
#
|
10
|
-
#
|
9
|
+
# US: Default Advanced Billing environment hosted in US. Valid for the majority of our customers.
|
10
|
+
# EU: Advanced Billing environment hosted in EU. Use only when you requested EU hosting for your AB account.
|
11
11
|
ENVIRONMENT = [
|
12
|
-
|
13
|
-
|
12
|
+
US = 'US'.freeze,
|
13
|
+
EU = 'EU'.freeze
|
14
14
|
].freeze
|
15
15
|
end
|
16
16
|
|
17
17
|
# An enum for API servers.
|
18
18
|
class Server
|
19
19
|
SERVER = [
|
20
|
-
|
20
|
+
PRODUCTION = 'production'.freeze,
|
21
|
+
EBB = 'ebb'.freeze
|
21
22
|
].freeze
|
22
23
|
end
|
23
24
|
|
@@ -25,7 +26,7 @@ module AdvancedBilling
|
|
25
26
|
# are configured in this class.
|
26
27
|
class Configuration < CoreLibrary::HttpClientConfiguration
|
27
28
|
# The attribute readers for properties.
|
28
|
-
attr_reader :environment, :
|
29
|
+
attr_reader :environment, :site, :basic_auth_credentials
|
29
30
|
|
30
31
|
class << self
|
31
32
|
attr_reader :environments
|
@@ -36,8 +37,8 @@ module AdvancedBilling
|
|
36
37
|
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
37
38
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
38
39
|
retry_methods: %i[get put], http_callback: nil,
|
39
|
-
environment: Environment::
|
40
|
-
|
40
|
+
environment: Environment::US, site: 'subdomain',
|
41
|
+
basic_auth_credentials: nil
|
41
42
|
)
|
42
43
|
|
43
44
|
super connection: connection, adapter: adapter, timeout: timeout,
|
@@ -49,10 +50,7 @@ module AdvancedBilling
|
|
49
50
|
@environment = String(environment)
|
50
51
|
|
51
52
|
# The subdomain for your Advanced Billing site.
|
52
|
-
@
|
53
|
-
|
54
|
-
# The Advanced Billing server domain.
|
55
|
-
@domain = domain
|
53
|
+
@site = site
|
56
54
|
|
57
55
|
# The object holding Basic Authentication credentials
|
58
56
|
@basic_auth_credentials = basic_auth_credentials
|
@@ -67,8 +65,7 @@ module AdvancedBilling
|
|
67
65
|
def clone_with(connection: nil, adapter: nil, timeout: nil,
|
68
66
|
max_retries: nil, retry_interval: nil, backoff_factor: nil,
|
69
67
|
retry_statuses: nil, retry_methods: nil, http_callback: nil,
|
70
|
-
environment: nil,
|
71
|
-
basic_auth_credentials: nil)
|
68
|
+
environment: nil, site: nil, basic_auth_credentials: nil)
|
72
69
|
connection ||= self.connection
|
73
70
|
adapter ||= self.adapter
|
74
71
|
timeout ||= self.timeout
|
@@ -79,8 +76,7 @@ module AdvancedBilling
|
|
79
76
|
retry_methods ||= self.retry_methods
|
80
77
|
http_callback ||= self.http_callback
|
81
78
|
environment ||= self.environment
|
82
|
-
|
83
|
-
domain ||= self.domain
|
79
|
+
site ||= self.site
|
84
80
|
basic_auth_credentials ||= basic_auth_credentials
|
85
81
|
|
86
82
|
Configuration.new(connection: connection, adapter: adapter,
|
@@ -90,18 +86,20 @@ module AdvancedBilling
|
|
90
86
|
retry_statuses: retry_statuses,
|
91
87
|
retry_methods: retry_methods,
|
92
88
|
http_callback: http_callback, environment: environment,
|
93
|
-
|
89
|
+
site: site,
|
94
90
|
basic_auth_credentials: basic_auth_credentials)
|
95
91
|
end
|
96
92
|
|
97
93
|
|
98
94
|
# All the environments the SDK can run in.
|
99
95
|
ENVIRONMENTS = {
|
100
|
-
Environment::
|
101
|
-
Server::
|
96
|
+
Environment::US => {
|
97
|
+
Server::PRODUCTION => 'https://{site}.chargify.com',
|
98
|
+
Server::EBB => 'https://events.chargify.com/{site}'
|
102
99
|
},
|
103
|
-
Environment::
|
104
|
-
Server::
|
100
|
+
Environment::EU => {
|
101
|
+
Server::PRODUCTION => 'https://{site}.ebilling.maxio.com',
|
102
|
+
Server::EBB => 'https://events.chargify.com/{site}'
|
105
103
|
}
|
106
104
|
}.freeze
|
107
105
|
|
@@ -109,10 +107,9 @@ module AdvancedBilling
|
|
109
107
|
# @param [Configuration::Server] server The server enum for which the base URI is
|
110
108
|
# required.
|
111
109
|
# @return [String] The base URI.
|
112
|
-
def get_base_uri(server = Server::
|
110
|
+
def get_base_uri(server = Server::PRODUCTION)
|
113
111
|
parameters = {
|
114
|
-
'
|
115
|
-
'domain' => { 'value' => domain, 'encode' => false }
|
112
|
+
'site' => { 'value' => site, 'encode' => false }
|
116
113
|
}
|
117
114
|
APIHelper.append_url_with_template_parameters(
|
118
115
|
ENVIRONMENTS[environment][server], parameters
|
@@ -32,7 +32,7 @@ module AdvancedBilling
|
|
32
32
|
new_api_call_builder
|
33
33
|
.request(new_request_builder(HttpMethodEnum::POST,
|
34
34
|
'/subscriptions/{subscription_id}/advance_invoice/issue.json',
|
35
|
-
Server::
|
35
|
+
Server::PRODUCTION)
|
36
36
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
37
37
|
.is_required(true)
|
38
38
|
.should_encode(true))
|
@@ -64,7 +64,7 @@ module AdvancedBilling
|
|
64
64
|
new_api_call_builder
|
65
65
|
.request(new_request_builder(HttpMethodEnum::GET,
|
66
66
|
'/subscriptions/{subscription_id}/advance_invoice.json',
|
67
|
-
Server::
|
67
|
+
Server::PRODUCTION)
|
68
68
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
69
69
|
.is_required(true)
|
70
70
|
.should_encode(true))
|
@@ -94,7 +94,7 @@ module AdvancedBilling
|
|
94
94
|
new_api_call_builder
|
95
95
|
.request(new_request_builder(HttpMethodEnum::POST,
|
96
96
|
'/subscriptions/{subscription_id}/advance_invoice/void.json',
|
97
|
-
Server::
|
97
|
+
Server::PRODUCTION)
|
98
98
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
99
99
|
.is_required(true)
|
100
100
|
.should_encode(true))
|
@@ -29,7 +29,7 @@ module AdvancedBilling
|
|
29
29
|
new_api_call_builder
|
30
30
|
.request(new_request_builder(HttpMethodEnum::GET,
|
31
31
|
'/api_exports/proforma_invoices/{batch_id}/rows.json',
|
32
|
-
Server::
|
32
|
+
Server::PRODUCTION)
|
33
33
|
.template_param(new_parameter(options['batch_id'], key: 'batch_id')
|
34
34
|
.is_required(true)
|
35
35
|
.should_encode(true))
|
@@ -70,7 +70,7 @@ module AdvancedBilling
|
|
70
70
|
new_api_call_builder
|
71
71
|
.request(new_request_builder(HttpMethodEnum::GET,
|
72
72
|
'/api_exports/invoices/{batch_id}/rows.json',
|
73
|
-
Server::
|
73
|
+
Server::PRODUCTION)
|
74
74
|
.template_param(new_parameter(options['batch_id'], key: 'batch_id')
|
75
75
|
.is_required(true)
|
76
76
|
.should_encode(true))
|
@@ -111,7 +111,7 @@ module AdvancedBilling
|
|
111
111
|
new_api_call_builder
|
112
112
|
.request(new_request_builder(HttpMethodEnum::GET,
|
113
113
|
'/api_exports/subscriptions/{batch_id}/rows.json',
|
114
|
-
Server::
|
114
|
+
Server::PRODUCTION)
|
115
115
|
.template_param(new_parameter(options['batch_id'], key: 'batch_id')
|
116
116
|
.is_required(true)
|
117
117
|
.should_encode(true))
|
@@ -136,7 +136,7 @@ module AdvancedBilling
|
|
136
136
|
new_api_call_builder
|
137
137
|
.request(new_request_builder(HttpMethodEnum::POST,
|
138
138
|
'/api_exports/proforma_invoices.json',
|
139
|
-
Server::
|
139
|
+
Server::PRODUCTION)
|
140
140
|
.header_param(new_parameter('application/json', key: 'accept'))
|
141
141
|
.auth(Single.new('BasicAuth')))
|
142
142
|
.response(new_response_handler
|
@@ -158,7 +158,7 @@ module AdvancedBilling
|
|
158
158
|
new_api_call_builder
|
159
159
|
.request(new_request_builder(HttpMethodEnum::POST,
|
160
160
|
'/api_exports/invoices.json',
|
161
|
-
Server::
|
161
|
+
Server::PRODUCTION)
|
162
162
|
.header_param(new_parameter('application/json', key: 'accept'))
|
163
163
|
.auth(Single.new('BasicAuth')))
|
164
164
|
.response(new_response_handler
|
@@ -180,7 +180,7 @@ module AdvancedBilling
|
|
180
180
|
new_api_call_builder
|
181
181
|
.request(new_request_builder(HttpMethodEnum::POST,
|
182
182
|
'/api_exports/subscriptions.json',
|
183
|
-
Server::
|
183
|
+
Server::PRODUCTION)
|
184
184
|
.header_param(new_parameter('application/json', key: 'accept'))
|
185
185
|
.auth(Single.new('BasicAuth')))
|
186
186
|
.response(new_response_handler
|
@@ -200,7 +200,7 @@ module AdvancedBilling
|
|
200
200
|
new_api_call_builder
|
201
201
|
.request(new_request_builder(HttpMethodEnum::GET,
|
202
202
|
'/api_exports/proforma_invoices/{batch_id}.json',
|
203
|
-
Server::
|
203
|
+
Server::PRODUCTION)
|
204
204
|
.template_param(new_parameter(batch_id, key: 'batch_id')
|
205
205
|
.is_required(true)
|
206
206
|
.should_encode(true))
|
@@ -222,7 +222,7 @@ module AdvancedBilling
|
|
222
222
|
new_api_call_builder
|
223
223
|
.request(new_request_builder(HttpMethodEnum::GET,
|
224
224
|
'/api_exports/invoices/{batch_id}.json',
|
225
|
-
Server::
|
225
|
+
Server::PRODUCTION)
|
226
226
|
.template_param(new_parameter(batch_id, key: 'batch_id')
|
227
227
|
.is_required(true)
|
228
228
|
.should_encode(true))
|
@@ -244,7 +244,7 @@ module AdvancedBilling
|
|
244
244
|
new_api_call_builder
|
245
245
|
.request(new_request_builder(HttpMethodEnum::GET,
|
246
246
|
'/api_exports/subscriptions/{batch_id}.json',
|
247
|
-
Server::
|
247
|
+
Server::PRODUCTION)
|
248
248
|
.template_param(new_parameter(batch_id, key: 'batch_id')
|
249
249
|
.is_required(true)
|
250
250
|
.should_encode(true))
|
@@ -43,7 +43,7 @@ module AdvancedBilling
|
|
43
43
|
new_api_call_builder
|
44
44
|
.request(new_request_builder(HttpMethodEnum::POST,
|
45
45
|
'/portal/customers/{customer_id}/enable.json',
|
46
|
-
Server::
|
46
|
+
Server::PRODUCTION)
|
47
47
|
.template_param(new_parameter(customer_id, key: 'customer_id')
|
48
48
|
.is_required(true)
|
49
49
|
.should_encode(true))
|
@@ -79,7 +79,7 @@ module AdvancedBilling
|
|
79
79
|
new_api_call_builder
|
80
80
|
.request(new_request_builder(HttpMethodEnum::GET,
|
81
81
|
'/portal/customers/{customer_id}/management_link.json',
|
82
|
-
Server::
|
82
|
+
Server::PRODUCTION)
|
83
83
|
.template_param(new_parameter(customer_id, key: 'customer_id')
|
84
84
|
.is_required(true)
|
85
85
|
.should_encode(true))
|
@@ -117,7 +117,7 @@ module AdvancedBilling
|
|
117
117
|
new_api_call_builder
|
118
118
|
.request(new_request_builder(HttpMethodEnum::POST,
|
119
119
|
'/portal/customers/{customer_id}/invitations/invite.json',
|
120
|
-
Server::
|
120
|
+
Server::PRODUCTION)
|
121
121
|
.template_param(new_parameter(customer_id, key: 'customer_id')
|
122
122
|
.is_required(true)
|
123
123
|
.should_encode(true))
|
@@ -148,7 +148,7 @@ module AdvancedBilling
|
|
148
148
|
new_api_call_builder
|
149
149
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
150
150
|
'/portal/customers/{customer_id}/invitations/revoke.json',
|
151
|
-
Server::
|
151
|
+
Server::PRODUCTION)
|
152
152
|
.template_param(new_parameter(customer_id, key: 'customer_id')
|
153
153
|
.is_required(true)
|
154
154
|
.should_encode(true))
|
@@ -25,7 +25,7 @@ module AdvancedBilling
|
|
25
25
|
new_api_call_builder
|
26
26
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
27
27
|
'/components/{component_id}/price_points/{price_point_id}/default.json',
|
28
|
-
Server::
|
28
|
+
Server::PRODUCTION)
|
29
29
|
.template_param(new_parameter(component_id, key: 'component_id')
|
30
30
|
.is_required(true)
|
31
31
|
.should_encode(true))
|
@@ -52,7 +52,7 @@ module AdvancedBilling
|
|
52
52
|
new_api_call_builder
|
53
53
|
.request(new_request_builder(HttpMethodEnum::POST,
|
54
54
|
'/components/{component_id}/price_points.json',
|
55
|
-
Server::
|
55
|
+
Server::PRODUCTION)
|
56
56
|
.template_param(new_parameter(component_id, key: 'component_id')
|
57
57
|
.is_required(true)
|
58
58
|
.should_encode(true))
|
@@ -63,7 +63,11 @@ module AdvancedBilling
|
|
63
63
|
.auth(Single.new('BasicAuth')))
|
64
64
|
.response(new_response_handler
|
65
65
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
66
|
-
.deserialize_into(ComponentPricePointResponse.method(:from_hash))
|
66
|
+
.deserialize_into(ComponentPricePointResponse.method(:from_hash))
|
67
|
+
.local_error_template('422',
|
68
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
69
|
+
' Response: \'{$response.body}\'.',
|
70
|
+
ErrorArrayMapResponseException))
|
67
71
|
.execute
|
68
72
|
end
|
69
73
|
|
@@ -100,7 +104,7 @@ module AdvancedBilling
|
|
100
104
|
new_api_call_builder
|
101
105
|
.request(new_request_builder(HttpMethodEnum::GET,
|
102
106
|
'/components/{component_id}/price_points.json',
|
103
|
-
Server::
|
107
|
+
Server::PRODUCTION)
|
104
108
|
.template_param(new_parameter(options['component_id'], key: 'component_id')
|
105
109
|
.is_required(true)
|
106
110
|
.should_encode(true))
|
@@ -129,7 +133,7 @@ module AdvancedBilling
|
|
129
133
|
new_api_call_builder
|
130
134
|
.request(new_request_builder(HttpMethodEnum::POST,
|
131
135
|
'/components/{component_id}/price_points/bulk.json',
|
132
|
-
Server::
|
136
|
+
Server::PRODUCTION)
|
133
137
|
.template_param(new_parameter(component_id, key: 'component_id')
|
134
138
|
.is_required(true)
|
135
139
|
.should_encode(true))
|
@@ -140,7 +144,11 @@ module AdvancedBilling
|
|
140
144
|
.auth(Single.new('BasicAuth')))
|
141
145
|
.response(new_response_handler
|
142
146
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
143
|
-
.deserialize_into(ComponentPricePointsResponse.method(:from_hash))
|
147
|
+
.deserialize_into(ComponentPricePointsResponse.method(:from_hash))
|
148
|
+
.local_error_template('422',
|
149
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
150
|
+
' Response: \'{$response.body}\'.',
|
151
|
+
ErrorListResponseException))
|
144
152
|
.execute
|
145
153
|
end
|
146
154
|
|
@@ -169,7 +177,7 @@ module AdvancedBilling
|
|
169
177
|
new_api_call_builder
|
170
178
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
171
179
|
'/components/{component_id}/price_points/{price_point_id}.json',
|
172
|
-
Server::
|
180
|
+
Server::PRODUCTION)
|
173
181
|
.template_param(new_parameter(component_id, key: 'component_id')
|
174
182
|
.is_required(true)
|
175
183
|
.should_encode(true)
|
@@ -210,13 +218,16 @@ module AdvancedBilling
|
|
210
218
|
# handle of the price point. When using the handle, it must be prefixed with
|
211
219
|
# `handle:`. Example: `123` for an integer ID, or
|
212
220
|
# `handle:example-price_point-handle` for a string handle.
|
221
|
+
# @param [TrueClass | FalseClass] currency_prices Optional parameter:
|
222
|
+
# Include an array of currency price data
|
213
223
|
# @return [ComponentPricePointResponse] response from the API call.
|
214
224
|
def read_component_price_point(component_id,
|
215
|
-
price_point_id
|
225
|
+
price_point_id,
|
226
|
+
currency_prices: nil)
|
216
227
|
new_api_call_builder
|
217
228
|
.request(new_request_builder(HttpMethodEnum::GET,
|
218
229
|
'/components/{component_id}/price_points/{price_point_id}.json',
|
219
|
-
Server::
|
230
|
+
Server::PRODUCTION)
|
220
231
|
.template_param(new_parameter(component_id, key: 'component_id')
|
221
232
|
.is_required(true)
|
222
233
|
.should_encode(true)
|
@@ -231,6 +242,7 @@ module AdvancedBilling
|
|
231
242
|
UnionTypeLookUp.get(:ReadComponentPricePointPricePointId)
|
232
243
|
.validate(value)
|
233
244
|
end))
|
245
|
+
.query_param(new_parameter(currency_prices, key: 'currency_prices'))
|
234
246
|
.header_param(new_parameter('application/json', key: 'accept'))
|
235
247
|
.auth(Single.new('BasicAuth')))
|
236
248
|
.response(new_response_handler
|
@@ -256,7 +268,7 @@ module AdvancedBilling
|
|
256
268
|
new_api_call_builder
|
257
269
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
258
270
|
'/components/{component_id}/price_points/{price_point_id}.json',
|
259
|
-
Server::
|
271
|
+
Server::PRODUCTION)
|
260
272
|
.template_param(new_parameter(component_id, key: 'component_id')
|
261
273
|
.is_required(true)
|
262
274
|
.should_encode(true)
|
@@ -294,7 +306,7 @@ module AdvancedBilling
|
|
294
306
|
new_api_call_builder
|
295
307
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
296
308
|
'/components/{component_id}/price_points/{price_point_id}/unarchive.json',
|
297
|
-
Server::
|
309
|
+
Server::PRODUCTION)
|
298
310
|
.template_param(new_parameter(component_id, key: 'component_id')
|
299
311
|
.is_required(true)
|
300
312
|
.should_encode(true))
|
@@ -325,7 +337,7 @@ module AdvancedBilling
|
|
325
337
|
new_api_call_builder
|
326
338
|
.request(new_request_builder(HttpMethodEnum::POST,
|
327
339
|
'/price_points/{price_point_id}/currency_prices.json',
|
328
|
-
Server::
|
340
|
+
Server::PRODUCTION)
|
329
341
|
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
330
342
|
.is_required(true)
|
331
343
|
.should_encode(true))
|
@@ -337,9 +349,10 @@ module AdvancedBilling
|
|
337
349
|
.response(new_response_handler
|
338
350
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
339
351
|
.deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
|
340
|
-
.
|
341
|
-
|
342
|
-
|
352
|
+
.local_error_template('422',
|
353
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
354
|
+
' Response: \'{$response.body}\'.',
|
355
|
+
ErrorArrayMapResponseException))
|
343
356
|
.execute
|
344
357
|
end
|
345
358
|
|
@@ -355,7 +368,7 @@ module AdvancedBilling
|
|
355
368
|
new_api_call_builder
|
356
369
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
357
370
|
'/price_points/{price_point_id}/currency_prices.json',
|
358
|
-
Server::
|
371
|
+
Server::PRODUCTION)
|
359
372
|
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
360
373
|
.is_required(true)
|
361
374
|
.should_encode(true))
|
@@ -367,9 +380,10 @@ module AdvancedBilling
|
|
367
380
|
.response(new_response_handler
|
368
381
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
369
382
|
.deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
|
370
|
-
.
|
371
|
-
|
372
|
-
|
383
|
+
.local_error_template('422',
|
384
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
385
|
+
' Response: \'{$response.body}\'.',
|
386
|
+
ErrorArrayMapResponseException))
|
373
387
|
.execute
|
374
388
|
end
|
375
389
|
|
@@ -398,7 +412,7 @@ module AdvancedBilling
|
|
398
412
|
new_api_call_builder
|
399
413
|
.request(new_request_builder(HttpMethodEnum::GET,
|
400
414
|
'/components_price_points.json',
|
401
|
-
Server::
|
415
|
+
Server::PRODUCTION)
|
402
416
|
.query_param(new_parameter(options['include'], key: 'include'))
|
403
417
|
.query_param(new_parameter(options['page'], key: 'page'))
|
404
418
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|