maxio-advanced-billing-sdk 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -41
- data/lib/advanced_billing/client.rb +7 -1
- data/lib/advanced_billing/configuration.rb +1 -1
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/component_price_points_controller.rb +420 -0
- data/lib/advanced_billing/controllers/components_controller.rb +0 -347
- data/lib/advanced_billing/controllers/product_families_controller.rb +2 -2
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +16 -9
- data/lib/advanced_billing/controllers/products_controller.rb +2 -2
- data/lib/advanced_billing/models/account_balance.rb +6 -8
- data/lib/advanced_billing/models/account_balances.rb +9 -12
- data/lib/advanced_billing/models/ach_agreement.rb +8 -10
- data/lib/advanced_billing/models/activate_subscription_request.rb +3 -4
- data/lib/advanced_billing/models/add_coupons_request.rb +3 -4
- data/lib/advanced_billing/models/add_subscription_to_a_group.rb +3 -4
- data/lib/advanced_billing/models/address_change.rb +4 -6
- data/lib/advanced_billing/models/agreement_acceptance.rb +10 -14
- data/lib/advanced_billing/models/allocate_components.rb +14 -18
- data/lib/advanced_billing/models/allocation.rb +39 -52
- data/lib/advanced_billing/models/allocation_expiration_date.rb +3 -4
- data/lib/advanced_billing/models/allocation_preview.rb +20 -28
- data/lib/advanced_billing/models/allocation_preview_item.rb +28 -38
- data/lib/advanced_billing/models/allocation_preview_line_item.rb +15 -20
- data/lib/advanced_billing/models/allocation_preview_response.rb +3 -4
- data/lib/advanced_billing/models/allocation_response.rb +3 -4
- data/lib/advanced_billing/models/allocation_settings.rb +6 -8
- data/lib/advanced_billing/models/applied_credit_note_data.rb +4 -6
- data/lib/advanced_billing/models/apply_credit_note_event.rb +9 -12
- data/lib/advanced_billing/models/apply_credit_note_event_data.rb +15 -22
- data/lib/advanced_billing/models/apply_debit_note_event.rb +9 -12
- data/lib/advanced_billing/models/apply_debit_note_event_data.rb +10 -14
- data/lib/advanced_billing/models/apply_payment_event.rb +9 -12
- data/lib/advanced_billing/models/apply_payment_event_data.rb +17 -24
- data/lib/advanced_billing/models/attribute_error.rb +3 -4
- data/lib/advanced_billing/models/auto_resume.rb +3 -4
- data/lib/advanced_billing/models/backport_invoice_event.rb +9 -12
- data/lib/advanced_billing/models/bank_account_attributes.rb +19 -26
- data/lib/advanced_billing/models/bank_account_payment_profile.rb +34 -46
- data/lib/advanced_billing/models/bank_account_response.rb +3 -4
- data/lib/advanced_billing/models/bank_account_verification.rb +5 -6
- data/lib/advanced_billing/models/bank_account_verification_request.rb +3 -4
- data/lib/advanced_billing/models/base_refund_error.rb +3 -4
- data/lib/advanced_billing/models/base_string_error.rb +3 -4
- data/lib/advanced_billing/models/batch_job.rb +8 -12
- data/lib/advanced_billing/models/batch_job_response.rb +3 -4
- data/lib/advanced_billing/models/billing_manifest.rb +15 -20
- data/lib/advanced_billing/models/billing_manifest_item.rb +22 -30
- data/lib/advanced_billing/models/billing_schedule.rb +3 -4
- data/lib/advanced_billing/models/breakouts.rb +8 -10
- data/lib/advanced_billing/models/bulk_components_price_point_assignment.rb +3 -4
- data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +3 -4
- data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +3 -4
- data/lib/advanced_billing/models/bulk_create_segments.rb +3 -4
- data/lib/advanced_billing/models/bulk_update_segments.rb +3 -4
- data/lib/advanced_billing/models/bulk_update_segments_item.rb +5 -8
- data/lib/advanced_billing/models/calendar_billing.rb +5 -6
- data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +3 -4
- data/lib/advanced_billing/models/cancellation_options.rb +5 -6
- data/lib/advanced_billing/models/cancellation_request.rb +3 -4
- data/lib/advanced_billing/models/change_chargeback_status_event.rb +9 -12
- data/lib/advanced_billing/models/change_chargeback_status_event_data.rb +3 -4
- data/lib/advanced_billing/models/change_invoice_collection_method_event.rb +11 -12
- data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +5 -6
- data/lib/advanced_billing/models/change_invoice_status_event.rb +9 -12
- data/lib/advanced_billing/models/change_invoice_status_event_data.rb +9 -12
- data/lib/advanced_billing/models/chargify_ebb.rb +10 -14
- data/lib/advanced_billing/models/component.rb +49 -70
- data/lib/advanced_billing/models/component_allocation_change.rb +11 -16
- data/lib/advanced_billing/models/component_allocation_error_item.rb +7 -10
- data/lib/advanced_billing/models/component_cost_data.rb +11 -16
- data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +9 -12
- data/lib/advanced_billing/models/component_currency_price.rb +10 -14
- data/lib/advanced_billing/models/component_currency_prices_response.rb +3 -4
- data/lib/advanced_billing/models/component_custom_price.rb +7 -10
- data/lib/advanced_billing/models/component_price.rb +13 -18
- data/lib/advanced_billing/models/component_price_point.rb +25 -36
- data/lib/advanced_billing/models/component_price_point_assignment.rb +5 -6
- data/lib/advanced_billing/models/component_price_point_error_item.rb +6 -8
- data/lib/advanced_billing/models/component_price_point_item.rb +10 -14
- data/lib/advanced_billing/models/component_price_point_response.rb +3 -4
- data/lib/advanced_billing/models/component_price_points_response.rb +4 -6
- data/lib/advanced_billing/models/component_response.rb +3 -4
- data/lib/advanced_billing/models/consolidated_invoice.rb +3 -4
- data/lib/advanced_billing/models/count_response.rb +3 -4
- data/lib/advanced_billing/models/coupon.rb +45 -62
- data/lib/advanced_billing/models/coupon_currency.rb +7 -10
- data/lib/advanced_billing/models/coupon_currency_request.rb +3 -4
- data/lib/advanced_billing/models/coupon_currency_response.rb +3 -4
- data/lib/advanced_billing/models/coupon_response.rb +3 -4
- data/lib/advanced_billing/models/coupon_restriction.rb +8 -12
- data/lib/advanced_billing/models/coupon_subcodes.rb +3 -4
- data/lib/advanced_billing/models/coupon_subcodes_response.rb +6 -8
- data/lib/advanced_billing/models/coupon_usage.rb +11 -16
- data/lib/advanced_billing/models/create_allocation.rb +18 -24
- data/lib/advanced_billing/models/create_allocation_request.rb +3 -4
- data/lib/advanced_billing/models/create_component_price_point.rb +13 -18
- data/lib/advanced_billing/models/create_component_price_point_request.rb +3 -4
- data/lib/advanced_billing/models/create_component_price_points_request.rb +3 -4
- data/lib/advanced_billing/models/create_credit_note_event.rb +9 -12
- data/lib/advanced_billing/models/create_currency_price.rb +6 -8
- data/lib/advanced_billing/models/create_currency_prices_request.rb +3 -4
- data/lib/advanced_billing/models/create_customer.rb +25 -38
- data/lib/advanced_billing/models/create_customer_request.rb +3 -4
- data/lib/advanced_billing/models/create_debit_note_event.rb +9 -12
- data/lib/advanced_billing/models/create_ebb_component.rb +3 -4
- data/lib/advanced_billing/models/create_invoice.rb +15 -22
- data/lib/advanced_billing/models/create_invoice_address.rb +13 -20
- data/lib/advanced_billing/models/create_invoice_coupon.rb +10 -14
- data/lib/advanced_billing/models/create_invoice_item.rb +18 -26
- data/lib/advanced_billing/models/create_invoice_payment.rb +8 -12
- data/lib/advanced_billing/models/create_invoice_payment_application.rb +4 -6
- data/lib/advanced_billing/models/create_invoice_payment_request.rb +4 -6
- data/lib/advanced_billing/models/create_invoice_request.rb +3 -4
- data/lib/advanced_billing/models/create_metadata.rb +4 -6
- data/lib/advanced_billing/models/create_metadata_request.rb +3 -4
- data/lib/advanced_billing/models/create_metafield.rb +7 -10
- data/lib/advanced_billing/models/create_metafields_request.rb +3 -4
- data/lib/advanced_billing/models/create_metered_component.rb +3 -4
- data/lib/advanced_billing/models/create_multi_invoice_payment.rb +9 -14
- data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +3 -4
- data/lib/advanced_billing/models/create_offer.rb +11 -16
- data/lib/advanced_billing/models/create_offer_component.rb +6 -8
- data/lib/advanced_billing/models/create_offer_request.rb +3 -4
- data/lib/advanced_billing/models/create_on_off_component.rb +3 -4
- data/lib/advanced_billing/models/create_or_update_coupon.rb +6 -8
- data/lib/advanced_billing/models/create_or_update_endpoint.rb +4 -6
- data/lib/advanced_billing/models/create_or_update_endpoint_request.rb +3 -4
- data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +22 -28
- data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +22 -28
- data/lib/advanced_billing/models/create_or_update_product.rb +25 -34
- data/lib/advanced_billing/models/create_or_update_product_request.rb +3 -4
- data/lib/advanced_billing/models/create_or_update_segment_price.rb +6 -8
- data/lib/advanced_billing/models/create_payment.rb +7 -10
- data/lib/advanced_billing/models/create_payment_profile.rb +47 -66
- data/lib/advanced_billing/models/create_payment_profile_request.rb +3 -4
- data/lib/advanced_billing/models/create_prepaid_component.rb +3 -4
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +16 -22
- data/lib/advanced_billing/models/create_prepayment.rb +8 -12
- data/lib/advanced_billing/models/create_prepayment_request.rb +3 -4
- data/lib/advanced_billing/models/create_prepayment_response.rb +3 -4
- data/lib/advanced_billing/models/create_product_currency_price.rb +5 -8
- data/lib/advanced_billing/models/create_product_currency_prices_request.rb +3 -4
- data/lib/advanced_billing/models/create_product_family.rb +6 -8
- data/lib/advanced_billing/models/create_product_family_request.rb +3 -4
- data/lib/advanced_billing/models/create_product_price_point.rb +22 -30
- data/lib/advanced_billing/models/create_product_price_point_request.rb +3 -4
- data/lib/advanced_billing/models/create_quantity_based_component.rb +3 -4
- data/lib/advanced_billing/models/create_reason_code.rb +6 -8
- data/lib/advanced_billing/models/create_reason_code_request.rb +3 -4
- data/lib/advanced_billing/models/create_segment.rb +12 -14
- data/lib/advanced_billing/models/create_segment_request.rb +3 -4
- data/lib/advanced_billing/models/create_subscription.rb +78 -100
- data/lib/advanced_billing/models/create_subscription_component.rb +12 -16
- data/lib/advanced_billing/models/create_subscription_group.rb +5 -6
- data/lib/advanced_billing/models/create_subscription_group_request.rb +3 -4
- data/lib/advanced_billing/models/create_subscription_request.rb +3 -4
- data/lib/advanced_billing/models/create_usage.rb +7 -10
- data/lib/advanced_billing/models/create_usage_request.rb +3 -4
- data/lib/advanced_billing/models/created_prepayment.rb +12 -16
- data/lib/advanced_billing/models/credit_account_balance_changed.rb +9 -12
- data/lib/advanced_billing/models/credit_card_attributes.rb +6 -8
- data/lib/advanced_billing/models/credit_card_payment_profile.rb +33 -46
- data/lib/advanced_billing/models/credit_note.rb +38 -56
- data/lib/advanced_billing/models/credit_note_application.rb +8 -12
- data/lib/advanced_billing/models/credit_note_line_item.rb +27 -38
- data/lib/advanced_billing/models/credit_scheme_request.rb +3 -4
- data/lib/advanced_billing/models/currency_price.rb +10 -14
- data/lib/advanced_billing/models/currency_prices_response.rb +3 -4
- data/lib/advanced_billing/models/custom_field_value_change.rb +11 -16
- data/lib/advanced_billing/models/customer.rb +39 -56
- data/lib/advanced_billing/models/customer_attributes.rb +25 -38
- data/lib/advanced_billing/models/customer_change.rb +7 -10
- data/lib/advanced_billing/models/customer_changes_preview_response.rb +3 -4
- data/lib/advanced_billing/models/customer_custom_fields_change.rb +4 -6
- data/lib/advanced_billing/models/customer_error.rb +3 -4
- data/lib/advanced_billing/models/customer_payer_change.rb +4 -6
- data/lib/advanced_billing/models/customer_response.rb +3 -4
- data/lib/advanced_billing/models/debit_note.rb +33 -48
- data/lib/advanced_billing/models/deduct_service_credit.rb +4 -6
- data/lib/advanced_billing/models/deduct_service_credit_request.rb +3 -4
- data/lib/advanced_billing/models/delayed_cancellation_response.rb +3 -4
- data/lib/advanced_billing/models/delete_subscription_group_response.rb +4 -6
- data/lib/advanced_billing/models/dunner_data.rb +10 -14
- data/lib/advanced_billing/models/dunning_step_data.rb +12 -18
- data/lib/advanced_billing/models/dunning_step_reached.rb +6 -8
- data/lib/advanced_billing/models/ebb_component.rb +26 -36
- data/lib/advanced_billing/models/ebb_event.rb +3 -4
- data/lib/advanced_billing/models/enable_webhooks_request.rb +3 -4
- data/lib/advanced_billing/models/enable_webhooks_response.rb +3 -4
- data/lib/advanced_billing/models/endpoint.rb +8 -12
- data/lib/advanced_billing/models/endpoint_response.rb +3 -4
- data/lib/advanced_billing/models/errors.rb +4 -6
- data/lib/advanced_billing/models/event.rb +10 -16
- data/lib/advanced_billing/models/event_based_billing_segment_error.rb +3 -4
- data/lib/advanced_billing/models/event_response.rb +3 -4
- data/lib/advanced_billing/models/failed_payment_event.rb +9 -12
- data/lib/advanced_billing/models/failed_payment_event_data.rb +8 -12
- data/lib/advanced_billing/models/full_subscription_group_response.rb +19 -26
- data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +30 -44
- data/lib/advanced_billing/models/get_one_time_token_request.rb +3 -4
- data/lib/advanced_billing/models/group_billing.rb +6 -8
- data/lib/advanced_billing/models/group_settings.rb +4 -6
- data/lib/advanced_billing/models/group_target.rb +4 -6
- data/lib/advanced_billing/models/historic_usage.rb +6 -8
- data/lib/advanced_billing/models/invoice.rb +74 -106
- data/lib/advanced_billing/models/invoice_address.rb +9 -14
- data/lib/advanced_billing/models/invoice_balance_item.rb +6 -8
- data/lib/advanced_billing/models/invoice_credit.rb +11 -16
- data/lib/advanced_billing/models/invoice_custom_field.rb +8 -12
- data/lib/advanced_billing/models/invoice_customer.rb +11 -16
- data/lib/advanced_billing/models/invoice_discount.rb +18 -26
- data/lib/advanced_billing/models/invoice_discount_breakout.rb +6 -8
- data/lib/advanced_billing/models/invoice_display_settings.rb +5 -6
- data/lib/advanced_billing/models/invoice_issued.rb +20 -32
- data/lib/advanced_billing/models/invoice_line_item.rb +32 -46
- data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +3 -4
- data/lib/advanced_billing/models/invoice_line_item_event_data.rb +30 -42
- data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +4 -6
- data/lib/advanced_billing/models/invoice_payer.rb +10 -14
- data/lib/advanced_billing/models/invoice_payer_change.rb +7 -10
- data/lib/advanced_billing/models/invoice_payment.rb +16 -22
- data/lib/advanced_billing/models/invoice_payment_application.rb +6 -8
- data/lib/advanced_billing/models/invoice_payment_method.rb +12 -18
- data/lib/advanced_billing/models/invoice_pre_payment.rb +6 -8
- data/lib/advanced_billing/models/invoice_previous_balance.rb +4 -6
- data/lib/advanced_billing/models/invoice_refund.rb +13 -18
- data/lib/advanced_billing/models/invoice_response.rb +3 -4
- data/lib/advanced_billing/models/invoice_seller.rb +7 -10
- data/lib/advanced_billing/models/invoice_tax.rb +17 -24
- data/lib/advanced_billing/models/invoice_tax_breakout.rb +7 -10
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +7 -10
- data/lib/advanced_billing/models/issue_advance_invoice_request.rb +3 -4
- data/lib/advanced_billing/models/issue_invoice_event.rb +9 -12
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +8 -12
- data/lib/advanced_billing/models/issue_invoice_request.rb +4 -4
- data/lib/advanced_billing/models/issue_service_credit.rb +4 -6
- data/lib/advanced_billing/models/issue_service_credit_request.rb +3 -4
- data/lib/advanced_billing/models/item_price_point_changed.rb +10 -14
- data/lib/advanced_billing/models/item_price_point_data.rb +6 -8
- data/lib/advanced_billing/models/list_components_filter.rb +5 -6
- data/lib/advanced_billing/models/list_components_price_points_response.rb +3 -4
- data/lib/advanced_billing/models/list_coupons_filter.rb +13 -18
- data/lib/advanced_billing/models/list_credit_notes_response.rb +3 -4
- data/lib/advanced_billing/models/list_invoice_events_response.rb +7 -10
- data/lib/advanced_billing/models/list_invoices_response.rb +3 -4
- data/lib/advanced_billing/models/list_metafields_response.rb +8 -12
- data/lib/advanced_billing/models/list_mrr_filter.rb +3 -4
- data/lib/advanced_billing/models/list_mrr_response.rb +3 -4
- data/lib/advanced_billing/models/list_mrr_response_result.rb +11 -16
- data/lib/advanced_billing/models/list_offers_response.rb +3 -4
- data/lib/advanced_billing/models/list_prepayments_filter.rb +6 -8
- data/lib/advanced_billing/models/list_price_points_filter.rb +12 -18
- data/lib/advanced_billing/models/list_product_price_points_response.rb +3 -4
- data/lib/advanced_billing/models/list_products_filter.rb +5 -6
- data/lib/advanced_billing/models/list_proforma_invoices_meta.rb +7 -10
- data/lib/advanced_billing/models/list_proforma_invoices_response.rb +5 -6
- data/lib/advanced_billing/models/list_public_keys_meta.rb +7 -10
- data/lib/advanced_billing/models/list_public_keys_response.rb +5 -6
- data/lib/advanced_billing/models/list_sale_rep_item.rb +8 -12
- data/lib/advanced_billing/models/list_segments_filter.rb +9 -10
- data/lib/advanced_billing/models/list_segments_response.rb +3 -4
- data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +15 -20
- data/lib/advanced_billing/models/list_subscription_components_filter.rb +5 -6
- data/lib/advanced_billing/models/list_subscription_components_for_site_filter.rb +6 -8
- data/lib/advanced_billing/models/list_subscription_components_response.rb +3 -4
- data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +3 -4
- data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +3 -4
- data/lib/advanced_billing/models/list_subscription_groups_item.rb +18 -24
- data/lib/advanced_billing/models/list_subscription_groups_meta.rb +5 -6
- data/lib/advanced_billing/models/list_subscription_groups_response.rb +5 -6
- data/lib/advanced_billing/models/metadata.rb +10 -14
- data/lib/advanced_billing/models/metafield.rb +9 -14
- data/lib/advanced_billing/models/metafield_scope.rb +11 -16
- data/lib/advanced_billing/models/metered_component.rb +29 -40
- data/lib/advanced_billing/models/metered_usage.rb +10 -14
- data/lib/advanced_billing/models/movement.rb +14 -20
- data/lib/advanced_billing/models/movement_line_item.rb +14 -20
- data/lib/advanced_billing/models/mrr.rb +10 -14
- data/lib/advanced_billing/models/mrr_movement.rb +7 -10
- data/lib/advanced_billing/models/mrr_response.rb +3 -4
- data/lib/advanced_billing/models/multi_invoice_payment.rb +8 -10
- data/lib/advanced_billing/models/multi_invoice_payment_response.rb +3 -4
- data/lib/advanced_billing/models/nested_subscription_group.rb +7 -10
- data/lib/advanced_billing/models/net_terms.rb +10 -12
- data/lib/advanced_billing/models/offer.rb +28 -40
- data/lib/advanced_billing/models/offer_discount.rb +6 -8
- data/lib/advanced_billing/models/offer_item.rb +17 -22
- data/lib/advanced_billing/models/offer_response.rb +3 -4
- data/lib/advanced_billing/models/offer_signup_page.rb +9 -14
- data/lib/advanced_billing/models/on_off_component.rb +26 -36
- data/lib/advanced_billing/models/organization_address.rb +12 -18
- data/lib/advanced_billing/models/origin_invoice.rb +4 -6
- data/lib/advanced_billing/models/overage_pricing.rb +4 -6
- data/lib/advanced_billing/models/override_subscription.rb +9 -12
- data/lib/advanced_billing/models/override_subscription_request.rb +3 -4
- data/lib/advanced_billing/models/paginated_metadata.rb +8 -12
- data/lib/advanced_billing/models/paid_invoice.rb +7 -10
- data/lib/advanced_billing/models/pause_request.rb +3 -4
- data/lib/advanced_billing/models/payer_attributes.rb +25 -38
- data/lib/advanced_billing/models/payer_error.rb +6 -8
- data/lib/advanced_billing/models/payment_collection_method_changed.rb +4 -6
- data/lib/advanced_billing/models/payment_for_allocation.rb +7 -10
- data/lib/advanced_billing/models/payment_method_apple_pay.rb +3 -4
- data/lib/advanced_billing/models/payment_method_bank_account.rb +6 -8
- data/lib/advanced_billing/models/payment_method_credit_card.rb +9 -12
- data/lib/advanced_billing/models/payment_method_external.rb +6 -10
- data/lib/advanced_billing/models/payment_method_paypal.rb +4 -6
- data/lib/advanced_billing/models/payment_profile_attributes.rb +37 -52
- data/lib/advanced_billing/models/payment_profile_response.rb +3 -4
- data/lib/advanced_billing/models/payment_related_events.rb +5 -6
- data/lib/advanced_billing/models/pending_cancellation_change.rb +4 -6
- data/lib/advanced_billing/models/portal_management_link.rb +10 -14
- data/lib/advanced_billing/models/prepaid_component_price_point.rb +8 -12
- data/lib/advanced_billing/models/prepaid_configuration.rb +10 -12
- data/lib/advanced_billing/models/prepaid_configuration_response.rb +3 -4
- data/lib/advanced_billing/models/prepaid_product_price_point_filter.rb +2 -2
- data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +8 -10
- data/lib/advanced_billing/models/prepaid_usage.rb +16 -22
- data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +6 -8
- data/lib/advanced_billing/models/prepaid_usage_component.rb +33 -46
- data/lib/advanced_billing/models/prepayment.rb +15 -22
- data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +8 -10
- data/lib/advanced_billing/models/prepayment_response.rb +3 -4
- data/lib/advanced_billing/models/prepayments_response.rb +3 -4
- data/lib/advanced_billing/models/preview_allocations_request.rb +8 -10
- data/lib/advanced_billing/models/price.rb +6 -8
- data/lib/advanced_billing/models/product.rb +56 -76
- data/lib/advanced_billing/models/product_family.rb +11 -16
- data/lib/advanced_billing/models/product_family_response.rb +3 -4
- data/lib/advanced_billing/models/product_price_point.rb +36 -50
- data/lib/advanced_billing/models/product_price_point_errors.rb +10 -14
- data/lib/advanced_billing/models/product_price_point_response.rb +3 -4
- data/lib/advanced_billing/models/product_response.rb +3 -4
- data/lib/advanced_billing/models/proforma_error.rb +3 -4
- data/lib/advanced_billing/models/proforma_invoice.rb +51 -74
- data/lib/advanced_billing/models/proforma_invoice_credit.rb +7 -10
- data/lib/advanced_billing/models/proforma_invoice_discount.rb +13 -18
- data/lib/advanced_billing/models/proforma_invoice_issued.rb +15 -24
- data/lib/advanced_billing/models/proforma_invoice_payment.rb +7 -10
- data/lib/advanced_billing/models/proforma_invoice_tax.rb +11 -16
- data/lib/advanced_billing/models/proration.rb +3 -4
- data/lib/advanced_billing/models/public_key.rb +6 -8
- data/lib/advanced_billing/models/public_signup_page.rb +7 -10
- data/lib/advanced_billing/models/quantity_based_component.rb +30 -42
- data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +5 -6
- data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +15 -20
- data/lib/advanced_billing/models/reactivate_subscription_request.rb +11 -14
- data/lib/advanced_billing/models/reactivation_billing.rb +4 -4
- data/lib/advanced_billing/models/reason_code.rb +11 -16
- data/lib/advanced_billing/models/reason_code_response.rb +3 -4
- data/lib/advanced_billing/models/reason_codes_json_response.rb +3 -4
- data/lib/advanced_billing/models/record_payment_request.rb +3 -4
- data/lib/advanced_billing/models/record_payment_response.rb +5 -6
- data/lib/advanced_billing/models/referral_code.rb +7 -10
- data/lib/advanced_billing/models/referral_validation_response.rb +3 -4
- data/lib/advanced_billing/models/refund_consolidated_invoice.rb +9 -14
- data/lib/advanced_billing/models/refund_invoice.rb +10 -14
- data/lib/advanced_billing/models/refund_invoice_event.rb +9 -12
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +14 -20
- data/lib/advanced_billing/models/refund_invoice_request.rb +3 -4
- data/lib/advanced_billing/models/refund_prepayment.rb +7 -10
- data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +3 -4
- data/lib/advanced_billing/models/refund_prepayment_request.rb +3 -4
- data/lib/advanced_billing/models/refund_success.rb +6 -8
- data/lib/advanced_billing/models/remove_payment_event.rb +9 -12
- data/lib/advanced_billing/models/remove_payment_event_data.rb +11 -16
- data/lib/advanced_billing/models/renewal_preview.rb +15 -20
- data/lib/advanced_billing/models/renewal_preview_component.rb +6 -8
- data/lib/advanced_billing/models/renewal_preview_line_item.rb +22 -30
- data/lib/advanced_billing/models/renewal_preview_request.rb +3 -4
- data/lib/advanced_billing/models/renewal_preview_response.rb +3 -4
- data/lib/advanced_billing/models/replay_webhooks_request.rb +3 -4
- data/lib/advanced_billing/models/replay_webhooks_response.rb +3 -4
- data/lib/advanced_billing/models/resent_invitation.rb +8 -10
- data/lib/advanced_billing/models/resume_options.rb +5 -6
- data/lib/advanced_billing/models/revoked_invitation.rb +6 -8
- data/lib/advanced_billing/models/sale_rep.rb +9 -12
- data/lib/advanced_billing/models/sale_rep_item_mrr.rb +6 -8
- data/lib/advanced_billing/models/sale_rep_settings.rb +11 -16
- data/lib/advanced_billing/models/sale_rep_subscription.rb +15 -22
- data/lib/advanced_billing/models/segment.rb +20 -26
- data/lib/advanced_billing/models/segment_price.rb +13 -18
- data/lib/advanced_billing/models/segment_response.rb +3 -4
- data/lib/advanced_billing/models/send_invoice_request.rb +6 -8
- data/lib/advanced_billing/models/service_credit.rb +9 -12
- data/lib/advanced_billing/models/service_credit_response.rb +3 -4
- data/lib/advanced_billing/models/signup_proforma_preview.rb +5 -6
- data/lib/advanced_billing/models/signup_proforma_preview_response.rb +3 -4
- data/lib/advanced_billing/models/site.rb +25 -34
- data/lib/advanced_billing/models/site_response.rb +3 -4
- data/lib/advanced_billing/models/site_statistics.rb +20 -24
- data/lib/advanced_billing/models/site_summary.rb +8 -12
- data/lib/advanced_billing/models/subscription.rb +94 -126
- data/lib/advanced_billing/models/subscription_component.rb +48 -66
- data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +4 -6
- data/lib/advanced_billing/models/subscription_component_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_component_subscription.rb +4 -6
- data/lib/advanced_billing/models/subscription_custom_price.rb +21 -28
- data/lib/advanced_billing/models/subscription_filter.rb +10 -14
- data/lib/advanced_billing/models/subscription_group.rb +9 -12
- data/lib/advanced_billing/models/subscription_group_balances.rb +8 -10
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +26 -34
- data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +6 -8
- data/lib/advanced_billing/models/subscription_group_credit_card.rb +30 -42
- data/lib/advanced_billing/models/subscription_group_customer.rb +8 -12
- data/lib/advanced_billing/models/subscription_group_item.rb +16 -22
- data/lib/advanced_billing/models/subscription_group_member_error.rb +6 -8
- data/lib/advanced_billing/models/subscription_group_members_array_error.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_payment_profile.rb +7 -10
- data/lib/advanced_billing/models/subscription_group_prepayment.rb +6 -10
- data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +9 -12
- data/lib/advanced_billing/models/subscription_group_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_signup.rb +13 -18
- data/lib/advanced_billing/models/subscription_group_signup_component.rb +9 -12
- data/lib/advanced_billing/models/subscription_group_signup_error.rb +10 -14
- data/lib/advanced_billing/models/subscription_group_signup_failure.rb +4 -6
- data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +14 -18
- data/lib/advanced_billing/models/subscription_group_signup_item.rb +21 -28
- data/lib/advanced_billing/models/subscription_group_signup_request.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +18 -24
- data/lib/advanced_billing/models/subscription_group_signup_success.rb +4 -6
- data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +14 -20
- data/lib/advanced_billing/models/subscription_group_single_error.rb +3 -4
- data/lib/advanced_billing/models/subscription_group_subscription_error.rb +14 -18
- data/lib/advanced_billing/models/subscription_group_update_error.rb +3 -4
- data/lib/advanced_billing/models/subscription_included_coupon.rb +11 -16
- data/lib/advanced_billing/models/subscription_migration_preview.rb +8 -10
- data/lib/advanced_billing/models/subscription_migration_preview_options.rb +17 -22
- data/lib/advanced_billing/models/subscription_migration_preview_request.rb +3 -4
- data/lib/advanced_billing/models/subscription_migration_preview_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_mrr.rb +6 -8
- data/lib/advanced_billing/models/subscription_mrr_breakout.rb +5 -6
- data/lib/advanced_billing/models/subscription_mrr_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_note.rb +10 -14
- data/lib/advanced_billing/models/subscription_note_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_preview.rb +5 -6
- data/lib/advanced_billing/models/subscription_preview_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_product_change.rb +5 -6
- data/lib/advanced_billing/models/subscription_product_migration.rb +15 -20
- data/lib/advanced_billing/models/subscription_product_migration_request.rb +3 -4
- data/lib/advanced_billing/models/subscription_response.rb +3 -4
- data/lib/advanced_billing/models/subscription_state_change.rb +5 -6
- data/lib/advanced_billing/models/tax_configuration.rb +7 -8
- data/lib/advanced_billing/models/too_many_management_link_requests.rb +4 -6
- data/lib/advanced_billing/models/update_allocation_expiration_date.rb +3 -4
- data/lib/advanced_billing/models/update_component.rb +14 -20
- data/lib/advanced_billing/models/update_component_price_point.rb +13 -18
- data/lib/advanced_billing/models/update_component_price_point_request.rb +3 -4
- data/lib/advanced_billing/models/update_component_request.rb +3 -4
- data/lib/advanced_billing/models/update_coupon_currency.rb +4 -6
- data/lib/advanced_billing/models/update_currency_price.rb +4 -6
- data/lib/advanced_billing/models/update_currency_prices_request.rb +3 -4
- data/lib/advanced_billing/models/update_customer.rb +26 -40
- data/lib/advanced_billing/models/update_customer_request.rb +3 -4
- data/lib/advanced_billing/models/update_metadata.rb +6 -8
- data/lib/advanced_billing/models/update_metadata_request.rb +3 -4
- data/lib/advanced_billing/models/update_metafield.rb +8 -12
- data/lib/advanced_billing/models/update_metafields_request.rb +3 -4
- data/lib/advanced_billing/models/update_payment_profile.rb +21 -28
- data/lib/advanced_billing/models/update_payment_profile_request.rb +3 -4
- data/lib/advanced_billing/models/update_price.rb +9 -12
- data/lib/advanced_billing/models/update_product_price_point.rb +5 -6
- data/lib/advanced_billing/models/update_product_price_point_request.rb +3 -4
- data/lib/advanced_billing/models/update_reason_code.rb +6 -8
- data/lib/advanced_billing/models/update_reason_code_request.rb +3 -4
- data/lib/advanced_billing/models/update_segment.rb +4 -6
- data/lib/advanced_billing/models/update_segment_request.rb +3 -4
- data/lib/advanced_billing/models/update_subscription.rb +29 -36
- data/lib/advanced_billing/models/update_subscription_component.rb +5 -6
- data/lib/advanced_billing/models/update_subscription_group.rb +3 -4
- data/lib/advanced_billing/models/update_subscription_group_request.rb +3 -4
- data/lib/advanced_billing/models/update_subscription_note.rb +4 -6
- data/lib/advanced_billing/models/update_subscription_note_request.rb +3 -4
- data/lib/advanced_billing/models/update_subscription_request.rb +3 -4
- data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +9 -10
- data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +3 -4
- data/lib/advanced_billing/models/usage.rb +14 -20
- data/lib/advanced_billing/models/usage_response.rb +3 -4
- data/lib/advanced_billing/models/void_invoice.rb +3 -4
- data/lib/advanced_billing/models/void_invoice_event.rb +9 -12
- data/lib/advanced_billing/models/void_invoice_event_data.rb +10 -14
- data/lib/advanced_billing/models/void_invoice_request.rb +3 -4
- data/lib/advanced_billing/models/void_remainder_event.rb +9 -12
- data/lib/advanced_billing/models/void_remainder_event_data.rb +7 -10
- data/lib/advanced_billing/models/webhook.rb +18 -26
- data/lib/advanced_billing/models/webhook_response.rb +3 -4
- data/lib/advanced_billing/utilities/union_type_lookup.rb +42 -0
- data/lib/advanced_billing.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec42d6b6b61bfb2d3629b91f90b61488f5283e7b3d309c8c0a07c11ba8bd0949
|
4
|
+
data.tar.gz: 4cfccc5639ae102e40f4b66d8c54870ccb2cd5b69c369b325744c510fede2bbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51fad65ae3b11804cdfe05815b330571a04e89ec3d4b2ecb1a36dfed77acd72663020cb15c24cd0f76addbadf2fb350c5dac4e13f779682ab69b1f52d6bb3bcf
|
7
|
+
data.tar.gz: 7ad806dff750525450654ddb2494ac564094fbc37c5773e89e778433100ac191e0bc9f118cb8da6e21783667cdb06250e0e57194c2a560059f13a9d6c86845b3
|
data/README.md
CHANGED
@@ -30,20 +30,20 @@ curl -u <api_key>:x -H Accept:application/json -H Content-Type:application/json
|
|
30
30
|
Install the gem from the command line:
|
31
31
|
|
32
32
|
```ruby
|
33
|
-
gem install maxio-advanced-billing-sdk -v
|
33
|
+
gem install maxio-advanced-billing-sdk -v 4.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', '4.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/4.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/4.0.0/doc/client.md)
|
47
47
|
|
48
48
|
The following parameters are configurable for the API Client:
|
49
49
|
|
@@ -54,14 +54,14 @@ The following parameters are configurable for the API Client:
|
|
54
54
|
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.PRODUCTION`** |
|
55
55
|
| `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
56
56
|
| `adapter` | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
57
|
-
| `timeout` | `Float` | The value to use for connection timeout. <br> **Default:
|
57
|
+
| `timeout` | `Float` | The value to use for connection timeout. <br> **Default: 120** |
|
58
58
|
| `max_retries` | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
59
59
|
| `retry_interval` | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
60
60
|
| `backoff_factor` | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
61
61
|
| `retry_statuses` | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
62
62
|
| `retry_methods` | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
63
63
|
| `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/
|
64
|
+
| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/$a/https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/basic-authentication.md) | The credential object for Basic Authentication |
|
65
65
|
|
66
66
|
The API client can be initialized as follows:
|
67
67
|
|
@@ -92,45 +92,46 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
92
92
|
|
93
93
|
This API uses the following authentication schemes.
|
94
94
|
|
95
|
-
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
95
|
+
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/$a/https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/basic-authentication.md)
|
96
96
|
|
97
97
|
## List of APIs
|
98
98
|
|
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
|
-
* [
|
103
|
-
* [
|
104
|
-
* [
|
105
|
-
* [
|
106
|
-
* [Product
|
107
|
-
* [
|
108
|
-
* [
|
109
|
-
* [
|
110
|
-
* [
|
111
|
-
* [
|
112
|
-
* [Subscription
|
113
|
-
* [Subscription
|
114
|
-
* [Subscription Group
|
115
|
-
* [Subscription
|
116
|
-
* [Subscription
|
117
|
-
* [Subscription
|
118
|
-
* [Subscription
|
119
|
-
* [
|
120
|
-
* [
|
121
|
-
* [
|
122
|
-
* [
|
123
|
-
* [
|
124
|
-
* [
|
125
|
-
* [
|
126
|
-
* [
|
127
|
-
* [
|
128
|
-
* [
|
129
|
-
* [
|
99
|
+
* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/api-exports.md)
|
100
|
+
* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/advance-invoice.md)
|
101
|
+
* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/billing-portal.md)
|
102
|
+
* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/component-price-points.md)
|
103
|
+
* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/custom-fields.md)
|
104
|
+
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/events-based-billing-segments.md)
|
105
|
+
* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/payment-profiles.md)
|
106
|
+
* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/product-families.md)
|
107
|
+
* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/product-price-points.md)
|
108
|
+
* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/proforma-invoices.md)
|
109
|
+
* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/reason-codes.md)
|
110
|
+
* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/referral-codes.md)
|
111
|
+
* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/sales-commissions.md)
|
112
|
+
* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/subscription-components.md)
|
113
|
+
* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/subscription-groups.md)
|
114
|
+
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/subscription-group-invoice-account.md)
|
115
|
+
* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/subscription-group-status.md)
|
116
|
+
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/subscription-invoice-account.md)
|
117
|
+
* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/subscription-notes.md)
|
118
|
+
* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/subscription-products.md)
|
119
|
+
* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/subscription-status.md)
|
120
|
+
* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/coupons.md)
|
121
|
+
* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/components.md)
|
122
|
+
* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/customers.md)
|
123
|
+
* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/events.md)
|
124
|
+
* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/insights.md)
|
125
|
+
* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/invoices.md)
|
126
|
+
* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/offers.md)
|
127
|
+
* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/products.md)
|
128
|
+
* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/sites.md)
|
129
|
+
* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/subscriptions.md)
|
130
|
+
* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/controllers/webhooks.md)
|
130
131
|
|
131
132
|
## Classes Documentation
|
132
133
|
|
133
|
-
* [Utility Classes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
134
|
-
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
135
|
-
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/
|
134
|
+
* [Utility Classes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/utility-classes.md)
|
135
|
+
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/http-response.md)
|
136
|
+
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/4.0.0/doc/http-request.md)
|
136
137
|
|
@@ -39,6 +39,12 @@ module AdvancedBilling
|
|
39
39
|
@components ||= ComponentsController.new @global_configuration
|
40
40
|
end
|
41
41
|
|
42
|
+
# Access to component_price_points controller.
|
43
|
+
# @return [ComponentPricePointsController] Returns the controller instance.
|
44
|
+
def component_price_points
|
45
|
+
@component_price_points ||= ComponentPricePointsController.new @global_configuration
|
46
|
+
end
|
47
|
+
|
42
48
|
# Access to customers controller.
|
43
49
|
# @return [CustomersController] Returns the controller instance.
|
44
50
|
def customers
|
@@ -196,7 +202,7 @@ module AdvancedBilling
|
|
196
202
|
end
|
197
203
|
|
198
204
|
def initialize(
|
199
|
-
connection: nil, adapter: :net_http_persistent, timeout:
|
205
|
+
connection: nil, adapter: :net_http_persistent, timeout: 120,
|
200
206
|
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
201
207
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
202
208
|
retry_methods: %i[get put], http_callback: nil,
|
@@ -32,7 +32,7 @@ module AdvancedBilling
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def initialize(
|
35
|
-
connection: nil, adapter: :net_http_persistent, timeout:
|
35
|
+
connection: nil, adapter: :net_http_persistent, timeout: 120,
|
36
36
|
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
37
37
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
38
38
|
retry_methods: %i[get put], http_callback: nil,
|
@@ -0,0 +1,420 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AdvancedBilling
|
7
|
+
# ComponentPricePointsController
|
8
|
+
class ComponentPricePointsController < BaseController
|
9
|
+
# Sets a new default price point for the component. This new default will
|
10
|
+
# apply to all new subscriptions going forward - existing subscriptions will
|
11
|
+
# remain on their current price point.
|
12
|
+
# See [Price Points
|
13
|
+
# Documentation](https://chargify.zendesk.com/hc/en-us/articles/440775586588
|
14
|
+
# 3#price-points) for more information on price points and moving
|
15
|
+
# subscriptions between price points.
|
16
|
+
# Note: Custom price points are not able to be set as the default for a
|
17
|
+
# component.
|
18
|
+
# @param [Integer] component_id Required parameter: The Chargify id of the
|
19
|
+
# component to which the price point belongs
|
20
|
+
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
21
|
+
# price point
|
22
|
+
# @return [ComponentResponse] response from the API call
|
23
|
+
def promote_component_price_point_to_default(component_id,
|
24
|
+
price_point_id)
|
25
|
+
new_api_call_builder
|
26
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
27
|
+
'/components/{component_id}/price_points/{price_point_id}/default.json',
|
28
|
+
Server::DEFAULT)
|
29
|
+
.template_param(new_parameter(component_id, key: 'component_id')
|
30
|
+
.is_required(true)
|
31
|
+
.should_encode(true))
|
32
|
+
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
33
|
+
.is_required(true)
|
34
|
+
.should_encode(true))
|
35
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
36
|
+
.auth(Single.new('BasicAuth')))
|
37
|
+
.response(new_response_handler
|
38
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
39
|
+
.deserialize_into(ComponentResponse.method(:from_hash)))
|
40
|
+
.execute
|
41
|
+
end
|
42
|
+
|
43
|
+
# This endpoint can be used to create a new price point for an existing
|
44
|
+
# component.
|
45
|
+
# @param [Integer] component_id Required parameter: The Chargify id of the
|
46
|
+
# component
|
47
|
+
# @param [CreateComponentPricePointRequest] body Optional parameter:
|
48
|
+
# Example:
|
49
|
+
# @return [ComponentPricePointResponse] response from the API call
|
50
|
+
def create_component_price_point(component_id,
|
51
|
+
body: nil)
|
52
|
+
new_api_call_builder
|
53
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
54
|
+
'/components/{component_id}/price_points.json',
|
55
|
+
Server::DEFAULT)
|
56
|
+
.template_param(new_parameter(component_id, key: 'component_id')
|
57
|
+
.is_required(true)
|
58
|
+
.should_encode(true))
|
59
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
60
|
+
.body_param(new_parameter(body))
|
61
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
62
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
63
|
+
.auth(Single.new('BasicAuth')))
|
64
|
+
.response(new_response_handler
|
65
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
66
|
+
.deserialize_into(ComponentPricePointResponse.method(:from_hash)))
|
67
|
+
.execute
|
68
|
+
end
|
69
|
+
|
70
|
+
# Use this endpoint to read current price points that are associated with a
|
71
|
+
# component.
|
72
|
+
# You may specify the component by using either the numeric id or the
|
73
|
+
# `handle:gold` syntax.
|
74
|
+
# When fetching a component's price points, if you have defined multiple
|
75
|
+
# currencies at the site level, you can optionally pass the
|
76
|
+
# `?currency_prices=true` query param to include an array of currency price
|
77
|
+
# data in the response.
|
78
|
+
# If the price point is set to `use_site_exchange_rate: true`, it will
|
79
|
+
# return pricing based on the current exchange rate. If the flag is set to
|
80
|
+
# false, it will return all of the defined prices for each currency.
|
81
|
+
# @param [Integer] component_id Required parameter: The Chargify id of the
|
82
|
+
# component
|
83
|
+
# @param [TrueClass | FalseClass] currency_prices Optional parameter:
|
84
|
+
# Include an array of currency price data
|
85
|
+
# @param [Integer] page Optional parameter: Result records are organized in
|
86
|
+
# pages. By default, the first page of results is displayed. The page
|
87
|
+
# parameter specifies a page number of results to fetch. You can start
|
88
|
+
# navigating through the pages to consume the results. You do this by
|
89
|
+
# passing in a page parameter. Retrieve the next page by adding ?page=2 to
|
90
|
+
# the query string. If there are no results to return, then an empty result
|
91
|
+
# set will be returned. Use in query `page=1`.
|
92
|
+
# @param [Integer] per_page Optional parameter: This parameter indicates how
|
93
|
+
# many records to fetch in each request. Default value is 20. The maximum
|
94
|
+
# allowed values is 200; any per_page value over 200 will be changed to 200.
|
95
|
+
# Use in query `per_page=200`.
|
96
|
+
# @param [Array[PricePointType]] filter_type Optional parameter: Use in
|
97
|
+
# query: `filter[type]=catalog,default`.
|
98
|
+
# @return [ComponentPricePointsResponse] response from the API call
|
99
|
+
def list_component_price_points(options = {})
|
100
|
+
new_api_call_builder
|
101
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
102
|
+
'/components/{component_id}/price_points.json',
|
103
|
+
Server::DEFAULT)
|
104
|
+
.template_param(new_parameter(options['component_id'], key: 'component_id')
|
105
|
+
.is_required(true)
|
106
|
+
.should_encode(true))
|
107
|
+
.query_param(new_parameter(options['currency_prices'], key: 'currency_prices'))
|
108
|
+
.query_param(new_parameter(options['page'], key: 'page'))
|
109
|
+
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
110
|
+
.query_param(new_parameter(options['filter_type'], key: 'filter[type]'))
|
111
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
112
|
+
.auth(Single.new('BasicAuth'))
|
113
|
+
.array_serialization_format(ArraySerializationFormat::CSV))
|
114
|
+
.response(new_response_handler
|
115
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
116
|
+
.deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
|
117
|
+
.execute
|
118
|
+
end
|
119
|
+
|
120
|
+
# Use this endpoint to create multiple component price points in one
|
121
|
+
# request.
|
122
|
+
# @param [String] component_id Required parameter: The Chargify id of the
|
123
|
+
# component for which you want to fetch price points.
|
124
|
+
# @param [CreateComponentPricePointsRequest] body Optional parameter:
|
125
|
+
# Example:
|
126
|
+
# @return [ComponentPricePointsResponse] response from the API call
|
127
|
+
def bulk_create_component_price_points(component_id,
|
128
|
+
body: nil)
|
129
|
+
new_api_call_builder
|
130
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
131
|
+
'/components/{component_id}/price_points/bulk.json',
|
132
|
+
Server::DEFAULT)
|
133
|
+
.template_param(new_parameter(component_id, key: 'component_id')
|
134
|
+
.is_required(true)
|
135
|
+
.should_encode(true))
|
136
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
137
|
+
.body_param(new_parameter(body))
|
138
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
139
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
140
|
+
.auth(Single.new('BasicAuth')))
|
141
|
+
.response(new_response_handler
|
142
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
143
|
+
.deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
|
144
|
+
.execute
|
145
|
+
end
|
146
|
+
|
147
|
+
# When updating a price point, it's prices can be updated as well by
|
148
|
+
# creating new prices or editing / removing existing ones.
|
149
|
+
# Passing in a price bracket without an `id` will attempt to create a new
|
150
|
+
# price.
|
151
|
+
# Including an `id` will update the corresponding price, and including the
|
152
|
+
# `_destroy` flag set to true along with the `id` will remove that price.
|
153
|
+
# Note: Custom price points cannot be updated directly. They must be edited
|
154
|
+
# through the Subscription.
|
155
|
+
# @param [Integer | String] component_id Required parameter: The id or
|
156
|
+
# handle of the component. When using the handle, it must be prefixed with
|
157
|
+
# `handle:`. Example: `123` for an integer ID, or
|
158
|
+
# `handle:example-product-handle` for a string handle.
|
159
|
+
# @param [Integer | String] price_point_id Required parameter: The id or
|
160
|
+
# handle of the price point. When using the handle, it must be prefixed with
|
161
|
+
# `handle:`. Example: `123` for an integer ID, or
|
162
|
+
# `handle:example-price_point-handle` for a string handle.
|
163
|
+
# @param [UpdateComponentPricePointRequest] body Optional parameter:
|
164
|
+
# Example:
|
165
|
+
# @return [ComponentPricePointResponse] response from the API call
|
166
|
+
def update_component_price_point(component_id,
|
167
|
+
price_point_id,
|
168
|
+
body: nil)
|
169
|
+
new_api_call_builder
|
170
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
171
|
+
'/components/{component_id}/price_points/{price_point_id}.json',
|
172
|
+
Server::DEFAULT)
|
173
|
+
.template_param(new_parameter(component_id, key: 'component_id')
|
174
|
+
.is_required(true)
|
175
|
+
.should_encode(true)
|
176
|
+
.validator(proc do |value|
|
177
|
+
UnionTypeLookUp.get(:UpdateComponentPricePointComponentId)
|
178
|
+
.validate(value)
|
179
|
+
end))
|
180
|
+
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
181
|
+
.is_required(true)
|
182
|
+
.should_encode(true)
|
183
|
+
.validator(proc do |value|
|
184
|
+
UnionTypeLookUp.get(:UpdateComponentPricePointPricePointId)
|
185
|
+
.validate(value)
|
186
|
+
end))
|
187
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
188
|
+
.body_param(new_parameter(body))
|
189
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
190
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
191
|
+
.auth(Single.new('BasicAuth')))
|
192
|
+
.response(new_response_handler
|
193
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
194
|
+
.deserialize_into(ComponentPricePointResponse.method(:from_hash))
|
195
|
+
.local_error_template('422',
|
196
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
197
|
+
' Response: \'{$response.body}\'.',
|
198
|
+
ErrorArrayMapResponseException))
|
199
|
+
.execute
|
200
|
+
end
|
201
|
+
|
202
|
+
# Use this endpoint to retrieve details for a specific component price
|
203
|
+
# point. You can achieve this by using either the component price point ID
|
204
|
+
# or handle.
|
205
|
+
# @param [Integer | String] component_id Required parameter: The id or
|
206
|
+
# handle of the component. When using the handle, it must be prefixed with
|
207
|
+
# `handle:`. Example: `123` for an integer ID, or
|
208
|
+
# `handle:example-product-handle` for a string handle.
|
209
|
+
# @param [Integer | String] price_point_id Required parameter: The id or
|
210
|
+
# handle of the price point. When using the handle, it must be prefixed with
|
211
|
+
# `handle:`. Example: `123` for an integer ID, or
|
212
|
+
# `handle:example-price_point-handle` for a string handle.
|
213
|
+
# @return [ComponentPricePointResponse] response from the API call
|
214
|
+
def read_component_price_point(component_id,
|
215
|
+
price_point_id)
|
216
|
+
new_api_call_builder
|
217
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
218
|
+
'/components/{component_id}/price_points/{price_point_id}.json',
|
219
|
+
Server::DEFAULT)
|
220
|
+
.template_param(new_parameter(component_id, key: 'component_id')
|
221
|
+
.is_required(true)
|
222
|
+
.should_encode(true)
|
223
|
+
.validator(proc do |value|
|
224
|
+
UnionTypeLookUp.get(:ReadComponentPricePointComponentId)
|
225
|
+
.validate(value)
|
226
|
+
end))
|
227
|
+
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
228
|
+
.is_required(true)
|
229
|
+
.should_encode(true)
|
230
|
+
.validator(proc do |value|
|
231
|
+
UnionTypeLookUp.get(:ReadComponentPricePointPricePointId)
|
232
|
+
.validate(value)
|
233
|
+
end))
|
234
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
235
|
+
.auth(Single.new('BasicAuth')))
|
236
|
+
.response(new_response_handler
|
237
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
238
|
+
.deserialize_into(ComponentPricePointResponse.method(:from_hash)))
|
239
|
+
.execute
|
240
|
+
end
|
241
|
+
|
242
|
+
# A price point can be archived at any time. Subscriptions using a price
|
243
|
+
# point that has been archived will continue using it until they're moved to
|
244
|
+
# another price point.
|
245
|
+
# @param [Integer | String] component_id Required parameter: The id or
|
246
|
+
# handle of the component. When using the handle, it must be prefixed with
|
247
|
+
# `handle:`. Example: `123` for an integer ID, or
|
248
|
+
# `handle:example-product-handle` for a string handle.
|
249
|
+
# @param [Integer | String] price_point_id Required parameter: The id or
|
250
|
+
# handle of the price point. When using the handle, it must be prefixed with
|
251
|
+
# `handle:`. Example: `123` for an integer ID, or
|
252
|
+
# `handle:example-price_point-handle` for a string handle.
|
253
|
+
# @return [ComponentPricePointResponse] response from the API call
|
254
|
+
def archive_component_price_point(component_id,
|
255
|
+
price_point_id)
|
256
|
+
new_api_call_builder
|
257
|
+
.request(new_request_builder(HttpMethodEnum::DELETE,
|
258
|
+
'/components/{component_id}/price_points/{price_point_id}.json',
|
259
|
+
Server::DEFAULT)
|
260
|
+
.template_param(new_parameter(component_id, key: 'component_id')
|
261
|
+
.is_required(true)
|
262
|
+
.should_encode(true)
|
263
|
+
.validator(proc do |value|
|
264
|
+
UnionTypeLookUp.get(:ArchiveComponentPricePointComponentId)
|
265
|
+
.validate(value)
|
266
|
+
end))
|
267
|
+
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
268
|
+
.is_required(true)
|
269
|
+
.should_encode(true)
|
270
|
+
.validator(proc do |value|
|
271
|
+
UnionTypeLookUp.get(:ArchiveComponentPricePointPricePointId)
|
272
|
+
.validate(value)
|
273
|
+
end))
|
274
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
275
|
+
.auth(Single.new('BasicAuth')))
|
276
|
+
.response(new_response_handler
|
277
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
278
|
+
.deserialize_into(ComponentPricePointResponse.method(:from_hash))
|
279
|
+
.local_error_template('422',
|
280
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
281
|
+
' Response: \'{$response.body}\'.',
|
282
|
+
ErrorListResponseException))
|
283
|
+
.execute
|
284
|
+
end
|
285
|
+
|
286
|
+
# Use this endpoint to unarchive a component price point.
|
287
|
+
# @param [Integer] component_id Required parameter: The Chargify id of the
|
288
|
+
# component to which the price point belongs
|
289
|
+
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
290
|
+
# price point
|
291
|
+
# @return [ComponentPricePointResponse] response from the API call
|
292
|
+
def unarchive_component_price_point(component_id,
|
293
|
+
price_point_id)
|
294
|
+
new_api_call_builder
|
295
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
296
|
+
'/components/{component_id}/price_points/{price_point_id}/unarchive.json',
|
297
|
+
Server::DEFAULT)
|
298
|
+
.template_param(new_parameter(component_id, key: 'component_id')
|
299
|
+
.is_required(true)
|
300
|
+
.should_encode(true))
|
301
|
+
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
302
|
+
.is_required(true)
|
303
|
+
.should_encode(true))
|
304
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
305
|
+
.auth(Single.new('BasicAuth')))
|
306
|
+
.response(new_response_handler
|
307
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
308
|
+
.deserialize_into(ComponentPricePointResponse.method(:from_hash)))
|
309
|
+
.execute
|
310
|
+
end
|
311
|
+
|
312
|
+
# This endpoint allows you to create currency prices for a given currency
|
313
|
+
# that has been defined on the site level in your settings.
|
314
|
+
# When creating currency prices, they need to mirror the structure of your
|
315
|
+
# primary pricing. For each price level defined on the component price
|
316
|
+
# point, there should be a matching price level created in the given
|
317
|
+
# currency.
|
318
|
+
# Note: Currency Prices are not able to be created for custom price points.
|
319
|
+
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
320
|
+
# price point
|
321
|
+
# @param [CreateCurrencyPricesRequest] body Optional parameter: Example:
|
322
|
+
# @return [ComponentCurrencyPricesResponse] response from the API call
|
323
|
+
def create_currency_prices(price_point_id,
|
324
|
+
body: nil)
|
325
|
+
new_api_call_builder
|
326
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
327
|
+
'/price_points/{price_point_id}/currency_prices.json',
|
328
|
+
Server::DEFAULT)
|
329
|
+
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
330
|
+
.is_required(true)
|
331
|
+
.should_encode(true))
|
332
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
333
|
+
.body_param(new_parameter(body))
|
334
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
335
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
336
|
+
.auth(Single.new('BasicAuth')))
|
337
|
+
.response(new_response_handler
|
338
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
339
|
+
.deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
|
340
|
+
.local_error('422',
|
341
|
+
'Unprocessable Entity (WebDAV)',
|
342
|
+
ErrorArrayMapResponseException))
|
343
|
+
.execute
|
344
|
+
end
|
345
|
+
|
346
|
+
# This endpoint allows you to update currency prices for a given currency
|
347
|
+
# that has been defined on the site level in your settings.
|
348
|
+
# Note: Currency Prices are not able to be updated for custom price points.
|
349
|
+
# @param [Integer] price_point_id Required parameter: The Chargify id of the
|
350
|
+
# price point
|
351
|
+
# @param [UpdateCurrencyPricesRequest] body Optional parameter: Example:
|
352
|
+
# @return [ComponentCurrencyPricesResponse] response from the API call
|
353
|
+
def update_currency_prices(price_point_id,
|
354
|
+
body: nil)
|
355
|
+
new_api_call_builder
|
356
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
357
|
+
'/price_points/{price_point_id}/currency_prices.json',
|
358
|
+
Server::DEFAULT)
|
359
|
+
.template_param(new_parameter(price_point_id, key: 'price_point_id')
|
360
|
+
.is_required(true)
|
361
|
+
.should_encode(true))
|
362
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
363
|
+
.body_param(new_parameter(body))
|
364
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
365
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
366
|
+
.auth(Single.new('BasicAuth')))
|
367
|
+
.response(new_response_handler
|
368
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
369
|
+
.deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
|
370
|
+
.local_error('422',
|
371
|
+
'Unprocessable Entity (WebDAV)',
|
372
|
+
ErrorArrayMapResponseException))
|
373
|
+
.execute
|
374
|
+
end
|
375
|
+
|
376
|
+
# This method allows to retrieve a list of Components Price Points belonging
|
377
|
+
# to a Site.
|
378
|
+
# @param [ListComponentsPricePointsInclude] include Optional parameter:
|
379
|
+
# Allows including additional data in the response. Use in query:
|
380
|
+
# `include=currency_prices`.
|
381
|
+
# @param [Integer] page Optional parameter: Result records are organized in
|
382
|
+
# pages. By default, the first page of results is displayed. The page
|
383
|
+
# parameter specifies a page number of results to fetch. You can start
|
384
|
+
# navigating through the pages to consume the results. You do this by
|
385
|
+
# passing in a page parameter. Retrieve the next page by adding ?page=2 to
|
386
|
+
# the query string. If there are no results to return, then an empty result
|
387
|
+
# set will be returned. Use in query `page=1`.
|
388
|
+
# @param [Integer] per_page Optional parameter: This parameter indicates how
|
389
|
+
# many records to fetch in each request. Default value is 20. The maximum
|
390
|
+
# allowed values is 200; any per_page value over 200 will be changed to 200.
|
391
|
+
# Use in query `per_page=200`.
|
392
|
+
# @param [SortingDirection] direction Optional parameter: Controls the order
|
393
|
+
# in which results are returned. Use in query `direction=asc`.
|
394
|
+
# @param [ListPricePointsFilter] filter Optional parameter: Filter to use
|
395
|
+
# for List PricePoints operations
|
396
|
+
# @return [ListComponentsPricePointsResponse] response from the API call
|
397
|
+
def list_all_component_price_points(options = {})
|
398
|
+
new_api_call_builder
|
399
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
400
|
+
'/components_price_points.json',
|
401
|
+
Server::DEFAULT)
|
402
|
+
.query_param(new_parameter(options['include'], key: 'include'))
|
403
|
+
.query_param(new_parameter(options['page'], key: 'page'))
|
404
|
+
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
405
|
+
.query_param(new_parameter(options['direction'], key: 'direction'))
|
406
|
+
.query_param(new_parameter(options['filter'], key: 'filter'))
|
407
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
408
|
+
.auth(Single.new('BasicAuth'))
|
409
|
+
.array_serialization_format(ArraySerializationFormat::CSV))
|
410
|
+
.response(new_response_handler
|
411
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
412
|
+
.deserialize_into(ListComponentsPricePointsResponse.method(:from_hash))
|
413
|
+
.local_error_template('422',
|
414
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
415
|
+
' Response: \'{$response.body}\'.',
|
416
|
+
ErrorListResponseException))
|
417
|
+
.execute
|
418
|
+
end
|
419
|
+
end
|
420
|
+
end
|