maxio-advanced-billing-sdk 1.0.0 → 2.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 +59 -297
- data/lib/advanced_billing/client.rb +21 -22
- data/lib/advanced_billing/configuration.rb +17 -18
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +8 -10
- data/lib/advanced_billing/controllers/api_exports_controller.rb +9 -9
- data/lib/advanced_billing/controllers/base_controller.rb +2 -1
- data/lib/advanced_billing/controllers/billing_portal_controller.rb +4 -4
- data/lib/advanced_billing/controllers/components_controller.rb +22 -22
- data/lib/advanced_billing/controllers/coupons_controller.rb +14 -14
- 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 +3 -3
- data/lib/advanced_billing/controllers/insights_controller.rb +4 -4
- data/lib/advanced_billing/controllers/invoices_controller.rb +24 -20
- data/lib/advanced_billing/controllers/offers_controller.rb +5 -5
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +12 -12
- data/lib/advanced_billing/controllers/product_families_controller.rb +4 -4
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +11 -11
- data/lib/advanced_billing/controllers/products_controller.rb +6 -6
- data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +44 -25
- data/lib/advanced_billing/controllers/reason_codes_controller.rb +5 -5
- data/lib/advanced_billing/controllers/referral_codes_controller.rb +2 -2
- 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 +37 -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 +23 -16
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +11 -7
- data/lib/advanced_billing/controllers/subscription_notes_controller.rb +5 -5
- data/lib/advanced_billing/controllers/subscription_products_controller.rb +2 -2
- data/lib/advanced_billing/controllers/subscription_status_controller.rb +10 -10
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +12 -12
- data/lib/advanced_billing/controllers/webhooks_controller.rb +8 -8
- data/lib/advanced_billing/exceptions/subscription_group_create_error_response_exception.rb +34 -0
- data/lib/advanced_billing/http/auth/basic_auth.rb +27 -6
- data/lib/advanced_billing/models/account_balance.rb +44 -3
- data/lib/advanced_billing/models/account_balances.rb +24 -2
- data/lib/advanced_billing/models/ach_agreement.rb +12 -2
- data/lib/advanced_billing/models/activate_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/add_coupons_request.rb +12 -2
- data/lib/advanced_billing/models/add_subscription_to_a_group.rb +12 -2
- data/lib/advanced_billing/models/address_change.rb +12 -2
- data/lib/advanced_billing/models/agreement_acceptance.rb +12 -2
- data/lib/advanced_billing/models/allocate_components.rb +12 -2
- data/lib/advanced_billing/models/allocation.rb +56 -2
- data/lib/advanced_billing/models/allocation_expiration_date.rb +23 -4
- data/lib/advanced_billing/models/allocation_preview.rb +33 -6
- data/lib/advanced_billing/models/allocation_preview_item.rb +12 -2
- data/lib/advanced_billing/models/allocation_preview_line_item.rb +12 -2
- data/lib/advanced_billing/models/allocation_preview_response.rb +12 -2
- data/lib/advanced_billing/models/allocation_response.rb +12 -2
- data/lib/advanced_billing/models/allocation_settings.rb +12 -2
- data/lib/advanced_billing/models/applied_credit_note_data.rb +12 -2
- data/lib/advanced_billing/models/apply_credit_note_event_data.rb +12 -2
- data/lib/advanced_billing/models/apply_debit_note_event_data.rb +12 -2
- data/lib/advanced_billing/models/apply_payment_event_data.rb +12 -2
- data/lib/advanced_billing/models/attribute_error.rb +12 -2
- data/lib/advanced_billing/models/auto_resume.rb +12 -2
- data/lib/advanced_billing/models/bank_account_attributes.rb +12 -2
- data/lib/advanced_billing/models/bank_account_payment_profile.rb +13 -2
- data/lib/advanced_billing/models/bank_account_response.rb +12 -2
- data/lib/advanced_billing/models/bank_account_verification.rb +12 -2
- data/lib/advanced_billing/models/bank_account_verification_request.rb +12 -2
- data/lib/advanced_billing/models/base_refund_error.rb +12 -2
- data/lib/advanced_billing/models/base_string_error.rb +12 -2
- data/lib/advanced_billing/models/batch_job.rb +33 -6
- data/lib/advanced_billing/models/batch_job_response.rb +12 -2
- data/lib/advanced_billing/models/billing_address.rb +12 -2
- data/lib/advanced_billing/models/billing_manifest.rb +33 -6
- data/lib/advanced_billing/models/billing_manifest_item.rb +12 -2
- data/lib/advanced_billing/models/billing_schedule.rb +12 -2
- data/lib/advanced_billing/models/breakouts.rb +12 -2
- data/lib/advanced_billing/models/{bulk_component_s_price_point_assignment.rb → bulk_components_price_point_assignment.rb} +16 -6
- data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +12 -2
- data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +12 -2
- data/lib/advanced_billing/models/bulk_create_segments.rb +12 -2
- data/lib/advanced_billing/models/bulk_update_segments.rb +12 -2
- data/lib/advanced_billing/models/bulk_update_segments_item.rb +12 -2
- data/lib/advanced_billing/models/calendar_billing.rb +12 -2
- data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +12 -2
- data/lib/advanced_billing/models/cancellation_options.rb +12 -2
- data/lib/advanced_billing/models/cancellation_request.rb +12 -2
- data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +12 -2
- data/lib/advanced_billing/models/chargify_ebb.rb +33 -6
- data/lib/advanced_billing/models/component.rb +22 -4
- data/lib/advanced_billing/models/component_allocation_change.rb +12 -2
- data/lib/advanced_billing/models/component_allocation_error_item.rb +12 -2
- data/lib/advanced_billing/models/component_cost_data.rb +12 -2
- data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +12 -2
- data/lib/advanced_billing/models/component_currency_price.rb +12 -2
- data/lib/advanced_billing/models/component_currency_prices_response.rb +12 -2
- data/lib/advanced_billing/models/component_custom_price.rb +12 -2
- data/lib/advanced_billing/models/component_price.rb +12 -2
- data/lib/advanced_billing/models/component_price_point.rb +12 -2
- data/lib/advanced_billing/models/{component_s_price_point_assignment.rb → component_price_point_assignment.rb} +17 -7
- data/lib/advanced_billing/models/component_price_point_error_item.rb +12 -2
- data/lib/advanced_billing/models/component_price_point_item.rb +12 -2
- data/lib/advanced_billing/models/component_price_point_response.rb +12 -2
- data/lib/advanced_billing/models/component_price_points_response.rb +12 -2
- data/lib/advanced_billing/models/component_response.rb +12 -2
- data/lib/advanced_billing/models/consolidated_invoice.rb +12 -2
- data/lib/advanced_billing/models/count_response.rb +12 -2
- data/lib/advanced_billing/models/coupon.rb +78 -12
- data/lib/advanced_billing/models/coupon_currency.rb +12 -2
- data/lib/advanced_billing/models/coupon_currency_request.rb +12 -2
- data/lib/advanced_billing/models/coupon_currency_response.rb +12 -2
- data/lib/advanced_billing/models/coupon_response.rb +12 -2
- data/lib/advanced_billing/models/coupon_restriction.rb +12 -2
- data/lib/advanced_billing/models/coupon_subcodes.rb +12 -2
- data/lib/advanced_billing/models/coupon_subcodes_response.rb +12 -2
- data/lib/advanced_billing/models/coupon_usage.rb +12 -2
- data/lib/advanced_billing/models/create_allocation.rb +12 -2
- data/lib/advanced_billing/models/create_allocation_request.rb +12 -2
- data/lib/advanced_billing/models/create_component_price_point.rb +12 -2
- data/lib/advanced_billing/models/create_component_price_point_request.rb +12 -2
- data/lib/advanced_billing/models/create_component_price_points_request.rb +12 -2
- data/lib/advanced_billing/models/create_currency_price.rb +12 -2
- data/lib/advanced_billing/models/create_currency_prices_request.rb +12 -2
- data/lib/advanced_billing/models/create_customer.rb +12 -2
- data/lib/advanced_billing/models/create_customer_request.rb +12 -2
- data/lib/advanced_billing/models/create_ebb_component.rb +12 -2
- data/lib/advanced_billing/models/create_invoice.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_address.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_coupon.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_item.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_payment.rb +23 -2
- data/lib/advanced_billing/models/create_invoice_payment_application.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_payment_request.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/create_metadata.rb +12 -2
- data/lib/advanced_billing/models/create_metadata_request.rb +12 -2
- data/lib/advanced_billing/models/create_metafield.rb +12 -2
- data/lib/advanced_billing/models/create_metafields_request.rb +12 -2
- data/lib/advanced_billing/models/create_metered_component.rb +12 -2
- data/lib/advanced_billing/models/create_multi_invoice_payment.rb +12 -2
- data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +12 -2
- data/lib/advanced_billing/models/create_offer.rb +12 -2
- data/lib/advanced_billing/models/create_offer_component.rb +12 -2
- data/lib/advanced_billing/models/create_offer_request.rb +12 -2
- data/lib/advanced_billing/models/create_on_off_component.rb +12 -2
- data/lib/advanced_billing/models/create_or_update_coupon.rb +12 -2
- data/lib/advanced_billing/models/{update_endpoint.rb → create_or_update_endpoint.rb} +14 -4
- data/lib/advanced_billing/models/{update_endpoint_request.rb → create_or_update_endpoint_request.rb} +15 -5
- data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +29 -2
- data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +29 -2
- data/lib/advanced_billing/models/create_or_update_product.rb +86 -4
- data/lib/advanced_billing/models/create_or_update_product_request.rb +12 -2
- data/lib/advanced_billing/models/create_or_update_segment_price.rb +12 -2
- data/lib/advanced_billing/models/create_payment.rb +14 -4
- data/lib/advanced_billing/models/create_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/create_payment_profile_request.rb +12 -2
- data/lib/advanced_billing/models/create_prepaid_component.rb +12 -2
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +12 -2
- data/lib/advanced_billing/models/create_prepayment.rb +13 -3
- data/lib/advanced_billing/models/create_prepayment_method.rb +44 -0
- data/lib/advanced_billing/models/create_prepayment_request.rb +12 -2
- data/lib/advanced_billing/models/create_prepayment_response.rb +12 -2
- data/lib/advanced_billing/models/create_product_currency_price.rb +12 -2
- data/lib/advanced_billing/models/create_product_currency_prices_request.rb +12 -2
- data/lib/advanced_billing/models/create_product_family.rb +12 -2
- data/lib/advanced_billing/models/create_product_family_request.rb +12 -2
- data/lib/advanced_billing/models/create_product_price_point.rb +16 -6
- data/lib/advanced_billing/models/create_product_price_point_request.rb +12 -2
- data/lib/advanced_billing/models/create_quantity_based_component.rb +12 -2
- data/lib/advanced_billing/models/create_reason_code.rb +12 -2
- data/lib/advanced_billing/models/create_reason_code_request.rb +12 -2
- data/lib/advanced_billing/models/create_segment.rb +12 -2
- data/lib/advanced_billing/models/create_segment_request.rb +12 -2
- data/lib/advanced_billing/models/create_signup_proforma_preview_include.rb +20 -0
- data/lib/advanced_billing/models/create_subscription.rb +22 -4
- data/lib/advanced_billing/models/create_subscription_component.rb +12 -2
- data/lib/advanced_billing/models/create_subscription_group.rb +15 -20
- data/lib/advanced_billing/models/create_subscription_group_request.rb +12 -2
- data/lib/advanced_billing/models/create_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/create_usage.rb +12 -2
- data/lib/advanced_billing/models/create_usage_request.rb +12 -2
- data/lib/advanced_billing/models/created_prepayment.rb +23 -4
- data/lib/advanced_billing/models/credit_account_balance_changed.rb +22 -5
- data/lib/advanced_billing/models/credit_card_attributes.rb +12 -2
- data/lib/advanced_billing/models/credit_card_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/credit_note.rb +12 -2
- data/lib/advanced_billing/models/credit_note1.rb +12 -2
- data/lib/advanced_billing/models/credit_note_application.rb +23 -5
- data/lib/advanced_billing/models/credit_note_line_item.rb +38 -4
- data/lib/advanced_billing/models/credit_scheme_request.rb +12 -2
- data/lib/advanced_billing/models/currency_price.rb +12 -2
- data/lib/advanced_billing/models/currency_prices_response.rb +12 -2
- data/lib/advanced_billing/models/custom_field_value_change.rb +12 -2
- data/lib/advanced_billing/models/customer.rb +63 -15
- data/lib/advanced_billing/models/customer1.rb +13 -2
- data/lib/advanced_billing/models/customer_attributes.rb +12 -2
- data/lib/advanced_billing/models/customer_change.rb +12 -2
- data/lib/advanced_billing/models/customer_changes_preview_response.rb +12 -2
- data/lib/advanced_billing/models/customer_custom_fields_change.rb +12 -2
- data/lib/advanced_billing/models/customer_error.rb +12 -2
- data/lib/advanced_billing/models/customer_payer_change.rb +12 -2
- data/lib/advanced_billing/models/customer_response.rb +12 -2
- data/lib/advanced_billing/models/deduct_service_credit.rb +12 -2
- data/lib/advanced_billing/models/deduct_service_credit_request.rb +12 -2
- data/lib/advanced_billing/models/delayed_cancellation_response.rb +12 -2
- data/lib/advanced_billing/models/delete_subscription_group_response.rb +12 -2
- data/lib/advanced_billing/models/dunner_data.rb +29 -7
- data/lib/advanced_billing/models/dunning_step_data.rb +12 -2
- data/lib/advanced_billing/models/dunning_step_reached.rb +12 -2
- data/lib/advanced_billing/models/ebb_component.rb +12 -2
- data/lib/advanced_billing/models/ebb_event.rb +12 -2
- data/lib/advanced_billing/models/enable_webhooks_request.rb +12 -2
- data/lib/advanced_billing/models/enable_webhooks_response.rb +12 -2
- data/lib/advanced_billing/models/endpoint.rb +12 -2
- data/lib/advanced_billing/models/endpoint_response.rb +12 -2
- data/lib/advanced_billing/models/errors.rb +12 -2
- data/lib/advanced_billing/models/event.rb +23 -5
- data/lib/advanced_billing/models/event_based_billing_segment_error.rb +12 -2
- data/lib/advanced_billing/models/event_response.rb +12 -2
- data/lib/advanced_billing/models/full_subscription_group_response.rb +369 -11
- data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/get_one_time_token_request.rb +12 -2
- data/lib/advanced_billing/models/group_billing.rb +12 -2
- data/lib/advanced_billing/models/group_settings.rb +12 -2
- data/lib/advanced_billing/models/group_target.rb +12 -2
- data/lib/advanced_billing/models/group_type.rb +23 -0
- data/lib/advanced_billing/models/invoice.rb +12 -2
- data/lib/advanced_billing/models/invoice_address.rb +12 -2
- data/lib/advanced_billing/models/invoice_balance_item.rb +12 -2
- data/lib/advanced_billing/models/invoice_credit.rb +12 -2
- data/lib/advanced_billing/models/invoice_custom_field.rb +12 -2
- data/lib/advanced_billing/models/invoice_customer.rb +13 -2
- data/lib/advanced_billing/models/invoice_discount.rb +14 -4
- data/lib/advanced_billing/models/invoice_discount_breakout.rb +12 -2
- data/lib/advanced_billing/models/invoice_discount_source_type.rb +26 -0
- data/lib/advanced_billing/models/invoice_discount_type.rb +26 -0
- data/lib/advanced_billing/models/invoice_display_settings.rb +12 -2
- data/lib/advanced_billing/models/invoice_event.rb +23 -4
- data/lib/advanced_billing/models/invoice_event_data.rb +12 -2
- data/lib/advanced_billing/models/invoice_event_payment.rb +12 -2
- data/lib/advanced_billing/models/invoice_event_payment1.rb +12 -2
- data/lib/advanced_billing/models/invoice_issued.rb +27 -15
- data/lib/advanced_billing/models/invoice_line_item.rb +22 -2
- data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +12 -2
- data/lib/advanced_billing/models/invoice_line_item_event_data.rb +12 -2
- data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +12 -2
- data/lib/advanced_billing/models/invoice_payer.rb +12 -2
- data/lib/advanced_billing/models/invoice_payer_change.rb +12 -2
- data/lib/advanced_billing/models/invoice_payment.rb +12 -2
- data/lib/advanced_billing/models/invoice_payment_application.rb +12 -2
- data/lib/advanced_billing/models/invoice_payment_method.rb +12 -2
- data/lib/advanced_billing/models/invoice_pre_payment.rb +25 -5
- data/lib/advanced_billing/models/invoice_previous_balance.rb +12 -2
- data/lib/advanced_billing/models/invoice_refund.rb +34 -2
- data/lib/advanced_billing/models/invoice_response.rb +12 -2
- data/lib/advanced_billing/models/invoice_seller.rb +12 -2
- data/lib/advanced_billing/models/invoice_tax.rb +13 -3
- data/lib/advanced_billing/models/invoice_tax_breakout.rb +23 -2
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +12 -2
- data/lib/advanced_billing/models/issue_advance_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +12 -2
- data/lib/advanced_billing/models/issue_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/issue_service_credit.rb +12 -2
- data/lib/advanced_billing/models/issue_service_credit_request.rb +12 -2
- data/lib/advanced_billing/models/item_price_point_changed.rb +12 -2
- data/lib/advanced_billing/models/item_price_point_data.rb +12 -2
- data/lib/advanced_billing/models/list_components_price_points_response.rb +12 -2
- data/lib/advanced_billing/models/list_credit_notes_response.rb +12 -2
- data/lib/advanced_billing/models/list_invoice_events_response.rb +12 -2
- data/lib/advanced_billing/models/list_invoices_response.rb +12 -2
- data/lib/advanced_billing/models/list_metafields_response.rb +12 -2
- data/lib/advanced_billing/models/list_mrr_response.rb +12 -2
- data/lib/advanced_billing/models/list_mrr_response_result.rb +12 -2
- data/lib/advanced_billing/models/list_offers_response.rb +12 -2
- data/lib/advanced_billing/models/list_product_price_points_response.rb +12 -2
- data/lib/advanced_billing/models/list_proforma_invoices_meta.rb +90 -0
- data/lib/advanced_billing/models/list_proforma_invoices_response.rb +79 -0
- data/lib/advanced_billing/models/list_public_keys_meta.rb +12 -2
- data/lib/advanced_billing/models/list_public_keys_response.rb +12 -2
- data/lib/advanced_billing/models/list_sale_rep_item.rb +12 -2
- data/lib/advanced_billing/models/list_segments_response.rb +12 -2
- data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +25 -12
- data/lib/advanced_billing/models/list_subscription_components_response.rb +12 -2
- data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +12 -2
- data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +12 -2
- data/lib/advanced_billing/models/list_subscription_groups_item.rb +33 -5
- data/lib/advanced_billing/models/list_subscription_groups_meta.rb +12 -2
- data/lib/advanced_billing/models/list_subscription_groups_response.rb +12 -2
- data/lib/advanced_billing/models/metadata.rb +23 -4
- data/lib/advanced_billing/models/metafield.rb +12 -2
- data/lib/advanced_billing/models/metafield_scope.rb +12 -2
- data/lib/advanced_billing/models/metered_component.rb +12 -2
- data/lib/advanced_billing/models/metered_usage.rb +12 -2
- data/lib/advanced_billing/models/movement.rb +23 -4
- data/lib/advanced_billing/models/movement_line_item.rb +12 -2
- data/lib/advanced_billing/models/mrr.rb +23 -4
- data/lib/advanced_billing/models/mrr_movement.rb +12 -2
- data/lib/advanced_billing/models/mrr_response.rb +12 -2
- data/lib/advanced_billing/models/multi_invoice_payment.rb +12 -2
- data/lib/advanced_billing/models/multi_invoice_payment_response.rb +12 -2
- data/lib/advanced_billing/models/nested_subscription_group.rb +12 -2
- data/lib/advanced_billing/models/net_terms.rb +12 -2
- data/lib/advanced_billing/models/offer.rb +43 -8
- data/lib/advanced_billing/models/offer_discount.rb +12 -2
- data/lib/advanced_billing/models/offer_item.rb +12 -2
- data/lib/advanced_billing/models/offer_response.rb +12 -2
- data/lib/advanced_billing/models/offer_signup_page.rb +12 -2
- data/lib/advanced_billing/models/on_off_component.rb +12 -2
- data/lib/advanced_billing/models/organization_address.rb +12 -2
- data/lib/advanced_billing/models/origin_invoice.rb +12 -2
- data/lib/advanced_billing/models/overage_pricing.rb +12 -2
- data/lib/advanced_billing/models/override_subscription.rb +12 -2
- data/lib/advanced_billing/models/override_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/paginated_metadata.rb +12 -2
- data/lib/advanced_billing/models/{payment.rb → paid_invoice.rb} +23 -13
- data/lib/advanced_billing/models/pause_request.rb +12 -2
- data/lib/advanced_billing/models/payer_attributes.rb +13 -3
- data/lib/advanced_billing/models/payer_error.rb +12 -2
- data/lib/advanced_billing/models/payment_collection_method_changed.rb +12 -2
- data/lib/advanced_billing/models/payment_for_allocation.rb +12 -2
- data/lib/advanced_billing/models/payment_method_apple_pay.rb +12 -2
- data/lib/advanced_billing/models/payment_method_bank_account.rb +12 -2
- data/lib/advanced_billing/models/payment_method_credit_card.rb +12 -2
- data/lib/advanced_billing/models/payment_method_external.rb +12 -2
- data/lib/advanced_billing/models/payment_method_paypal.rb +12 -2
- data/lib/advanced_billing/models/payment_profile_attributes.rb +12 -2
- data/lib/advanced_billing/models/payment_profile_response.rb +12 -2
- data/lib/advanced_billing/models/payment_related_events.rb +12 -2
- data/lib/advanced_billing/models/pending_cancellation_change.rb +22 -5
- data/lib/advanced_billing/models/portal_management_link.rb +53 -12
- data/lib/advanced_billing/models/prepaid_component_price_point.rb +12 -2
- data/lib/advanced_billing/models/prepaid_configuration.rb +12 -2
- data/lib/advanced_billing/models/prepaid_configuration_response.rb +12 -2
- data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +12 -2
- data/lib/advanced_billing/models/prepaid_usage.rb +12 -2
- data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +12 -2
- data/lib/advanced_billing/models/prepaid_usage_component.rb +12 -2
- data/lib/advanced_billing/models/prepayment.rb +21 -4
- data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +12 -2
- data/lib/advanced_billing/models/prepayment_aggregated_error.rb +12 -2
- data/lib/advanced_billing/models/prepayment_method.rb +3 -6
- data/lib/advanced_billing/models/prepayment_response.rb +12 -2
- data/lib/advanced_billing/models/prepayments_response.rb +12 -2
- data/lib/advanced_billing/models/preview_allocations_request.rb +12 -2
- data/lib/advanced_billing/models/price.rb +12 -2
- data/lib/advanced_billing/models/price_point.rb +12 -2
- data/lib/advanced_billing/models/product.rb +14 -4
- data/lib/advanced_billing/models/product_family.rb +33 -6
- data/lib/advanced_billing/models/product_family_response.rb +12 -2
- data/lib/advanced_billing/models/product_price_point.rb +16 -6
- data/lib/advanced_billing/models/product_price_point_errors.rb +12 -2
- data/lib/advanced_billing/models/product_price_point_response.rb +12 -2
- data/lib/advanced_billing/models/product_response.rb +12 -2
- data/lib/advanced_billing/models/proforma_error.rb +12 -2
- data/lib/advanced_billing/models/proforma_invoice.rb +87 -19
- data/lib/advanced_billing/models/proforma_invoice_credit.rb +12 -2
- data/lib/advanced_billing/models/proforma_invoice_discount.rb +37 -7
- data/lib/advanced_billing/models/proforma_invoice_discount_source_type.rb +23 -0
- data/lib/advanced_billing/models/proforma_invoice_issued.rb +23 -6
- data/lib/advanced_billing/models/proforma_invoice_payment.rb +12 -2
- data/lib/advanced_billing/models/proforma_invoice_role.rb +30 -0
- data/lib/advanced_billing/models/proforma_invoice_status.rb +26 -0
- data/lib/advanced_billing/models/proforma_invoice_tax.rb +15 -5
- data/lib/advanced_billing/models/proforma_invoice_tax_source_type.rb +23 -0
- data/lib/advanced_billing/models/proration.rb +12 -2
- data/lib/advanced_billing/models/public_key.rb +23 -4
- data/lib/advanced_billing/models/public_signup_page.rb +12 -2
- data/lib/advanced_billing/models/quantity_based_component.rb +12 -2
- data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +12 -2
- data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +23 -5
- data/lib/advanced_billing/models/reactivate_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/reactivation_billing.rb +12 -2
- data/lib/advanced_billing/models/reason_code.rb +33 -6
- data/lib/advanced_billing/models/reason_code_response.rb +12 -2
- data/lib/advanced_billing/models/reason_codes_json_response.rb +12 -2
- data/lib/advanced_billing/models/record_payment_request.rb +12 -2
- data/lib/advanced_billing/models/{payment_response.rb → record_payment_response.rb} +33 -9
- data/lib/advanced_billing/models/referral_code.rb +12 -2
- data/lib/advanced_billing/models/referral_validation_response.rb +12 -2
- data/lib/advanced_billing/models/refund.rb +12 -2
- data/lib/advanced_billing/models/refund_consolidated_invoice.rb +12 -2
- data/lib/advanced_billing/models/refund_invoice.rb +12 -2
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +12 -2
- data/lib/advanced_billing/models/refund_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/refund_prepayment.rb +12 -2
- data/lib/advanced_billing/models/refund_prepayment_aggregated_error.rb +12 -2
- data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +12 -2
- data/lib/advanced_billing/models/refund_prepayment_request.rb +12 -2
- data/lib/advanced_billing/models/refund_success.rb +12 -2
- data/lib/advanced_billing/models/remove_payment_event_data.rb +12 -2
- data/lib/advanced_billing/models/renewal_preview.rb +23 -5
- data/lib/advanced_billing/models/renewal_preview_component.rb +12 -2
- data/lib/advanced_billing/models/renewal_preview_line_item.rb +12 -2
- data/lib/advanced_billing/models/renewal_preview_request.rb +12 -2
- data/lib/advanced_billing/models/renewal_preview_response.rb +12 -2
- data/lib/advanced_billing/models/replay_webhooks_request.rb +12 -2
- data/lib/advanced_billing/models/replay_webhooks_response.rb +12 -2
- data/lib/advanced_billing/models/resent_invitation.rb +12 -2
- data/lib/advanced_billing/models/resume_options.rb +12 -2
- data/lib/advanced_billing/models/revoked_invitation.rb +12 -2
- data/lib/advanced_billing/models/sale_rep.rb +12 -2
- data/lib/advanced_billing/models/sale_rep_item_mrr.rb +12 -2
- data/lib/advanced_billing/models/sale_rep_settings.rb +12 -2
- data/lib/advanced_billing/models/sale_rep_subscription.rb +12 -2
- data/lib/advanced_billing/models/segment.rb +33 -6
- data/lib/advanced_billing/models/segment_price.rb +12 -2
- data/lib/advanced_billing/models/segment_response.rb +12 -2
- data/lib/advanced_billing/models/seller.rb +12 -2
- data/lib/advanced_billing/models/send_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/service_credit.rb +12 -2
- data/lib/advanced_billing/models/service_credit_response.rb +12 -2
- data/lib/advanced_billing/models/shipping_address.rb +12 -2
- data/lib/advanced_billing/models/signup_proforma_preview.rb +12 -2
- data/lib/advanced_billing/models/signup_proforma_preview_response.rb +12 -2
- data/lib/advanced_billing/models/site.rb +12 -2
- data/lib/advanced_billing/models/site_response.rb +12 -2
- data/lib/advanced_billing/models/site_statistics.rb +16 -6
- data/lib/advanced_billing/models/site_summary.rb +12 -2
- data/lib/advanced_billing/models/subscription.rb +12 -2
- data/lib/advanced_billing/models/subscription_component.rb +22 -4
- data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +12 -2
- data/lib/advanced_billing/models/subscription_component_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_component_subscription.rb +23 -4
- data/lib/advanced_billing/models/subscription_custom_price.rb +12 -2
- data/lib/advanced_billing/models/subscription_group.rb +38 -10
- data/lib/advanced_billing/models/subscription_group_balances.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_credit_card.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_customer.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_include.rb +20 -0
- data/lib/advanced_billing/models/subscription_group_item.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_member_error.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_members_array_error.rb +72 -0
- data/lib/advanced_billing/models/subscription_group_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_prepayment.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_component.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_error.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_failure.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_item.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_request.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +231 -9
- data/lib/advanced_billing/models/subscription_group_signup_success.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +21 -5
- data/lib/advanced_billing/models/subscription_group_single_error.rb +73 -0
- data/lib/advanced_billing/models/subscription_group_subscription_error.rb +66 -2
- data/lib/advanced_billing/models/subscription_group_update_error.rb +12 -2
- data/lib/advanced_billing/models/subscription_groups_list_include.rb +20 -0
- data/lib/advanced_billing/models/subscription_included_coupon.rb +12 -2
- data/lib/advanced_billing/models/subscription_migration_preview.rb +12 -2
- data/lib/advanced_billing/models/subscription_migration_preview_options.rb +23 -5
- data/lib/advanced_billing/models/subscription_migration_preview_request.rb +12 -2
- data/lib/advanced_billing/models/subscription_migration_preview_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_mrr.rb +12 -2
- data/lib/advanced_billing/models/subscription_mrr_breakout.rb +12 -2
- data/lib/advanced_billing/models/subscription_mrr_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_note.rb +33 -6
- data/lib/advanced_billing/models/subscription_note_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_preview.rb +12 -2
- data/lib/advanced_billing/models/subscription_preview_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_product_change.rb +12 -2
- data/lib/advanced_billing/models/subscription_product_migration.rb +12 -2
- data/lib/advanced_billing/models/subscription_product_migration_request.rb +12 -2
- data/lib/advanced_billing/models/subscription_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_state_change.rb +12 -2
- data/lib/advanced_billing/models/tax_configuration.rb +12 -2
- data/lib/advanced_billing/models/too_many_management_link_requests.rb +12 -2
- data/lib/advanced_billing/models/update_allocation_expiration_date.rb +12 -2
- data/lib/advanced_billing/models/update_component.rb +12 -2
- data/lib/advanced_billing/models/update_component_price_point.rb +12 -2
- data/lib/advanced_billing/models/update_component_price_point_request.rb +12 -2
- data/lib/advanced_billing/models/update_component_request.rb +12 -2
- data/lib/advanced_billing/models/update_coupon_currency.rb +12 -2
- data/lib/advanced_billing/models/update_currency_price.rb +12 -2
- data/lib/advanced_billing/models/update_currency_prices_request.rb +12 -2
- data/lib/advanced_billing/models/update_customer.rb +12 -2
- data/lib/advanced_billing/models/update_customer_request.rb +12 -2
- data/lib/advanced_billing/models/update_metadata.rb +12 -2
- data/lib/advanced_billing/models/update_metadata_request.rb +12 -2
- data/lib/advanced_billing/models/update_metafield.rb +12 -2
- data/lib/advanced_billing/models/update_metafields_request.rb +12 -2
- data/lib/advanced_billing/models/update_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/update_payment_profile_request.rb +12 -2
- data/lib/advanced_billing/models/update_price.rb +12 -2
- data/lib/advanced_billing/models/update_product_price_point.rb +12 -2
- data/lib/advanced_billing/models/update_product_price_point_request.rb +12 -2
- data/lib/advanced_billing/models/update_reason_code.rb +12 -2
- data/lib/advanced_billing/models/update_reason_code_request.rb +12 -2
- data/lib/advanced_billing/models/update_segment.rb +12 -2
- data/lib/advanced_billing/models/update_segment_request.rb +12 -2
- data/lib/advanced_billing/models/update_subscription.rb +23 -5
- data/lib/advanced_billing/models/update_subscription_component.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_group.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_group_request.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_note.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_note_request.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +12 -2
- data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +12 -2
- data/lib/advanced_billing/models/usage.rb +12 -2
- data/lib/advanced_billing/models/usage_response.rb +12 -2
- data/lib/advanced_billing/models/void_invoice.rb +12 -2
- data/lib/advanced_billing/models/void_invoice_event_data.rb +12 -2
- data/lib/advanced_billing/models/void_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/void_remainder_event_data.rb +12 -2
- data/lib/advanced_billing/models/webhook.rb +53 -10
- data/lib/advanced_billing/models/webhook_response.rb +12 -2
- data/lib/advanced_billing/utilities/union_type_lookup.rb +20 -8
- data/lib/advanced_billing.rb +25 -12
- metadata +24 -11
- data/lib/advanced_billing/models/proforma_invoice_discount_breakout.rb +0 -62
- data/lib/advanced_billing/models/proforma_invoice_preview.rb +0 -484
- data/lib/advanced_billing/models/proforma_invoice_tax_breakout.rb +0 -61
@@ -29,7 +29,7 @@ module AdvancedBilling
|
|
29
29
|
.body_param(new_parameter(body))
|
30
30
|
.header_param(new_parameter('application/json', key: 'accept'))
|
31
31
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
32
|
-
.auth(Single.new('
|
32
|
+
.auth(Single.new('BasicAuth')))
|
33
33
|
.response(new_response_handler
|
34
34
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
35
35
|
.deserialize_into(SubscriptionGroupSignupResponse.method(:from_hash))
|
@@ -53,14 +53,14 @@ module AdvancedBilling
|
|
53
53
|
.body_param(new_parameter(body))
|
54
54
|
.header_param(new_parameter('application/json', key: 'accept'))
|
55
55
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
56
|
-
.auth(Single.new('
|
56
|
+
.auth(Single.new('BasicAuth')))
|
57
57
|
.response(new_response_handler
|
58
58
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
59
59
|
.deserialize_into(SubscriptionGroupResponse.method(:from_hash))
|
60
60
|
.local_error_template('422',
|
61
61
|
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
62
62
|
' Response: \'{$response.body}\'.',
|
63
|
-
|
63
|
+
SubscriptionGroupCreateErrorResponseException))
|
64
64
|
.execute
|
65
65
|
end
|
66
66
|
|
@@ -81,10 +81,10 @@ module AdvancedBilling
|
|
81
81
|
# many records to fetch in each request. Default value is 20. The maximum
|
82
82
|
# allowed values is 200; any per_page value over 200 will be changed to 200.
|
83
83
|
# Use in query `per_page=200`.
|
84
|
-
# @param [
|
85
|
-
# information to include in the response. The following
|
86
|
-
# supported: - `account_balances`: Account balance information
|
87
|
-
# subscription groups. Use in query: `include[]=account_balances`
|
84
|
+
# @param [Array[SubscriptionGroupsListInclude]] include Optional parameter:
|
85
|
+
# A list of additional information to include in the response. The following
|
86
|
+
# values are supported: - `account_balances`: Account balance information
|
87
|
+
# for the subscription groups. Use in query: `include[]=account_balances`
|
88
88
|
# @return [ListSubscriptionGroupsResponse] response from the API call
|
89
89
|
def list_subscription_groups(options = {})
|
90
90
|
new_api_call_builder
|
@@ -93,9 +93,10 @@ module AdvancedBilling
|
|
93
93
|
Server::DEFAULT)
|
94
94
|
.query_param(new_parameter(options['page'], key: 'page'))
|
95
95
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
96
|
-
.query_param(new_parameter(options['include'], key: 'include'))
|
96
|
+
.query_param(new_parameter(options['include'], key: 'include[]'))
|
97
97
|
.header_param(new_parameter('application/json', key: 'accept'))
|
98
|
-
.auth(Single.new('
|
98
|
+
.auth(Single.new('BasicAuth'))
|
99
|
+
.array_serialization_format(ArraySerializationFormat::CSV))
|
99
100
|
.response(new_response_handler
|
100
101
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
101
102
|
.deserialize_into(ListSubscriptionGroupsResponse.method(:from_hash)))
|
@@ -110,8 +111,12 @@ module AdvancedBilling
|
|
110
111
|
# with the request.
|
111
112
|
# @param [String] uid Required parameter: The uid of the subscription
|
112
113
|
# group
|
114
|
+
# @param [Array[SubscriptionGroupInclude]] include Optional parameter:
|
115
|
+
# Allows including additional data in the response. Use in query:
|
116
|
+
# `include[]=current_billing_amount_in_cents`.
|
113
117
|
# @return [FullSubscriptionGroupResponse] response from the API call
|
114
|
-
def read_subscription_group(uid
|
118
|
+
def read_subscription_group(uid,
|
119
|
+
include: nil)
|
115
120
|
new_api_call_builder
|
116
121
|
.request(new_request_builder(HttpMethodEnum::GET,
|
117
122
|
'/subscription_groups/{uid}.json',
|
@@ -119,8 +124,10 @@ module AdvancedBilling
|
|
119
124
|
.template_param(new_parameter(uid, key: 'uid')
|
120
125
|
.is_required(true)
|
121
126
|
.should_encode(true))
|
127
|
+
.query_param(new_parameter(include, key: 'include[]'))
|
122
128
|
.header_param(new_parameter('application/json', key: 'accept'))
|
123
|
-
.auth(Single.new('
|
129
|
+
.auth(Single.new('BasicAuth'))
|
130
|
+
.array_serialization_format(ArraySerializationFormat::CSV))
|
124
131
|
.response(new_response_handler
|
125
132
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
126
133
|
.deserialize_into(FullSubscriptionGroupResponse.method(:from_hash)))
|
@@ -150,7 +157,7 @@ module AdvancedBilling
|
|
150
157
|
.body_param(new_parameter(body))
|
151
158
|
.header_param(new_parameter('application/json', key: 'accept'))
|
152
159
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
153
|
-
.auth(Single.new('
|
160
|
+
.auth(Single.new('BasicAuth')))
|
154
161
|
.response(new_response_handler
|
155
162
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
156
163
|
.deserialize_into(SubscriptionGroupResponse.method(:from_hash))
|
@@ -175,7 +182,7 @@ module AdvancedBilling
|
|
175
182
|
.is_required(true)
|
176
183
|
.should_encode(true))
|
177
184
|
.header_param(new_parameter('application/json', key: 'accept'))
|
178
|
-
.auth(Single.new('
|
185
|
+
.auth(Single.new('BasicAuth')))
|
179
186
|
.response(new_response_handler
|
180
187
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
181
188
|
.deserialize_into(DeleteSubscriptionGroupResponse.method(:from_hash))
|
@@ -198,7 +205,7 @@ module AdvancedBilling
|
|
198
205
|
.query_param(new_parameter(subscription_id, key: 'subscription_id')
|
199
206
|
.is_required(true))
|
200
207
|
.header_param(new_parameter('application/json', key: 'accept'))
|
201
|
-
.auth(Single.new('
|
208
|
+
.auth(Single.new('BasicAuth')))
|
202
209
|
.response(new_response_handler
|
203
210
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
204
211
|
.deserialize_into(FullSubscriptionGroupResponse.method(:from_hash))
|
@@ -255,7 +262,7 @@ module AdvancedBilling
|
|
255
262
|
.body_param(new_parameter(body))
|
256
263
|
.header_param(new_parameter('application/json', key: 'accept'))
|
257
264
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
258
|
-
.auth(Single.new('
|
265
|
+
.auth(Single.new('BasicAuth')))
|
259
266
|
.response(new_response_handler
|
260
267
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
261
268
|
.deserialize_into(SubscriptionGroupResponse.method(:from_hash)))
|
@@ -279,7 +286,7 @@ module AdvancedBilling
|
|
279
286
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
280
287
|
.is_required(true)
|
281
288
|
.should_encode(true))
|
282
|
-
.auth(Single.new('
|
289
|
+
.auth(Single.new('BasicAuth')))
|
283
290
|
.response(new_response_handler
|
284
291
|
.is_response_void(true)
|
285
292
|
.local_error_template('404',
|
@@ -21,7 +21,7 @@ module AdvancedBilling
|
|
21
21
|
.is_required(true)
|
22
22
|
.should_encode(true))
|
23
23
|
.header_param(new_parameter('application/json', key: 'accept'))
|
24
|
-
.auth(Single.new('
|
24
|
+
.auth(Single.new('BasicAuth')))
|
25
25
|
.response(new_response_handler
|
26
26
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
27
27
|
.deserialize_into(AccountBalances.method(:from_hash)))
|
@@ -53,10 +53,14 @@ module AdvancedBilling
|
|
53
53
|
.body_param(new_parameter(body))
|
54
54
|
.header_param(new_parameter('application/json', key: 'accept'))
|
55
55
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
56
|
-
.auth(Single.new('
|
56
|
+
.auth(Single.new('BasicAuth')))
|
57
57
|
.response(new_response_handler
|
58
58
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
59
|
-
.deserialize_into(CreatePrepaymentResponse.method(:from_hash))
|
59
|
+
.deserialize_into(CreatePrepaymentResponse.method(:from_hash))
|
60
|
+
.local_error_template('422',
|
61
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
62
|
+
' Response: \'{$response.body}\'.',
|
63
|
+
APIException))
|
60
64
|
.execute
|
61
65
|
end
|
62
66
|
|
@@ -101,7 +105,7 @@ module AdvancedBilling
|
|
101
105
|
.query_param(new_parameter(options['filter_start_date'], key: 'filter[start_date]'))
|
102
106
|
.query_param(new_parameter(options['filter_end_date'], key: 'filter[end_date]'))
|
103
107
|
.header_param(new_parameter('application/json', key: 'accept'))
|
104
|
-
.auth(Single.new('
|
108
|
+
.auth(Single.new('BasicAuth')))
|
105
109
|
.response(new_response_handler
|
106
110
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
107
111
|
.deserialize_into(PrepaymentsResponse.method(:from_hash))
|
@@ -131,7 +135,7 @@ module AdvancedBilling
|
|
131
135
|
.body_param(new_parameter(body))
|
132
136
|
.header_param(new_parameter('application/json', key: 'accept'))
|
133
137
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
134
|
-
.auth(Single.new('
|
138
|
+
.auth(Single.new('BasicAuth')))
|
135
139
|
.response(new_response_handler
|
136
140
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
137
141
|
.deserialize_into(ServiceCredit.method(:from_hash)))
|
@@ -157,7 +161,7 @@ module AdvancedBilling
|
|
157
161
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
158
162
|
.body_param(new_parameter(body))
|
159
163
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
160
|
-
.auth(Single.new('
|
164
|
+
.auth(Single.new('BasicAuth')))
|
161
165
|
.response(new_response_handler
|
162
166
|
.is_response_void(true)
|
163
167
|
.local_error_template('422',
|
@@ -195,7 +199,7 @@ module AdvancedBilling
|
|
195
199
|
.body_param(new_parameter(body))
|
196
200
|
.header_param(new_parameter('application/json', key: 'accept'))
|
197
201
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
198
|
-
.auth(Single.new('
|
202
|
+
.auth(Single.new('BasicAuth')))
|
199
203
|
.response(new_response_handler
|
200
204
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
201
205
|
.deserialize_into(PrepaymentResponse.method(:from_hash))
|
@@ -32,7 +32,7 @@ module AdvancedBilling
|
|
32
32
|
.body_param(new_parameter(body))
|
33
33
|
.header_param(new_parameter('application/json', key: 'accept'))
|
34
34
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
35
|
-
.auth(Single.new('
|
35
|
+
.auth(Single.new('BasicAuth')))
|
36
36
|
.response(new_response_handler
|
37
37
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
38
38
|
.deserialize_into(SubscriptionNoteResponse.method(:from_hash)))
|
@@ -66,7 +66,7 @@ module AdvancedBilling
|
|
66
66
|
.query_param(new_parameter(options['page'], key: 'page'))
|
67
67
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
68
68
|
.header_param(new_parameter('application/json', key: 'accept'))
|
69
|
-
.auth(Single.new('
|
69
|
+
.auth(Single.new('BasicAuth')))
|
70
70
|
.response(new_response_handler
|
71
71
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
72
72
|
.deserialize_into(SubscriptionNoteResponse.method(:from_hash))
|
@@ -93,7 +93,7 @@ module AdvancedBilling
|
|
93
93
|
.is_required(true)
|
94
94
|
.should_encode(true))
|
95
95
|
.header_param(new_parameter('application/json', key: 'accept'))
|
96
|
-
.auth(Single.new('
|
96
|
+
.auth(Single.new('BasicAuth')))
|
97
97
|
.response(new_response_handler
|
98
98
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
99
99
|
.deserialize_into(SubscriptionNoteResponse.method(:from_hash)))
|
@@ -123,7 +123,7 @@ module AdvancedBilling
|
|
123
123
|
.body_param(new_parameter(body))
|
124
124
|
.header_param(new_parameter('application/json', key: 'accept'))
|
125
125
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
126
|
-
.auth(Single.new('
|
126
|
+
.auth(Single.new('BasicAuth')))
|
127
127
|
.response(new_response_handler
|
128
128
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
129
129
|
.deserialize_into(SubscriptionNoteResponse.method(:from_hash)))
|
@@ -147,7 +147,7 @@ module AdvancedBilling
|
|
147
147
|
.template_param(new_parameter(note_id, key: 'note_id')
|
148
148
|
.is_required(true)
|
149
149
|
.should_encode(true))
|
150
|
-
.auth(Single.new('
|
150
|
+
.auth(Single.new('BasicAuth')))
|
151
151
|
.response(new_response_handler
|
152
152
|
.is_response_void(true))
|
153
153
|
.execute
|
@@ -115,7 +115,7 @@ module AdvancedBilling
|
|
115
115
|
.body_param(new_parameter(body))
|
116
116
|
.header_param(new_parameter('application/json', key: 'accept'))
|
117
117
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
118
|
-
.auth(Single.new('
|
118
|
+
.auth(Single.new('BasicAuth')))
|
119
119
|
.response(new_response_handler
|
120
120
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
121
121
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -152,7 +152,7 @@ module AdvancedBilling
|
|
152
152
|
.body_param(new_parameter(body))
|
153
153
|
.header_param(new_parameter('application/json', key: 'accept'))
|
154
154
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
155
|
-
.auth(Single.new('
|
155
|
+
.auth(Single.new('BasicAuth')))
|
156
156
|
.response(new_response_handler
|
157
157
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
158
158
|
.deserialize_into(SubscriptionMigrationPreviewResponse.method(:from_hash))
|
@@ -24,7 +24,7 @@ module AdvancedBilling
|
|
24
24
|
.is_required(true)
|
25
25
|
.should_encode(true))
|
26
26
|
.header_param(new_parameter('application/json', key: 'accept'))
|
27
|
-
.auth(Single.new('
|
27
|
+
.auth(Single.new('BasicAuth')))
|
28
28
|
.response(new_response_handler
|
29
29
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
30
30
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -54,7 +54,7 @@ module AdvancedBilling
|
|
54
54
|
.body_param(new_parameter(body))
|
55
55
|
.header_param(new_parameter('application/json', key: 'accept'))
|
56
56
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
57
|
-
.auth(Single.new('
|
57
|
+
.auth(Single.new('BasicAuth')))
|
58
58
|
.response(new_response_handler
|
59
59
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
60
60
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -89,7 +89,7 @@ module AdvancedBilling
|
|
89
89
|
.should_encode(true))
|
90
90
|
.query_param(new_parameter(calendar_billing_resumption_charge, key: 'calendar_billing[\'resumption_charge\']'))
|
91
91
|
.header_param(new_parameter('application/json', key: 'accept'))
|
92
|
-
.auth(Single.new('
|
92
|
+
.auth(Single.new('BasicAuth')))
|
93
93
|
.response(new_response_handler
|
94
94
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
95
95
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -122,7 +122,7 @@ module AdvancedBilling
|
|
122
122
|
.body_param(new_parameter(body))
|
123
123
|
.header_param(new_parameter('application/json', key: 'accept'))
|
124
124
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
125
|
-
.auth(Single.new('
|
125
|
+
.auth(Single.new('BasicAuth')))
|
126
126
|
.response(new_response_handler
|
127
127
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
128
128
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -157,7 +157,7 @@ module AdvancedBilling
|
|
157
157
|
.body_param(new_parameter(body))
|
158
158
|
.header_param(new_parameter('application/json', key: 'accept'))
|
159
159
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
160
|
-
.auth(Single.new('
|
160
|
+
.auth(Single.new('BasicAuth')))
|
161
161
|
.response(new_response_handler
|
162
162
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
163
163
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -323,7 +323,7 @@ module AdvancedBilling
|
|
323
323
|
.body_param(new_parameter(body))
|
324
324
|
.header_param(new_parameter('application/json', key: 'accept'))
|
325
325
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
326
|
-
.auth(Single.new('
|
326
|
+
.auth(Single.new('BasicAuth')))
|
327
327
|
.response(new_response_handler
|
328
328
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
329
329
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -357,7 +357,7 @@ module AdvancedBilling
|
|
357
357
|
.body_param(new_parameter(body))
|
358
358
|
.header_param(new_parameter('application/json', key: 'accept'))
|
359
359
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
360
|
-
.auth(Single.new('
|
360
|
+
.auth(Single.new('BasicAuth')))
|
361
361
|
.response(new_response_handler
|
362
362
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
363
363
|
.deserialize_into(DelayedCancellationResponse.method(:from_hash))
|
@@ -385,7 +385,7 @@ module AdvancedBilling
|
|
385
385
|
.is_required(true)
|
386
386
|
.should_encode(true))
|
387
387
|
.header_param(new_parameter('application/json', key: 'accept'))
|
388
|
-
.auth(Single.new('
|
388
|
+
.auth(Single.new('BasicAuth')))
|
389
389
|
.response(new_response_handler
|
390
390
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
391
391
|
.deserialize_into(DelayedCancellationResponse.method(:from_hash))
|
@@ -409,7 +409,7 @@ module AdvancedBilling
|
|
409
409
|
.is_required(true)
|
410
410
|
.should_encode(true))
|
411
411
|
.header_param(new_parameter('application/json', key: 'accept'))
|
412
|
-
.auth(Single.new('
|
412
|
+
.auth(Single.new('BasicAuth')))
|
413
413
|
.response(new_response_handler
|
414
414
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
415
415
|
.deserialize_into(SubscriptionResponse.method(:from_hash)))
|
@@ -465,7 +465,7 @@ module AdvancedBilling
|
|
465
465
|
.body_param(new_parameter(body))
|
466
466
|
.header_param(new_parameter('application/json', key: 'accept'))
|
467
467
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
468
|
-
.auth(Single.new('
|
468
|
+
.auth(Single.new('BasicAuth')))
|
469
469
|
.response(new_response_handler
|
470
470
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
471
471
|
.deserialize_into(RenewalPreviewResponse.method(:from_hash))
|
@@ -767,7 +767,7 @@ module AdvancedBilling
|
|
767
767
|
.body_param(new_parameter(body))
|
768
768
|
.header_param(new_parameter('application/json', key: 'accept'))
|
769
769
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
770
|
-
.auth(Single.new('
|
770
|
+
.auth(Single.new('BasicAuth')))
|
771
771
|
.response(new_response_handler
|
772
772
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
773
773
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -865,7 +865,7 @@ module AdvancedBilling
|
|
865
865
|
.query_param(new_parameter(options['sort'], key: 'sort'))
|
866
866
|
.query_param(new_parameter(options['include'], key: 'include[]'))
|
867
867
|
.header_param(new_parameter('application/json', key: 'accept'))
|
868
|
-
.auth(Single.new('
|
868
|
+
.auth(Single.new('BasicAuth'))
|
869
869
|
.array_serialization_format(ArraySerializationFormat::CSV))
|
870
870
|
.response(new_response_handler
|
871
871
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
@@ -953,7 +953,7 @@ module AdvancedBilling
|
|
953
953
|
.body_param(new_parameter(body))
|
954
954
|
.header_param(new_parameter('application/json', key: 'accept'))
|
955
955
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
956
|
-
.auth(Single.new('
|
956
|
+
.auth(Single.new('BasicAuth')))
|
957
957
|
.response(new_response_handler
|
958
958
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
959
959
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -986,7 +986,7 @@ module AdvancedBilling
|
|
986
986
|
.should_encode(true))
|
987
987
|
.query_param(new_parameter(include, key: 'include[]'))
|
988
988
|
.header_param(new_parameter('application/json', key: 'accept'))
|
989
|
-
.auth(Single.new('
|
989
|
+
.auth(Single.new('BasicAuth'))
|
990
990
|
.array_serialization_format(ArraySerializationFormat::PLAIN))
|
991
991
|
.response(new_response_handler
|
992
992
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
@@ -1043,7 +1043,7 @@ module AdvancedBilling
|
|
1043
1043
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
1044
1044
|
.body_param(new_parameter(body))
|
1045
1045
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
1046
|
-
.auth(Single.new('
|
1046
|
+
.auth(Single.new('BasicAuth')))
|
1047
1047
|
.response(new_response_handler
|
1048
1048
|
.is_response_void(true)
|
1049
1049
|
.local_error_template('422',
|
@@ -1063,7 +1063,7 @@ module AdvancedBilling
|
|
1063
1063
|
Server::DEFAULT)
|
1064
1064
|
.query_param(new_parameter(reference, key: 'reference'))
|
1065
1065
|
.header_param(new_parameter('application/json', key: 'accept'))
|
1066
|
-
.auth(Single.new('
|
1066
|
+
.auth(Single.new('BasicAuth')))
|
1067
1067
|
.response(new_response_handler
|
1068
1068
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
1069
1069
|
.deserialize_into(SubscriptionResponse.method(:from_hash)))
|
@@ -1101,7 +1101,7 @@ module AdvancedBilling
|
|
1101
1101
|
.query_param(new_parameter(ack, key: 'ack')
|
1102
1102
|
.is_required(true))
|
1103
1103
|
.query_param(new_parameter(cascade, key: 'cascade[]'))
|
1104
|
-
.auth(Single.new('
|
1104
|
+
.auth(Single.new('BasicAuth'))
|
1105
1105
|
.array_serialization_format(ArraySerializationFormat::PLAIN))
|
1106
1106
|
.response(new_response_handler
|
1107
1107
|
.is_response_void(true))
|
@@ -1127,7 +1127,7 @@ module AdvancedBilling
|
|
1127
1127
|
.body_param(new_parameter(body))
|
1128
1128
|
.header_param(new_parameter('application/json', key: 'accept'))
|
1129
1129
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
1130
|
-
.auth(Single.new('
|
1130
|
+
.auth(Single.new('BasicAuth')))
|
1131
1131
|
.response(new_response_handler
|
1132
1132
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
1133
1133
|
.deserialize_into(PrepaidConfigurationResponse.method(:from_hash)))
|
@@ -1180,7 +1180,7 @@ module AdvancedBilling
|
|
1180
1180
|
.body_param(new_parameter(body))
|
1181
1181
|
.header_param(new_parameter('application/json', key: 'accept'))
|
1182
1182
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
1183
|
-
.auth(Single.new('
|
1183
|
+
.auth(Single.new('BasicAuth')))
|
1184
1184
|
.response(new_response_handler
|
1185
1185
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
1186
1186
|
.deserialize_into(SubscriptionPreviewResponse.method(:from_hash)))
|
@@ -1221,7 +1221,7 @@ module AdvancedBilling
|
|
1221
1221
|
.body_param(new_parameter(body))
|
1222
1222
|
.header_param(new_parameter('application/json', key: 'accept'))
|
1223
1223
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
1224
|
-
.auth(Single.new('
|
1224
|
+
.auth(Single.new('BasicAuth')))
|
1225
1225
|
.response(new_response_handler
|
1226
1226
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
1227
1227
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -1251,7 +1251,7 @@ module AdvancedBilling
|
|
1251
1251
|
.is_required(true)
|
1252
1252
|
.should_encode(true))
|
1253
1253
|
.query_param(new_parameter(coupon_code, key: 'coupon_code'))
|
1254
|
-
.auth(Single.new('
|
1254
|
+
.auth(Single.new('BasicAuth')))
|
1255
1255
|
.response(new_response_handler
|
1256
1256
|
.deserializer(APIHelper.method(:deserialize_primitive_types))
|
1257
1257
|
.deserialize_into(proc do |response| response.to_s end)
|
@@ -1331,7 +1331,7 @@ module AdvancedBilling
|
|
1331
1331
|
.body_param(new_parameter(body))
|
1332
1332
|
.header_param(new_parameter('application/json', key: 'accept'))
|
1333
1333
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
1334
|
-
.auth(Single.new('
|
1334
|
+
.auth(Single.new('BasicAuth')))
|
1335
1335
|
.response(new_response_handler
|
1336
1336
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
1337
1337
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -66,7 +66,7 @@ module AdvancedBilling
|
|
66
66
|
.query_param(new_parameter(options['order'], key: 'order'))
|
67
67
|
.query_param(new_parameter(options['subscription'], key: 'subscription'))
|
68
68
|
.header_param(new_parameter('application/json', key: 'accept'))
|
69
|
-
.auth(Single.new('
|
69
|
+
.auth(Single.new('BasicAuth')))
|
70
70
|
.response(new_response_handler
|
71
71
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
72
72
|
.deserialize_into(WebhookResponse.method(:from_hash))
|
@@ -86,7 +86,7 @@ module AdvancedBilling
|
|
86
86
|
.body_param(new_parameter(body))
|
87
87
|
.header_param(new_parameter('application/json', key: 'accept'))
|
88
88
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
89
|
-
.auth(Single.new('
|
89
|
+
.auth(Single.new('BasicAuth')))
|
90
90
|
.response(new_response_handler
|
91
91
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
92
92
|
.deserialize_into(EnableWebhooksResponse.method(:from_hash)))
|
@@ -109,7 +109,7 @@ module AdvancedBilling
|
|
109
109
|
.body_param(new_parameter(body))
|
110
110
|
.header_param(new_parameter('application/json', key: 'accept'))
|
111
111
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
112
|
-
.auth(Single.new('
|
112
|
+
.auth(Single.new('BasicAuth')))
|
113
113
|
.response(new_response_handler
|
114
114
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
115
115
|
.deserialize_into(ReplayWebhooksResponse.method(:from_hash)))
|
@@ -122,7 +122,7 @@ module AdvancedBilling
|
|
122
122
|
# [Event
|
123
123
|
# keys](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405357509645-W
|
124
124
|
# ebhooks-Reference#example-payloads)
|
125
|
-
# @param [
|
125
|
+
# @param [CreateOrUpdateEndpointRequest] body Optional parameter: Example:
|
126
126
|
# @return [EndpointResponse] response from the API call
|
127
127
|
def create_endpoint(body: nil)
|
128
128
|
new_api_call_builder
|
@@ -133,7 +133,7 @@ module AdvancedBilling
|
|
133
133
|
.body_param(new_parameter(body))
|
134
134
|
.header_param(new_parameter('application/json', key: 'accept'))
|
135
135
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
136
|
-
.auth(Single.new('
|
136
|
+
.auth(Single.new('BasicAuth')))
|
137
137
|
.response(new_response_handler
|
138
138
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
139
139
|
.deserialize_into(EndpointResponse.method(:from_hash))
|
@@ -152,7 +152,7 @@ module AdvancedBilling
|
|
152
152
|
'/endpoints.json',
|
153
153
|
Server::DEFAULT)
|
154
154
|
.header_param(new_parameter('application/json', key: 'accept'))
|
155
|
-
.auth(Single.new('
|
155
|
+
.auth(Single.new('BasicAuth')))
|
156
156
|
.response(new_response_handler
|
157
157
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
158
158
|
.deserialize_into(Endpoint.method(:from_hash))
|
@@ -174,7 +174,7 @@ module AdvancedBilling
|
|
174
174
|
# `webhook_subscriptions` without the specific event key.
|
175
175
|
# @param [Integer] endpoint_id Required parameter: The Chargify id for the
|
176
176
|
# endpoint that should be updated
|
177
|
-
# @param [
|
177
|
+
# @param [CreateOrUpdateEndpointRequest] body Optional parameter: Example:
|
178
178
|
# @return [EndpointResponse] response from the API call
|
179
179
|
def update_endpoint(endpoint_id,
|
180
180
|
body: nil)
|
@@ -189,7 +189,7 @@ module AdvancedBilling
|
|
189
189
|
.body_param(new_parameter(body))
|
190
190
|
.header_param(new_parameter('application/json', key: 'accept'))
|
191
191
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
192
|
-
.auth(Single.new('
|
192
|
+
.auth(Single.new('BasicAuth')))
|
193
193
|
.response(new_response_handler
|
194
194
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
195
195
|
.deserialize_into(EndpointResponse.method(:from_hash))
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AdvancedBilling
|
7
|
+
# Subscription Group Create Error Response class.
|
8
|
+
class SubscriptionGroupCreateErrorResponseException < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Object]
|
14
|
+
attr_accessor :errors
|
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
|
+
@errors = hash.key?('errors') ? APIHelper.deserialize_union_type(
|
30
|
+
UnionTypeLookUp.get(:SubscriptionGroupCreateErrorResponseErrors), hash['errors']
|
31
|
+
) : nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -6,24 +6,45 @@
|
|
6
6
|
module AdvancedBilling
|
7
7
|
# Utility class for basic authorization.
|
8
8
|
class BasicAuth < CoreLibrary::HeaderAuth
|
9
|
-
|
9
|
+
include CoreLibrary
|
10
|
+
# Display error message on occurrence of authentication failure.
|
10
11
|
# @returns [String] The oAuth error message.
|
11
12
|
def error_message
|
12
13
|
'BasicAuth: basic_auth_user_name or basic_auth_password is undefined.'
|
13
14
|
end
|
14
15
|
|
15
16
|
# Initialization constructor.
|
16
|
-
def initialize(
|
17
|
+
def initialize(basic_auth_credentials)
|
17
18
|
auth_params = {}
|
18
|
-
unless
|
19
|
+
unless basic_auth_credentials.nil? ||
|
20
|
+
basic_auth_credentials.username.nil? ||
|
21
|
+
basic_auth_credentials.password.nil?
|
19
22
|
auth_params['Authorization'] =
|
20
|
-
"Basic #{AuthHelper.get_base64_encoded_value(
|
23
|
+
"Basic #{AuthHelper.get_base64_encoded_value(basic_auth_credentials.username,
|
24
|
+
basic_auth_credentials.password)}"
|
21
25
|
end
|
22
26
|
|
23
27
|
super auth_params
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Data class for BasicAuthCredentials.
|
32
|
+
class BasicAuthCredentials
|
33
|
+
attr_reader :username, :password
|
34
|
+
|
35
|
+
def initialize(username:, password:)
|
36
|
+
raise ArgumentError, 'username cannot be nil' if username.nil?
|
37
|
+
raise ArgumentError, 'password cannot be nil' if password.nil?
|
38
|
+
|
39
|
+
@username = username
|
40
|
+
@password = password
|
41
|
+
end
|
42
|
+
|
43
|
+
def clone_with(username: nil, password: nil)
|
44
|
+
username ||= self.username
|
45
|
+
password ||= self.password
|
24
46
|
|
25
|
-
|
26
|
-
@_basic_auth_password = basic_auth_password
|
47
|
+
BasicAuthCredentials.new(username: username, password: password)
|
27
48
|
end
|
28
49
|
end
|
29
50
|
end
|