maxio-advanced-billing-sdk 5.2.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +48 -50
- data/lib/advanced_billing/client.rb +3 -4
- data/lib/advanced_billing/configuration.rb +21 -24
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +3 -3
- data/lib/advanced_billing/controllers/api_exports_controller.rb +9 -9
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/billing_portal_controller.rb +4 -4
- data/lib/advanced_billing/controllers/component_price_points_controller.rb +34 -20
- data/lib/advanced_billing/controllers/components_controller.rb +12 -12
- data/lib/advanced_billing/controllers/coupons_controller.rb +45 -27
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +9 -9
- data/lib/advanced_billing/controllers/customers_controller.rb +7 -7
- data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +6 -6
- data/lib/advanced_billing/controllers/events_controller.rb +26 -9
- data/lib/advanced_billing/controllers/insights_controller.rb +4 -4
- data/lib/advanced_billing/controllers/invoices_controller.rb +17 -17
- data/lib/advanced_billing/controllers/offers_controller.rb +10 -6
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +12 -12
- data/lib/advanced_billing/controllers/product_families_controller.rb +22 -20
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +14 -11
- data/lib/advanced_billing/controllers/products_controller.rb +6 -6
- data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +9 -9
- data/lib/advanced_billing/controllers/reason_codes_controller.rb +17 -9
- data/lib/advanced_billing/controllers/referral_codes_controller.rb +1 -1
- data/lib/advanced_billing/controllers/sales_commissions_controller.rb +3 -3
- data/lib/advanced_billing/controllers/sites_controller.rb +3 -3
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +21 -31
- data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +4 -4
- data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +4 -4
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +9 -9
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +6 -6
- data/lib/advanced_billing/controllers/subscription_notes_controller.rb +20 -8
- data/lib/advanced_billing/controllers/subscription_products_controller.rb +2 -2
- data/lib/advanced_billing/controllers/subscription_status_controller.rb +20 -12
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +40 -17
- data/lib/advanced_billing/controllers/webhooks_controller.rb +6 -6
- data/lib/advanced_billing/exceptions/api_exception.rb +11 -0
- data/lib/advanced_billing/exceptions/component_allocation_error_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/component_price_point_error_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/customer_error_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/error_array_map_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/error_list_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/error_string_map_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/event_based_billing_list_segments_errors_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/event_based_billing_segment_errors_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/product_price_point_error_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/proforma_bad_request_error_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/refund_prepayment_base_errors_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/single_error_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/single_string_error_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/subscription_add_coupon_error_exception.rb +14 -0
- data/lib/advanced_billing/exceptions/subscription_component_allocation_error_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/subscription_group_create_error_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/subscription_group_signup_error_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/subscription_remove_coupon_errors_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/subscription_response_error_exception.rb +44 -0
- data/lib/advanced_billing/exceptions/subscriptions_mrr_error_response_exception.rb +12 -0
- data/lib/advanced_billing/exceptions/too_many_management_link_requests_error_exception.rb +12 -0
- data/lib/advanced_billing/models/account_balance.rb +24 -7
- data/lib/advanced_billing/models/account_balances.rb +24 -7
- data/lib/advanced_billing/models/ach_agreement.rb +23 -7
- data/lib/advanced_billing/models/activate_event_based_component.rb +21 -6
- data/lib/advanced_billing/models/activate_subscription_request.rb +18 -4
- data/lib/advanced_billing/models/add_coupons_request.rb +17 -4
- data/lib/advanced_billing/models/add_subscription_to_a_group.rb +16 -15
- data/lib/advanced_billing/models/address_change.rb +19 -5
- data/lib/advanced_billing/models/agreement_acceptance.rb +27 -7
- data/lib/advanced_billing/models/allocate_components.rb +29 -7
- data/lib/advanced_billing/models/allocation.rb +44 -7
- data/lib/advanced_billing/models/allocation_expiration_date.rb +18 -4
- data/lib/advanced_billing/models/allocation_preview.rb +33 -7
- data/lib/advanced_billing/models/allocation_preview_item.rb +38 -7
- data/lib/advanced_billing/models/allocation_preview_line_item.rb +28 -7
- data/lib/advanced_billing/models/allocation_preview_response.rb +18 -4
- data/lib/advanced_billing/models/allocation_response.rb +18 -4
- data/lib/advanced_billing/models/allocation_settings.rb +21 -6
- data/lib/advanced_billing/models/apple_pay_payment_profile.rb +34 -7
- data/lib/advanced_billing/models/applied_credit_note_data.rb +19 -5
- data/lib/advanced_billing/models/apply_credit_note_event.rb +23 -7
- data/lib/advanced_billing/models/apply_credit_note_event_data.rb +28 -7
- data/lib/advanced_billing/models/apply_debit_note_event.rb +23 -7
- data/lib/advanced_billing/models/apply_debit_note_event_data.rb +25 -7
- data/lib/advanced_billing/models/apply_payment_event.rb +23 -7
- data/lib/advanced_billing/models/apply_payment_event_data.rb +30 -7
- data/lib/advanced_billing/models/attribute_error.rb +18 -4
- data/lib/advanced_billing/models/auto_resume.rb +18 -4
- data/lib/advanced_billing/models/backport_invoice_event.rb +23 -7
- data/lib/advanced_billing/models/bank_account_attributes.rb +32 -7
- data/lib/advanced_billing/models/bank_account_payment_profile.rb +42 -7
- data/lib/advanced_billing/models/bank_account_response.rb +18 -4
- data/lib/advanced_billing/models/bank_account_verification.rb +19 -5
- data/lib/advanced_billing/models/bank_account_verification_request.rb +18 -4
- data/lib/advanced_billing/models/base_model.rb +88 -28
- data/lib/advanced_billing/models/base_refund_error.rb +17 -4
- data/lib/advanced_billing/models/base_string_error.rb +17 -4
- data/lib/advanced_billing/models/batch_job.rb +23 -7
- data/lib/advanced_billing/models/batch_job_response.rb +18 -4
- data/lib/advanced_billing/models/billing_manifest.rb +30 -7
- data/lib/advanced_billing/models/billing_manifest_item.rb +34 -7
- data/lib/advanced_billing/models/billing_schedule.rb +18 -4
- data/lib/advanced_billing/models/breakouts.rb +25 -7
- data/lib/advanced_billing/models/bulk_components_price_point_assignment.rb +18 -4
- data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +18 -4
- data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +18 -4
- data/lib/advanced_billing/models/bulk_create_segments.rb +18 -4
- data/lib/advanced_billing/models/bulk_update_segments.rb +18 -4
- data/lib/advanced_billing/models/bulk_update_segments_item.rb +20 -6
- data/lib/advanced_billing/models/calendar_billing.rb +22 -7
- data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +18 -4
- data/lib/advanced_billing/models/cancellation_options.rb +19 -5
- data/lib/advanced_billing/models/cancellation_request.rb +18 -4
- data/lib/advanced_billing/models/change_chargeback_status_event.rb +23 -7
- data/lib/advanced_billing/models/change_chargeback_status_event_data.rb +18 -4
- data/lib/advanced_billing/models/change_invoice_collection_method_event.rb +23 -7
- data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +20 -5
- data/lib/advanced_billing/models/change_invoice_status_event.rb +23 -7
- data/lib/advanced_billing/models/change_invoice_status_event_data.rb +24 -7
- data/lib/advanced_billing/models/chargify_ebb.rb +25 -7
- data/lib/advanced_billing/models/component.rb +54 -9
- data/lib/advanced_billing/models/component_allocation_change.rb +27 -7
- data/lib/advanced_billing/models/component_allocation_error_item.rb +22 -7
- data/lib/advanced_billing/models/component_cost_data.rb +26 -7
- data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +24 -7
- data/lib/advanced_billing/models/component_currency_price.rb +24 -7
- data/lib/advanced_billing/models/component_currency_prices_response.rb +18 -4
- data/lib/advanced_billing/models/component_custom_price.rb +24 -7
- data/lib/advanced_billing/models/component_price.rb +26 -7
- data/lib/advanced_billing/models/component_price_point.rb +127 -7
- data/lib/advanced_billing/models/component_price_point_assignment.rb +19 -5
- data/lib/advanced_billing/models/component_price_point_error_item.rb +21 -6
- data/lib/advanced_billing/models/component_price_point_item.rb +24 -7
- data/lib/advanced_billing/models/component_price_point_response.rb +18 -4
- data/lib/advanced_billing/models/component_price_points_response.rb +19 -5
- data/lib/advanced_billing/models/component_response.rb +18 -4
- data/lib/advanced_billing/models/compounding_strategy.rb +5 -1
- data/lib/advanced_billing/models/consolidated_invoice.rb +18 -4
- data/lib/advanced_billing/models/count_response.rb +17 -4
- data/lib/advanced_billing/models/coupon.rb +150 -29
- data/lib/advanced_billing/models/coupon_currency.rb +27 -9
- data/lib/advanced_billing/models/coupon_currency_request.rb +18 -4
- data/lib/advanced_billing/models/coupon_currency_response.rb +18 -4
- data/lib/advanced_billing/models/coupon_payload.rb +273 -0
- data/lib/advanced_billing/models/{create_or_update_coupon.rb → coupon_request.rb} +26 -22
- data/lib/advanced_billing/models/coupon_response.rb +17 -4
- data/lib/advanced_billing/models/coupon_restriction.rb +22 -7
- data/lib/advanced_billing/models/coupon_subcodes.rb +17 -4
- data/lib/advanced_billing/models/coupon_subcodes_response.rb +21 -6
- data/lib/advanced_billing/models/coupon_usage.rb +24 -7
- data/lib/advanced_billing/models/create_allocation.rb +31 -7
- data/lib/advanced_billing/models/create_allocation_request.rb +18 -4
- data/lib/advanced_billing/models/create_component_price_point.rb +30 -9
- data/lib/advanced_billing/models/create_component_price_point_request.rb +18 -4
- data/lib/advanced_billing/models/create_component_price_points_request.rb +18 -4
- data/lib/advanced_billing/models/create_credit_note_event.rb +23 -7
- data/lib/advanced_billing/models/create_currency_price.rb +20 -6
- data/lib/advanced_billing/models/create_currency_prices_request.rb +18 -4
- data/lib/advanced_billing/models/create_customer.rb +33 -7
- data/lib/advanced_billing/models/create_customer_request.rb +18 -4
- data/lib/advanced_billing/models/create_debit_note_event.rb +23 -7
- data/lib/advanced_billing/models/create_ebb_component.rb +18 -4
- data/lib/advanced_billing/models/create_invoice.rb +28 -7
- data/lib/advanced_billing/models/create_invoice_address.rb +24 -7
- data/lib/advanced_billing/models/create_invoice_coupon.rb +30 -8
- data/lib/advanced_billing/models/create_invoice_item.rb +30 -7
- data/lib/advanced_billing/models/create_invoice_payment.rb +24 -7
- data/lib/advanced_billing/models/create_invoice_payment_application.rb +19 -5
- data/lib/advanced_billing/models/create_invoice_payment_request.rb +19 -5
- data/lib/advanced_billing/models/create_invoice_request.rb +17 -4
- data/lib/advanced_billing/models/create_metadata.rb +19 -5
- data/lib/advanced_billing/models/create_metadata_request.rb +18 -4
- data/lib/advanced_billing/models/create_metafield.rb +22 -7
- data/lib/advanced_billing/models/create_metafields_request.rb +18 -4
- data/lib/advanced_billing/models/create_metered_component.rb +18 -4
- data/lib/advanced_billing/models/create_multi_invoice_payment.rb +24 -7
- data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +17 -4
- data/lib/advanced_billing/models/create_offer.rb +25 -7
- data/lib/advanced_billing/models/create_offer_component.rb +22 -6
- data/lib/advanced_billing/models/create_offer_request.rb +17 -4
- data/lib/advanced_billing/models/create_on_off_component.rb +18 -4
- data/lib/advanced_billing/models/create_or_update_endpoint.rb +19 -5
- data/lib/advanced_billing/models/create_or_update_endpoint_request.rb +18 -4
- data/lib/advanced_billing/models/create_or_update_product.rb +36 -7
- data/lib/advanced_billing/models/create_or_update_product_request.rb +17 -4
- data/lib/advanced_billing/models/create_or_update_segment_price.rb +22 -6
- data/lib/advanced_billing/models/create_payment.rb +22 -7
- data/lib/advanced_billing/models/create_payment_profile.rb +50 -7
- data/lib/advanced_billing/models/create_payment_profile_request.rb +18 -4
- data/lib/advanced_billing/models/create_prepaid_component.rb +18 -4
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +38 -13
- data/lib/advanced_billing/models/create_prepayment.rb +23 -7
- data/lib/advanced_billing/models/create_prepayment_request.rb +18 -4
- data/lib/advanced_billing/models/create_prepayment_response.rb +18 -4
- data/lib/advanced_billing/models/create_product_currency_price.rb +20 -6
- data/lib/advanced_billing/models/create_product_currency_prices_request.rb +18 -4
- data/lib/advanced_billing/models/create_product_family.rb +20 -6
- data/lib/advanced_billing/models/create_product_family_request.rb +18 -4
- data/lib/advanced_billing/models/create_product_price_point.rb +35 -7
- data/lib/advanced_billing/models/create_product_price_point_request.rb +18 -4
- data/lib/advanced_billing/models/create_quantity_based_component.rb +18 -4
- data/lib/advanced_billing/models/create_reason_code.rb +20 -6
- data/lib/advanced_billing/models/create_reason_code_request.rb +18 -4
- data/lib/advanced_billing/models/create_segment.rb +27 -7
- data/lib/advanced_billing/models/create_segment_request.rb +17 -4
- data/lib/advanced_billing/models/create_subscription.rb +79 -8
- data/lib/advanced_billing/models/create_subscription_component.rb +26 -7
- data/lib/advanced_billing/models/create_subscription_group.rb +19 -5
- data/lib/advanced_billing/models/create_subscription_group_request.rb +18 -4
- data/lib/advanced_billing/models/create_subscription_request.rb +18 -4
- data/lib/advanced_billing/models/create_usage.rb +23 -7
- data/lib/advanced_billing/models/create_usage_request.rb +17 -4
- data/lib/advanced_billing/models/created_prepayment.rb +26 -7
- data/lib/advanced_billing/models/credit_account_balance_changed.rb +27 -7
- data/lib/advanced_billing/models/credit_card_attributes.rb +22 -6
- data/lib/advanced_billing/models/credit_card_payment_profile.rb +39 -7
- data/lib/advanced_billing/models/credit_note.rb +42 -7
- data/lib/advanced_billing/models/credit_note_application.rb +23 -7
- data/lib/advanced_billing/models/credit_note_line_item.rb +37 -7
- data/lib/advanced_billing/models/credit_scheme_request.rb +18 -4
- data/lib/advanced_billing/models/currency_price.rb +46 -7
- data/lib/advanced_billing/models/currency_prices_response.rb +18 -4
- data/lib/advanced_billing/models/custom_field_value_change.rb +26 -7
- data/lib/advanced_billing/models/customer.rb +47 -7
- data/lib/advanced_billing/models/customer_attributes.rb +34 -7
- data/lib/advanced_billing/models/customer_change.rb +23 -7
- data/lib/advanced_billing/models/customer_changes_preview_response.rb +17 -4
- data/lib/advanced_billing/models/customer_custom_fields_change.rb +19 -5
- data/lib/advanced_billing/models/customer_error.rb +18 -4
- data/lib/advanced_billing/models/customer_payer_change.rb +19 -5
- data/lib/advanced_billing/models/customer_response.rb +18 -4
- data/lib/advanced_billing/models/debit_note.rb +37 -7
- data/lib/advanced_billing/models/deduct_service_credit.rb +19 -5
- data/lib/advanced_billing/models/deduct_service_credit_request.rb +18 -4
- data/lib/advanced_billing/models/delayed_cancellation_response.rb +17 -4
- data/lib/advanced_billing/models/delete_subscription_group_response.rb +19 -5
- data/lib/advanced_billing/models/dunner_data.rb +25 -7
- data/lib/advanced_billing/models/dunning_step_data.rb +26 -7
- data/lib/advanced_billing/models/dunning_step_reached.rb +20 -6
- data/lib/advanced_billing/models/ebb_component.rb +41 -53
- data/lib/advanced_billing/models/ebb_event.rb +18 -4
- data/lib/advanced_billing/models/enable_webhooks_request.rb +18 -4
- data/lib/advanced_billing/models/enable_webhooks_response.rb +18 -4
- data/lib/advanced_billing/models/endpoint.rb +23 -7
- data/lib/advanced_billing/models/endpoint_response.rb +18 -4
- data/lib/advanced_billing/models/errors.rb +19 -5
- data/lib/advanced_billing/models/event.rb +89 -11
- data/lib/advanced_billing/models/event_based_billing_segment_error.rb +18 -4
- data/lib/advanced_billing/models/event_key.rb +264 -0
- data/lib/advanced_billing/models/event_response.rb +17 -4
- data/lib/advanced_billing/models/failed_payment_event.rb +23 -7
- data/lib/advanced_billing/models/failed_payment_event_data.rb +24 -7
- data/lib/advanced_billing/models/full_subscription_group_response.rb +32 -7
- data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +39 -7
- data/lib/advanced_billing/models/get_one_time_token_request.rb +18 -4
- data/lib/advanced_billing/models/group_billing.rb +20 -6
- data/lib/advanced_billing/models/group_settings.rb +19 -5
- data/lib/advanced_billing/models/group_target.rb +19 -5
- data/lib/advanced_billing/models/historic_usage.rb +22 -6
- data/lib/advanced_billing/models/invoice.rb +114 -13
- data/lib/advanced_billing/models/invoice_address.rb +22 -7
- data/lib/advanced_billing/models/invoice_avatax_details.rb +146 -0
- data/lib/advanced_billing/models/invoice_balance_item.rb +20 -6
- data/lib/advanced_billing/models/invoice_credit.rb +26 -7
- data/lib/advanced_billing/models/invoice_custom_field.rb +23 -7
- data/lib/advanced_billing/models/invoice_customer.rb +25 -7
- data/lib/advanced_billing/models/invoice_debit.rb +167 -0
- data/lib/advanced_billing/models/invoice_discount.rb +30 -7
- data/lib/advanced_billing/models/invoice_discount_breakout.rb +21 -6
- data/lib/advanced_billing/models/invoice_display_settings.rb +23 -7
- data/lib/advanced_billing/models/invoice_issued.rb +31 -7
- data/lib/advanced_billing/models/invoice_line_item.rb +55 -8
- data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +17 -4
- data/lib/advanced_billing/models/invoice_line_item_event_data.rb +37 -7
- data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +19 -5
- data/lib/advanced_billing/models/invoice_payer.rb +24 -7
- data/lib/advanced_billing/models/invoice_payer_change.rb +22 -7
- data/lib/advanced_billing/models/invoice_payment.rb +30 -7
- data/lib/advanced_billing/models/invoice_payment_application.rb +21 -6
- data/lib/advanced_billing/models/invoice_payment_method.rb +26 -7
- data/lib/advanced_billing/models/invoice_pre_payment.rb +22 -6
- data/lib/advanced_billing/models/invoice_previous_balance.rb +19 -5
- data/lib/advanced_billing/models/invoice_refund.rb +28 -7
- data/lib/advanced_billing/models/invoice_response.rb +17 -4
- data/lib/advanced_billing/models/invoice_seller.rb +22 -7
- data/lib/advanced_billing/models/invoice_status.rb +4 -1
- data/lib/advanced_billing/models/invoice_tax.rb +31 -7
- data/lib/advanced_billing/models/invoice_tax_breakout.rb +23 -7
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +33 -7
- data/lib/advanced_billing/models/issue_advance_invoice_request.rb +17 -4
- data/lib/advanced_billing/models/issue_invoice_event.rb +23 -7
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +24 -7
- data/lib/advanced_billing/models/issue_invoice_request.rb +18 -4
- data/lib/advanced_billing/models/issue_service_credit.rb +19 -5
- data/lib/advanced_billing/models/issue_service_credit_request.rb +18 -4
- data/lib/advanced_billing/models/item_price_point_changed.rb +25 -7
- data/lib/advanced_billing/models/item_price_point_data.rb +20 -6
- data/lib/advanced_billing/models/list_components_filter.rb +19 -5
- data/lib/advanced_billing/models/list_components_price_points_response.rb +18 -4
- data/lib/advanced_billing/models/list_coupons_filter.rb +26 -7
- data/lib/advanced_billing/models/list_credit_notes_response.rb +18 -4
- data/lib/advanced_billing/models/list_invoice_events_response.rb +22 -7
- data/lib/advanced_billing/models/list_invoices_response.rb +18 -4
- data/lib/advanced_billing/models/list_metafields_response.rb +24 -7
- data/lib/advanced_billing/models/list_mrr_filter.rb +18 -4
- data/lib/advanced_billing/models/list_mrr_response.rb +16 -4
- data/lib/advanced_billing/models/list_mrr_response_result.rb +25 -7
- data/lib/advanced_billing/models/list_offers_response.rb +17 -4
- data/lib/advanced_billing/models/list_prepayments_filter.rb +20 -6
- data/lib/advanced_billing/models/list_price_points_filter.rb +25 -7
- data/lib/advanced_billing/models/list_product_price_points_response.rb +18 -4
- data/lib/advanced_billing/models/list_products_filter.rb +23 -7
- data/lib/advanced_billing/models/list_proforma_invoices_meta.rb +23 -7
- data/lib/advanced_billing/models/list_proforma_invoices_response.rb +19 -5
- data/lib/advanced_billing/models/list_public_keys_meta.rb +23 -7
- data/lib/advanced_billing/models/list_public_keys_response.rb +19 -5
- data/lib/advanced_billing/models/list_sale_rep_item.rb +23 -7
- data/lib/advanced_billing/models/list_segments_filter.rb +26 -7
- data/lib/advanced_billing/models/list_segments_response.rb +18 -4
- data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +28 -7
- data/lib/advanced_billing/models/list_subscription_components_filter.rb +19 -5
- data/lib/advanced_billing/models/list_subscription_components_for_site_filter.rb +22 -6
- data/lib/advanced_billing/models/list_subscription_components_response.rb +18 -4
- data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +18 -4
- data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +18 -4
- data/lib/advanced_billing/models/list_subscription_groups_item.rb +30 -7
- data/lib/advanced_billing/models/list_subscription_groups_meta.rb +19 -5
- data/lib/advanced_billing/models/list_subscription_groups_response.rb +19 -5
- data/lib/advanced_billing/models/metadata.rb +24 -7
- data/lib/advanced_billing/models/metafield.rb +23 -7
- data/lib/advanced_billing/models/metafield_scope.rb +24 -7
- data/lib/advanced_billing/models/metered_component.rb +49 -51
- data/lib/advanced_billing/models/metered_usage.rb +25 -7
- data/lib/advanced_billing/models/movement.rb +28 -7
- data/lib/advanced_billing/models/movement_line_item.rb +26 -7
- data/lib/advanced_billing/models/mrr.rb +25 -7
- data/lib/advanced_billing/models/mrr_movement.rb +23 -7
- data/lib/advanced_billing/models/mrr_response.rb +16 -4
- data/lib/advanced_billing/models/multi_invoice_payment.rb +23 -7
- data/lib/advanced_billing/models/multi_invoice_payment_response.rb +17 -4
- data/lib/advanced_billing/models/nested_subscription_group.rb +23 -7
- data/lib/advanced_billing/models/net_terms.rb +28 -7
- data/lib/advanced_billing/models/offer.rb +37 -7
- data/lib/advanced_billing/models/offer_discount.rb +21 -6
- data/lib/advanced_billing/models/offer_item.rb +29 -7
- data/lib/advanced_billing/models/offer_response.rb +17 -4
- data/lib/advanced_billing/models/offer_signup_page.rb +24 -7
- data/lib/advanced_billing/models/{reason_codes_json_response.rb → ok_response.rb} +19 -7
- data/lib/advanced_billing/models/on_off_component.rb +66 -61
- data/lib/advanced_billing/models/organization_address.rb +24 -7
- data/lib/advanced_billing/models/origin_invoice.rb +19 -5
- data/lib/advanced_billing/models/overage_pricing.rb +19 -5
- data/lib/advanced_billing/models/override_subscription.rb +26 -7
- data/lib/advanced_billing/models/override_subscription_request.rb +18 -4
- data/lib/advanced_billing/models/paginated_metadata.rb +24 -7
- data/lib/advanced_billing/models/paid_invoice.rb +22 -7
- data/lib/advanced_billing/models/pause_request.rb +17 -4
- data/lib/advanced_billing/models/payer_attributes.rb +31 -7
- data/lib/advanced_billing/models/payer_error.rb +20 -6
- data/lib/advanced_billing/models/payment_collection_method_changed.rb +19 -5
- data/lib/advanced_billing/models/payment_for_allocation.rb +22 -7
- data/lib/advanced_billing/models/payment_method_apple_pay.rb +17 -4
- data/lib/advanced_billing/models/payment_method_bank_account.rb +22 -6
- data/lib/advanced_billing/models/payment_method_credit_card.rb +24 -7
- data/lib/advanced_billing/models/payment_method_external.rb +22 -7
- data/lib/advanced_billing/models/payment_method_paypal.rb +19 -5
- data/lib/advanced_billing/models/payment_profile_attributes.rb +42 -7
- data/lib/advanced_billing/models/payment_profile_response.rb +18 -4
- data/lib/advanced_billing/models/payment_related_events.rb +19 -5
- data/lib/advanced_billing/models/paypal_payment_profile.rb +35 -7
- data/lib/advanced_billing/models/pending_cancellation_change.rb +19 -5
- data/lib/advanced_billing/models/portal_management_link.rb +25 -7
- data/lib/advanced_billing/models/prepaid_configuration.rb +27 -7
- data/lib/advanced_billing/models/prepaid_configuration_response.rb +18 -4
- data/lib/advanced_billing/models/prepaid_product_price_point_filter.rb +18 -4
- data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +26 -7
- data/lib/advanced_billing/models/prepaid_usage.rb +32 -7
- data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +21 -6
- data/lib/advanced_billing/models/prepaid_usage_component.rb +83 -41
- data/lib/advanced_billing/models/prepayment.rb +28 -7
- data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +25 -7
- data/lib/advanced_billing/models/prepayment_response.rb +18 -4
- data/lib/advanced_billing/models/prepayments_response.rb +18 -4
- data/lib/advanced_billing/models/preview_allocations_request.rb +24 -7
- data/lib/advanced_billing/models/price.rb +22 -6
- data/lib/advanced_billing/models/product.rb +62 -7
- data/lib/advanced_billing/models/product_family.rb +24 -7
- data/lib/advanced_billing/models/product_family_response.rb +18 -4
- data/lib/advanced_billing/models/product_price_point.rb +44 -7
- data/lib/advanced_billing/models/product_price_point_errors.rb +24 -7
- data/lib/advanced_billing/models/product_price_point_response.rb +18 -4
- data/lib/advanced_billing/models/product_response.rb +17 -4
- data/lib/advanced_billing/models/proforma_error.rb +18 -4
- data/lib/advanced_billing/models/proforma_invoice.rb +49 -7
- data/lib/advanced_billing/models/proforma_invoice_credit.rb +22 -7
- data/lib/advanced_billing/models/proforma_invoice_discount.rb +26 -7
- data/lib/advanced_billing/models/proforma_invoice_issued.rb +28 -7
- data/lib/advanced_billing/models/proforma_invoice_payment.rb +23 -7
- data/lib/advanced_billing/models/proforma_invoice_tax.rb +25 -7
- data/lib/advanced_billing/models/proration.rb +18 -4
- data/lib/advanced_billing/models/public_key.rb +22 -6
- data/lib/advanced_billing/models/public_signup_page.rb +22 -7
- data/lib/advanced_billing/models/quantity_based_component.rb +51 -23
- data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +19 -5
- data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +28 -7
- data/lib/advanced_billing/models/reactivate_subscription_request.rb +26 -7
- data/lib/advanced_billing/models/reactivation_billing.rb +18 -4
- data/lib/advanced_billing/models/reason_code.rb +24 -7
- data/lib/advanced_billing/models/reason_code_response.rb +18 -4
- data/lib/advanced_billing/models/record_payment_request.rb +17 -4
- data/lib/advanced_billing/models/record_payment_response.rb +19 -5
- data/lib/advanced_billing/models/referral_code.rb +22 -7
- data/lib/advanced_billing/models/referral_validation_response.rb +18 -4
- data/lib/advanced_billing/models/refund_consolidated_invoice.rb +24 -7
- data/lib/advanced_billing/models/refund_invoice.rb +24 -7
- data/lib/advanced_billing/models/refund_invoice_event.rb +23 -7
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +28 -7
- data/lib/advanced_billing/models/refund_invoice_request.rb +17 -4
- data/lib/advanced_billing/models/refund_prepayment.rb +22 -7
- data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +17 -4
- data/lib/advanced_billing/models/refund_prepayment_request.rb +17 -4
- data/lib/advanced_billing/models/refund_success.rb +22 -6
- data/lib/advanced_billing/models/remove_payment_event.rb +23 -7
- data/lib/advanced_billing/models/remove_payment_event_data.rb +26 -7
- data/lib/advanced_billing/models/renewal_preview.rb +30 -7
- data/lib/advanced_billing/models/renewal_preview_component.rb +21 -6
- data/lib/advanced_billing/models/renewal_preview_line_item.rb +34 -7
- data/lib/advanced_billing/models/renewal_preview_request.rb +18 -4
- data/lib/advanced_billing/models/renewal_preview_response.rb +18 -4
- data/lib/advanced_billing/models/replay_webhooks_request.rb +16 -4
- data/lib/advanced_billing/models/replay_webhooks_response.rb +17 -4
- data/lib/advanced_billing/models/resent_invitation.rb +26 -7
- data/lib/advanced_billing/models/resume_options.rb +19 -5
- data/lib/advanced_billing/models/revoked_invitation.rb +22 -6
- data/lib/advanced_billing/models/sale_rep.rb +23 -7
- data/lib/advanced_billing/models/sale_rep_item_mrr.rb +20 -6
- data/lib/advanced_billing/models/sale_rep_settings.rb +26 -7
- data/lib/advanced_billing/models/sale_rep_subscription.rb +26 -7
- data/lib/advanced_billing/models/segment.rb +33 -7
- data/lib/advanced_billing/models/segment_price.rb +26 -7
- data/lib/advanced_billing/models/segment_response.rb +17 -4
- data/lib/advanced_billing/models/send_invoice_request.rb +22 -6
- data/lib/advanced_billing/models/service_credit.rb +24 -7
- data/lib/advanced_billing/models/service_credit_response.rb +18 -4
- data/lib/advanced_billing/models/signup_proforma_preview.rb +21 -5
- data/lib/advanced_billing/models/signup_proforma_preview_response.rb +18 -4
- data/lib/advanced_billing/models/site.rb +56 -7
- data/lib/advanced_billing/models/site_response.rb +17 -4
- data/lib/advanced_billing/models/site_statistics.rb +35 -7
- data/lib/advanced_billing/models/site_summary.rb +23 -7
- data/lib/advanced_billing/models/subscription.rb +91 -7
- data/lib/advanced_billing/models/subscription_component.rb +50 -7
- data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +19 -5
- data/lib/advanced_billing/models/subscription_component_response.rb +18 -4
- data/lib/advanced_billing/models/subscription_component_subscription.rb +19 -5
- data/lib/advanced_billing/models/subscription_custom_price.rb +34 -7
- data/lib/advanced_billing/models/subscription_filter.rb +24 -7
- data/lib/advanced_billing/models/subscription_group.rb +25 -7
- data/lib/advanced_billing/models/subscription_group_balances.rb +23 -7
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +35 -7
- data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +21 -6
- data/lib/advanced_billing/models/subscription_group_credit_card.rb +37 -7
- data/lib/advanced_billing/models/subscription_group_customer.rb +23 -7
- data/lib/advanced_billing/models/subscription_group_item.rb +30 -7
- data/lib/advanced_billing/models/subscription_group_members_array_error.rb +17 -4
- data/lib/advanced_billing/models/subscription_group_payment_profile.rb +23 -7
- data/lib/advanced_billing/models/subscription_group_prepayment.rb +22 -7
- data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +18 -4
- data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +24 -7
- data/lib/advanced_billing/models/subscription_group_response.rb +18 -4
- data/lib/advanced_billing/models/subscription_group_signup.rb +29 -7
- data/lib/advanced_billing/models/subscription_group_signup_component.rb +24 -7
- data/lib/advanced_billing/models/subscription_group_signup_error.rb +25 -7
- data/lib/advanced_billing/models/{subscription_group_signup_success.rb → subscription_group_signup_event_data.rb} +31 -15
- data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +29 -7
- data/lib/advanced_billing/models/subscription_group_signup_item.rb +31 -7
- data/lib/advanced_billing/models/subscription_group_signup_request.rb +18 -4
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +31 -7
- data/lib/advanced_billing/models/subscription_group_single_error.rb +18 -4
- data/lib/advanced_billing/models/subscription_group_subscription_error.rb +31 -7
- data/lib/advanced_billing/models/subscription_group_update_error.rb +19 -15
- data/lib/advanced_billing/models/subscription_included_coupon.rb +25 -7
- data/lib/advanced_billing/models/subscription_migration_preview.rb +25 -7
- data/lib/advanced_billing/models/subscription_migration_preview_options.rb +30 -7
- data/lib/advanced_billing/models/subscription_migration_preview_request.rb +18 -4
- data/lib/advanced_billing/models/subscription_migration_preview_response.rb +18 -4
- data/lib/advanced_billing/models/subscription_mrr.rb +22 -6
- data/lib/advanced_billing/models/subscription_mrr_breakout.rb +20 -5
- data/lib/advanced_billing/models/subscription_mrr_response.rb +18 -4
- data/lib/advanced_billing/models/subscription_note.rb +24 -7
- data/lib/advanced_billing/models/subscription_note_response.rb +17 -4
- data/lib/advanced_billing/models/subscription_preview.rb +21 -5
- data/lib/advanced_billing/models/subscription_preview_response.rb +18 -4
- data/lib/advanced_billing/models/subscription_product_change.rb +19 -5
- data/lib/advanced_billing/models/subscription_product_migration.rb +30 -7
- data/lib/advanced_billing/models/subscription_product_migration_request.rb +18 -4
- data/lib/advanced_billing/models/subscription_response.rb +18 -4
- data/lib/advanced_billing/models/subscription_state_change.rb +21 -5
- data/lib/advanced_billing/models/tax_configuration.rb +22 -6
- data/lib/advanced_billing/models/too_many_management_link_requests.rb +19 -5
- data/lib/advanced_billing/models/update_allocation_expiration_date.rb +18 -4
- data/lib/advanced_billing/models/update_component.rb +27 -7
- data/lib/advanced_billing/models/update_component_price_point.rb +26 -7
- data/lib/advanced_billing/models/update_component_price_point_request.rb +18 -4
- data/lib/advanced_billing/models/update_component_request.rb +18 -4
- data/lib/advanced_billing/models/update_coupon_currency.rb +19 -5
- data/lib/advanced_billing/models/update_currency_price.rb +20 -6
- data/lib/advanced_billing/models/update_currency_prices_request.rb +18 -4
- data/lib/advanced_billing/models/update_customer.rb +33 -7
- data/lib/advanced_billing/models/update_customer_request.rb +18 -4
- data/lib/advanced_billing/models/update_metadata.rb +20 -6
- data/lib/advanced_billing/models/update_metadata_request.rb +18 -4
- data/lib/advanced_billing/models/update_metafield.rb +23 -7
- data/lib/advanced_billing/models/update_metafields_request.rb +18 -4
- data/lib/advanced_billing/models/update_payment_profile.rb +30 -7
- data/lib/advanced_billing/models/update_payment_profile_request.rb +18 -4
- data/lib/advanced_billing/models/update_price.rb +23 -7
- data/lib/advanced_billing/models/update_product_price_point.rb +19 -5
- data/lib/advanced_billing/models/update_product_price_point_request.rb +18 -4
- data/lib/advanced_billing/models/update_reason_code.rb +20 -6
- data/lib/advanced_billing/models/update_reason_code_request.rb +18 -4
- data/lib/advanced_billing/models/update_segment.rb +19 -5
- data/lib/advanced_billing/models/update_segment_request.rb +17 -4
- data/lib/advanced_billing/models/update_subscription.rb +45 -8
- data/lib/advanced_billing/models/update_subscription_component.rb +19 -5
- data/lib/advanced_billing/models/update_subscription_group.rb +18 -4
- data/lib/advanced_billing/models/update_subscription_group_request.rb +18 -4
- data/lib/advanced_billing/models/update_subscription_note.rb +19 -5
- data/lib/advanced_billing/models/update_subscription_note_request.rb +17 -4
- data/lib/advanced_billing/models/update_subscription_request.rb +18 -4
- data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +27 -7
- data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +18 -4
- data/lib/advanced_billing/models/usage.rb +26 -7
- data/lib/advanced_billing/models/usage_response.rb +17 -4
- data/lib/advanced_billing/models/void_invoice.rb +17 -4
- data/lib/advanced_billing/models/void_invoice_event.rb +23 -7
- data/lib/advanced_billing/models/void_invoice_event_data.rb +25 -7
- data/lib/advanced_billing/models/void_invoice_request.rb +17 -4
- data/lib/advanced_billing/models/void_remainder_event.rb +23 -7
- data/lib/advanced_billing/models/void_remainder_event_data.rb +23 -7
- data/lib/advanced_billing/models/webhook.rb +29 -7
- data/lib/advanced_billing/models/webhook_response.rb +17 -4
- data/lib/advanced_billing/utilities/file_wrapper.rb +14 -2
- data/lib/advanced_billing/utilities/union_type_lookup.rb +12 -33
- data/lib/advanced_billing.rb +9 -11
- metadata +12 -14
- data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +0 -249
- data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +0 -250
- data/lib/advanced_billing/models/event_type.rb +0 -121
- data/lib/advanced_billing/models/prepaid_component_price_point.rb +0 -123
- data/lib/advanced_billing/models/subscription_group_member_error.rb +0 -78
- data/lib/advanced_billing/models/subscription_group_signup_failure.rb +0 -93
- data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +0 -185
@@ -1,250 +0,0 @@
|
|
1
|
-
# advanced_billing
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
require 'date'
|
7
|
-
module AdvancedBilling
|
8
|
-
# CreateOrUpdatePercentageCoupon Model.
|
9
|
-
class CreateOrUpdatePercentageCoupon < BaseModel
|
10
|
-
SKIP = Object.new
|
11
|
-
private_constant :SKIP
|
12
|
-
|
13
|
-
# the name of the coupon
|
14
|
-
# @return [String]
|
15
|
-
attr_accessor :name
|
16
|
-
|
17
|
-
# may contain uppercase alphanumeric characters and these special characters
|
18
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
19
|
-
# “.”
|
20
|
-
# @return [String]
|
21
|
-
attr_accessor :code
|
22
|
-
|
23
|
-
# may contain uppercase alphanumeric characters and these special characters
|
24
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
25
|
-
# “.”
|
26
|
-
# @return [String]
|
27
|
-
attr_accessor :description
|
28
|
-
|
29
|
-
# may contain uppercase alphanumeric characters and these special characters
|
30
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
31
|
-
# “.”
|
32
|
-
# @return [Object]
|
33
|
-
attr_accessor :percentage
|
34
|
-
|
35
|
-
# may contain uppercase alphanumeric characters and these special characters
|
36
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
37
|
-
# “.”
|
38
|
-
# @return [TrueClass | FalseClass]
|
39
|
-
attr_accessor :allow_negative_balance
|
40
|
-
|
41
|
-
# may contain uppercase alphanumeric characters and these special characters
|
42
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
43
|
-
# “.”
|
44
|
-
# @return [TrueClass | FalseClass]
|
45
|
-
attr_accessor :recurring
|
46
|
-
|
47
|
-
# may contain uppercase alphanumeric characters and these special characters
|
48
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
49
|
-
# “.”
|
50
|
-
# @return [DateTime]
|
51
|
-
attr_accessor :end_date
|
52
|
-
|
53
|
-
# may contain uppercase alphanumeric characters and these special characters
|
54
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
55
|
-
# “.”
|
56
|
-
# @return [String]
|
57
|
-
attr_accessor :product_family_id
|
58
|
-
|
59
|
-
# may contain uppercase alphanumeric characters and these special characters
|
60
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
61
|
-
# “.”
|
62
|
-
# @return [TrueClass | FalseClass]
|
63
|
-
attr_accessor :stackable
|
64
|
-
|
65
|
-
# may contain uppercase alphanumeric characters and these special characters
|
66
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
67
|
-
# “.”
|
68
|
-
# @return [CompoundingStrategy]
|
69
|
-
attr_accessor :compounding_strategy
|
70
|
-
|
71
|
-
# may contain uppercase alphanumeric characters and these special characters
|
72
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
73
|
-
# “.”
|
74
|
-
# @return [TrueClass | FalseClass]
|
75
|
-
attr_accessor :exclude_mid_period_allocations
|
76
|
-
|
77
|
-
# may contain uppercase alphanumeric characters and these special characters
|
78
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
79
|
-
# “.”
|
80
|
-
# @return [TrueClass | FalseClass]
|
81
|
-
attr_accessor :apply_on_cancel_at_end_of_period
|
82
|
-
|
83
|
-
# may contain uppercase alphanumeric characters and these special characters
|
84
|
-
# (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and
|
85
|
-
# “.”
|
86
|
-
# @return [TrueClass | FalseClass]
|
87
|
-
attr_accessor :apply_on_subscription_expiration
|
88
|
-
|
89
|
-
# A mapping from model property names to API property names.
|
90
|
-
def self.names
|
91
|
-
@_hash = {} if @_hash.nil?
|
92
|
-
@_hash['name'] = 'name'
|
93
|
-
@_hash['code'] = 'code'
|
94
|
-
@_hash['description'] = 'description'
|
95
|
-
@_hash['percentage'] = 'percentage'
|
96
|
-
@_hash['allow_negative_balance'] = 'allow_negative_balance'
|
97
|
-
@_hash['recurring'] = 'recurring'
|
98
|
-
@_hash['end_date'] = 'end_date'
|
99
|
-
@_hash['product_family_id'] = 'product_family_id'
|
100
|
-
@_hash['stackable'] = 'stackable'
|
101
|
-
@_hash['compounding_strategy'] = 'compounding_strategy'
|
102
|
-
@_hash['exclude_mid_period_allocations'] =
|
103
|
-
'exclude_mid_period_allocations'
|
104
|
-
@_hash['apply_on_cancel_at_end_of_period'] =
|
105
|
-
'apply_on_cancel_at_end_of_period'
|
106
|
-
@_hash['apply_on_subscription_expiration'] =
|
107
|
-
'apply_on_subscription_expiration'
|
108
|
-
@_hash
|
109
|
-
end
|
110
|
-
|
111
|
-
# An array for optional fields
|
112
|
-
def self.optionals
|
113
|
-
%w[
|
114
|
-
description
|
115
|
-
allow_negative_balance
|
116
|
-
recurring
|
117
|
-
end_date
|
118
|
-
product_family_id
|
119
|
-
stackable
|
120
|
-
compounding_strategy
|
121
|
-
exclude_mid_period_allocations
|
122
|
-
apply_on_cancel_at_end_of_period
|
123
|
-
apply_on_subscription_expiration
|
124
|
-
]
|
125
|
-
end
|
126
|
-
|
127
|
-
# An array for nullable fields
|
128
|
-
def self.nullables
|
129
|
-
[]
|
130
|
-
end
|
131
|
-
|
132
|
-
def initialize(name:, code:, percentage:, description: SKIP,
|
133
|
-
allow_negative_balance: SKIP, recurring: SKIP,
|
134
|
-
end_date: SKIP, product_family_id: SKIP, stackable: SKIP,
|
135
|
-
compounding_strategy: SKIP,
|
136
|
-
exclude_mid_period_allocations: SKIP,
|
137
|
-
apply_on_cancel_at_end_of_period: SKIP,
|
138
|
-
apply_on_subscription_expiration: SKIP,
|
139
|
-
additional_properties: {})
|
140
|
-
@name = name
|
141
|
-
@code = code
|
142
|
-
@description = description unless description == SKIP
|
143
|
-
@percentage = percentage
|
144
|
-
@allow_negative_balance = allow_negative_balance unless allow_negative_balance == SKIP
|
145
|
-
@recurring = recurring unless recurring == SKIP
|
146
|
-
@end_date = end_date unless end_date == SKIP
|
147
|
-
@product_family_id = product_family_id unless product_family_id == SKIP
|
148
|
-
@stackable = stackable unless stackable == SKIP
|
149
|
-
@compounding_strategy = compounding_strategy unless compounding_strategy == SKIP
|
150
|
-
unless exclude_mid_period_allocations == SKIP
|
151
|
-
@exclude_mid_period_allocations =
|
152
|
-
exclude_mid_period_allocations
|
153
|
-
end
|
154
|
-
unless apply_on_cancel_at_end_of_period == SKIP
|
155
|
-
@apply_on_cancel_at_end_of_period =
|
156
|
-
apply_on_cancel_at_end_of_period
|
157
|
-
end
|
158
|
-
unless apply_on_subscription_expiration == SKIP
|
159
|
-
@apply_on_subscription_expiration =
|
160
|
-
apply_on_subscription_expiration
|
161
|
-
end
|
162
|
-
|
163
|
-
# Add additional model properties to the instance.
|
164
|
-
additional_properties.each do |_name, _value|
|
165
|
-
instance_variable_set("@#{_name}", _value)
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
|
-
# Creates an instance of the object from a hash.
|
170
|
-
def self.from_hash(hash)
|
171
|
-
return nil unless hash
|
172
|
-
|
173
|
-
# Extract variables from the hash.
|
174
|
-
name = hash.key?('name') ? hash['name'] : nil
|
175
|
-
code = hash.key?('code') ? hash['code'] : nil
|
176
|
-
percentage = hash.key?('percentage') ? APIHelper.deserialize_union_type(
|
177
|
-
UnionTypeLookUp.get(:CreateOrUpdatePercentageCouponPercentage), hash['percentage']
|
178
|
-
) : nil
|
179
|
-
description = hash.key?('description') ? hash['description'] : SKIP
|
180
|
-
allow_negative_balance =
|
181
|
-
hash.key?('allow_negative_balance') ? hash['allow_negative_balance'] : SKIP
|
182
|
-
recurring = hash.key?('recurring') ? hash['recurring'] : SKIP
|
183
|
-
end_date = if hash.key?('end_date')
|
184
|
-
(DateTimeHelper.from_rfc3339(hash['end_date']) if hash['end_date'])
|
185
|
-
else
|
186
|
-
SKIP
|
187
|
-
end
|
188
|
-
product_family_id =
|
189
|
-
hash.key?('product_family_id') ? hash['product_family_id'] : SKIP
|
190
|
-
stackable = hash.key?('stackable') ? hash['stackable'] : SKIP
|
191
|
-
compounding_strategy =
|
192
|
-
hash.key?('compounding_strategy') ? hash['compounding_strategy'] : SKIP
|
193
|
-
exclude_mid_period_allocations =
|
194
|
-
hash.key?('exclude_mid_period_allocations') ? hash['exclude_mid_period_allocations'] : SKIP
|
195
|
-
apply_on_cancel_at_end_of_period =
|
196
|
-
hash.key?('apply_on_cancel_at_end_of_period') ? hash['apply_on_cancel_at_end_of_period'] : SKIP
|
197
|
-
apply_on_subscription_expiration =
|
198
|
-
hash.key?('apply_on_subscription_expiration') ? hash['apply_on_subscription_expiration'] : SKIP
|
199
|
-
|
200
|
-
# Clean out expected properties from Hash.
|
201
|
-
names.each_value { |k| hash.delete(k) }
|
202
|
-
|
203
|
-
# Create object from extracted values.
|
204
|
-
CreateOrUpdatePercentageCoupon.new(name: name,
|
205
|
-
code: code,
|
206
|
-
percentage: percentage,
|
207
|
-
description: description,
|
208
|
-
allow_negative_balance: allow_negative_balance,
|
209
|
-
recurring: recurring,
|
210
|
-
end_date: end_date,
|
211
|
-
product_family_id: product_family_id,
|
212
|
-
stackable: stackable,
|
213
|
-
compounding_strategy: compounding_strategy,
|
214
|
-
exclude_mid_period_allocations: exclude_mid_period_allocations,
|
215
|
-
apply_on_cancel_at_end_of_period: apply_on_cancel_at_end_of_period,
|
216
|
-
apply_on_subscription_expiration: apply_on_subscription_expiration,
|
217
|
-
additional_properties: hash)
|
218
|
-
end
|
219
|
-
|
220
|
-
def to_custom_end_date
|
221
|
-
DateTimeHelper.to_rfc3339(end_date)
|
222
|
-
end
|
223
|
-
|
224
|
-
# Validates an instance of the object from a given value.
|
225
|
-
# @param [CreateOrUpdatePercentageCoupon | Hash] The value against the validation is performed.
|
226
|
-
def self.validate(value)
|
227
|
-
if value.instance_of? self
|
228
|
-
return (
|
229
|
-
APIHelper.valid_type?(value.name,
|
230
|
-
->(val) { val.instance_of? String }) and
|
231
|
-
APIHelper.valid_type?(value.code,
|
232
|
-
->(val) { val.instance_of? String }) and
|
233
|
-
UnionTypeLookUp.get(:CreateOrUpdatePercentageCouponPercentage)
|
234
|
-
.validate(value.percentage)
|
235
|
-
)
|
236
|
-
end
|
237
|
-
|
238
|
-
return false unless value.instance_of? Hash
|
239
|
-
|
240
|
-
(
|
241
|
-
APIHelper.valid_type?(value['name'],
|
242
|
-
->(val) { val.instance_of? String }) and
|
243
|
-
APIHelper.valid_type?(value['code'],
|
244
|
-
->(val) { val.instance_of? String }) and
|
245
|
-
UnionTypeLookUp.get(:CreateOrUpdatePercentageCouponPercentage)
|
246
|
-
.validate(value['percentage'])
|
247
|
-
)
|
248
|
-
end
|
249
|
-
end
|
250
|
-
end
|
@@ -1,121 +0,0 @@
|
|
1
|
-
# advanced_billing
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module AdvancedBilling
|
7
|
-
# Event Type.
|
8
|
-
class EventType
|
9
|
-
EVENT_TYPE = [
|
10
|
-
# TODO: Write general description for ACCOUNT_TRANSACTION_CHANGED
|
11
|
-
ACCOUNT_TRANSACTION_CHANGED = 'account_transaction_changed'.freeze,
|
12
|
-
|
13
|
-
# TODO: Write general description for BILLING_DATE_CHANGE
|
14
|
-
BILLING_DATE_CHANGE = 'billing_date_change'.freeze,
|
15
|
-
|
16
|
-
# TODO: Write general description for COMPONENT_ALLOCATION_CHANGE
|
17
|
-
COMPONENT_ALLOCATION_CHANGE = 'component_allocation_change'.freeze,
|
18
|
-
|
19
|
-
# TODO: Write general description for CUSTOMER_UPDATE
|
20
|
-
CUSTOMER_UPDATE = 'customer_update'.freeze,
|
21
|
-
|
22
|
-
# TODO: Write general description for CUSTOMER_CREATE
|
23
|
-
CUSTOMER_CREATE = 'customer_create'.freeze,
|
24
|
-
|
25
|
-
# TODO: Write general description for DUNNING_STEP_REACHED
|
26
|
-
DUNNING_STEP_REACHED = 'dunning_step_reached'.freeze,
|
27
|
-
|
28
|
-
# TODO: Write general description for EXPIRATION_DATE_CHANGE
|
29
|
-
EXPIRATION_DATE_CHANGE = 'expiration_date_change'.freeze,
|
30
|
-
|
31
|
-
# TODO: Write general description for EXPIRING_CARD
|
32
|
-
EXPIRING_CARD = 'expiring_card'.freeze,
|
33
|
-
|
34
|
-
# TODO: Write general description for METERED_USAGE
|
35
|
-
METERED_USAGE = 'metered_usage'.freeze,
|
36
|
-
|
37
|
-
# TODO: Write general description for PAYMENT_SUCCESS
|
38
|
-
PAYMENT_SUCCESS = 'payment_success'.freeze,
|
39
|
-
|
40
|
-
# TODO: Write general description for PAYMENT_SUCCESS_RECREATED
|
41
|
-
PAYMENT_SUCCESS_RECREATED = 'payment_success_recreated'.freeze,
|
42
|
-
|
43
|
-
# TODO: Write general description for PAYMENT_FAILURE
|
44
|
-
PAYMENT_FAILURE = 'payment_failure'.freeze,
|
45
|
-
|
46
|
-
# TODO: Write general description for PAYMENT_FAILURE_RECREATED
|
47
|
-
PAYMENT_FAILURE_RECREATED = 'payment_failure_recreated'.freeze,
|
48
|
-
|
49
|
-
# TODO: Write general description for REFUND_FAILURE
|
50
|
-
REFUND_FAILURE = 'refund_failure'.freeze,
|
51
|
-
|
52
|
-
# TODO: Write general description for REFUND_SUCCESS
|
53
|
-
REFUND_SUCCESS = 'refund_success'.freeze,
|
54
|
-
|
55
|
-
# TODO: Write general description for RENEWAL_SUCCESS
|
56
|
-
RENEWAL_SUCCESS = 'renewal_success'.freeze,
|
57
|
-
|
58
|
-
# TODO: Write general description for RENEWAL_SUCCESS_RECREATED
|
59
|
-
RENEWAL_SUCCESS_RECREATED = 'renewal_success_recreated'.freeze,
|
60
|
-
|
61
|
-
# TODO: Write general description for RENEWAL_FAILURE
|
62
|
-
RENEWAL_FAILURE = 'renewal_failure'.freeze,
|
63
|
-
|
64
|
-
# TODO: Write general description for SIGNUP_SUCCESS
|
65
|
-
SIGNUP_SUCCESS = 'signup_success'.freeze,
|
66
|
-
|
67
|
-
# TODO: Write general description for SIGNUP_FAILURE
|
68
|
-
SIGNUP_FAILURE = 'signup_failure'.freeze,
|
69
|
-
|
70
|
-
# TODO: Write general description for STATEMENT_CLOSED
|
71
|
-
STATEMENT_CLOSED = 'statement_closed'.freeze,
|
72
|
-
|
73
|
-
# TODO: Write general description for STATEMENT_SETTLED
|
74
|
-
STATEMENT_SETTLED = 'statement_settled'.freeze,
|
75
|
-
|
76
|
-
# TODO: Write general description for SUBSCRIPTION_BANK_ACCOUNT_UPDATE
|
77
|
-
SUBSCRIPTION_BANK_ACCOUNT_UPDATE = 'subscription_bank_account_update'.freeze,
|
78
|
-
|
79
|
-
# TODO: Write general description for SUBSCRIPTION_DELETION
|
80
|
-
SUBSCRIPTION_DELETION = 'subscription_deletion'.freeze,
|
81
|
-
|
82
|
-
# TODO: Write general description for SUBSCRIPTION_PAYPAL_ACCOUNT_UPDATE
|
83
|
-
SUBSCRIPTION_PAYPAL_ACCOUNT_UPDATE = 'subscription_paypal_account_update'.freeze,
|
84
|
-
|
85
|
-
# TODO: Write general description for SUBSCRIPTION_PRODUCT_CHANGE
|
86
|
-
SUBSCRIPTION_PRODUCT_CHANGE = 'subscription_product_change'.freeze,
|
87
|
-
|
88
|
-
# TODO: Write general description for SUBSCRIPTION_STATE_CHANGE
|
89
|
-
SUBSCRIPTION_STATE_CHANGE = 'subscription_state_change'.freeze,
|
90
|
-
|
91
|
-
# TODO: Write general description for TRIAL_END_NOTICE
|
92
|
-
TRIAL_END_NOTICE = 'trial_end_notice'.freeze,
|
93
|
-
|
94
|
-
# TODO: Write general description for UPGRADE_DOWNGRADE_SUCCESS
|
95
|
-
UPGRADE_DOWNGRADE_SUCCESS = 'upgrade_downgrade_success'.freeze,
|
96
|
-
|
97
|
-
# TODO: Write general description for UPGRADE_DOWNGRADE_FAILURE
|
98
|
-
UPGRADE_DOWNGRADE_FAILURE = 'upgrade_downgrade_failure'.freeze,
|
99
|
-
|
100
|
-
# TODO: Write general description for UPCOMING_RENEWAL_NOTICE
|
101
|
-
UPCOMING_RENEWAL_NOTICE = 'upcoming_renewal_notice'.freeze,
|
102
|
-
|
103
|
-
# TODO: Write general description for CUSTOM_FIELD_VALUE_CHANGE
|
104
|
-
CUSTOM_FIELD_VALUE_CHANGE = 'custom_field_value_change'.freeze,
|
105
|
-
|
106
|
-
# TODO: Write general description for
|
107
|
-
# SUBSCRIPTION_PREPAYMENT_ACCOUNT_BALANCE_CHANGED
|
108
|
-
SUBSCRIPTION_PREPAYMENT_ACCOUNT_BALANCE_CHANGED = 'subscription_prepayment_account_balance_changed'.freeze,
|
109
|
-
|
110
|
-
# TODO: Write general description for
|
111
|
-
# SUBSCRIPTION_SERVICE_CREDIT_ACCOUNT_BALANCE_CHANGED
|
112
|
-
SUBSCRIPTION_SERVICE_CREDIT_ACCOUNT_BALANCE_CHANGED = 'subscription_service_credit_account_balance_changed'.freeze
|
113
|
-
].freeze
|
114
|
-
|
115
|
-
def self.validate(value)
|
116
|
-
return false if value.nil?
|
117
|
-
|
118
|
-
EVENT_TYPE.include?(value)
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|
@@ -1,123 +0,0 @@
|
|
1
|
-
# advanced_billing
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module AdvancedBilling
|
7
|
-
# PrepaidComponentPricePoint Model.
|
8
|
-
class PrepaidComponentPricePoint < BaseModel
|
9
|
-
SKIP = Object.new
|
10
|
-
private_constant :SKIP
|
11
|
-
|
12
|
-
# TODO: Write general description for this method
|
13
|
-
# @return [String]
|
14
|
-
attr_accessor :name
|
15
|
-
|
16
|
-
# TODO: Write general description for this method
|
17
|
-
# @return [String]
|
18
|
-
attr_accessor :handle
|
19
|
-
|
20
|
-
# The identifier for the pricing scheme. See [Product
|
21
|
-
# Components](https://help.chargify.com/products/product-components.html)
|
22
|
-
# for an overview of pricing schemes.
|
23
|
-
# @return [PricingScheme]
|
24
|
-
attr_accessor :pricing_scheme
|
25
|
-
|
26
|
-
# The identifier for the pricing scheme. See [Product
|
27
|
-
# Components](https://help.chargify.com/products/product-components.html)
|
28
|
-
# for an overview of pricing schemes.
|
29
|
-
# @return [Array[Price]]
|
30
|
-
attr_accessor :prices
|
31
|
-
|
32
|
-
# The identifier for the pricing scheme. See [Product
|
33
|
-
# Components](https://help.chargify.com/products/product-components.html)
|
34
|
-
# for an overview of pricing schemes.
|
35
|
-
# @return [OveragePricing]
|
36
|
-
attr_accessor :overage_pricing
|
37
|
-
|
38
|
-
# A mapping from model property names to API property names.
|
39
|
-
def self.names
|
40
|
-
@_hash = {} if @_hash.nil?
|
41
|
-
@_hash['name'] = 'name'
|
42
|
-
@_hash['handle'] = 'handle'
|
43
|
-
@_hash['pricing_scheme'] = 'pricing_scheme'
|
44
|
-
@_hash['prices'] = 'prices'
|
45
|
-
@_hash['overage_pricing'] = 'overage_pricing'
|
46
|
-
@_hash
|
47
|
-
end
|
48
|
-
|
49
|
-
# An array for optional fields
|
50
|
-
def self.optionals
|
51
|
-
%w[
|
52
|
-
name
|
53
|
-
handle
|
54
|
-
pricing_scheme
|
55
|
-
prices
|
56
|
-
overage_pricing
|
57
|
-
]
|
58
|
-
end
|
59
|
-
|
60
|
-
# An array for nullable fields
|
61
|
-
def self.nullables
|
62
|
-
[]
|
63
|
-
end
|
64
|
-
|
65
|
-
def initialize(name: SKIP, handle: SKIP, pricing_scheme: SKIP, prices: SKIP,
|
66
|
-
overage_pricing: SKIP, additional_properties: {})
|
67
|
-
@name = name unless name == SKIP
|
68
|
-
@handle = handle unless handle == SKIP
|
69
|
-
@pricing_scheme = pricing_scheme unless pricing_scheme == SKIP
|
70
|
-
@prices = prices unless prices == SKIP
|
71
|
-
@overage_pricing = overage_pricing unless overage_pricing == SKIP
|
72
|
-
|
73
|
-
# Add additional model properties to the instance.
|
74
|
-
additional_properties.each do |_name, _value|
|
75
|
-
instance_variable_set("@#{_name}", _value)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
# Creates an instance of the object from a hash.
|
80
|
-
def self.from_hash(hash)
|
81
|
-
return nil unless hash
|
82
|
-
|
83
|
-
# Extract variables from the hash.
|
84
|
-
name = hash.key?('name') ? hash['name'] : SKIP
|
85
|
-
handle = hash.key?('handle') ? hash['handle'] : SKIP
|
86
|
-
pricing_scheme =
|
87
|
-
hash.key?('pricing_scheme') ? hash['pricing_scheme'] : SKIP
|
88
|
-
# Parameter is an array, so we need to iterate through it
|
89
|
-
prices = nil
|
90
|
-
unless hash['prices'].nil?
|
91
|
-
prices = []
|
92
|
-
hash['prices'].each do |structure|
|
93
|
-
prices << (Price.from_hash(structure) if structure)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
prices = SKIP unless hash.key?('prices')
|
98
|
-
overage_pricing = OveragePricing.from_hash(hash['overage_pricing']) if
|
99
|
-
hash['overage_pricing']
|
100
|
-
|
101
|
-
# Clean out expected properties from Hash.
|
102
|
-
names.each_value { |k| hash.delete(k) }
|
103
|
-
|
104
|
-
# Create object from extracted values.
|
105
|
-
PrepaidComponentPricePoint.new(name: name,
|
106
|
-
handle: handle,
|
107
|
-
pricing_scheme: pricing_scheme,
|
108
|
-
prices: prices,
|
109
|
-
overage_pricing: overage_pricing,
|
110
|
-
additional_properties: hash)
|
111
|
-
end
|
112
|
-
|
113
|
-
# Validates an instance of the object from a given value.
|
114
|
-
# @param [PrepaidComponentPricePoint | Hash] The value against the validation is performed.
|
115
|
-
def self.validate(value)
|
116
|
-
return true if value.instance_of? self
|
117
|
-
|
118
|
-
return false unless value.instance_of? Hash
|
119
|
-
|
120
|
-
true
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# advanced_billing
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module AdvancedBilling
|
7
|
-
# SubscriptionGroupMemberError Model.
|
8
|
-
class SubscriptionGroupMemberError < BaseModel
|
9
|
-
SKIP = Object.new
|
10
|
-
private_constant :SKIP
|
11
|
-
|
12
|
-
# TODO: Write general description for this method
|
13
|
-
# @return [Integer]
|
14
|
-
attr_accessor :id
|
15
|
-
|
16
|
-
# TODO: Write general description for this method
|
17
|
-
# @return [String]
|
18
|
-
attr_accessor :type
|
19
|
-
|
20
|
-
# TODO: Write general description for this method
|
21
|
-
# @return [String]
|
22
|
-
attr_accessor :message
|
23
|
-
|
24
|
-
# A mapping from model property names to API property names.
|
25
|
-
def self.names
|
26
|
-
@_hash = {} if @_hash.nil?
|
27
|
-
@_hash['id'] = 'id'
|
28
|
-
@_hash['type'] = 'type'
|
29
|
-
@_hash['message'] = 'message'
|
30
|
-
@_hash
|
31
|
-
end
|
32
|
-
|
33
|
-
# An array for optional fields
|
34
|
-
def self.optionals
|
35
|
-
%w[
|
36
|
-
id
|
37
|
-
type
|
38
|
-
message
|
39
|
-
]
|
40
|
-
end
|
41
|
-
|
42
|
-
# An array for nullable fields
|
43
|
-
def self.nullables
|
44
|
-
[]
|
45
|
-
end
|
46
|
-
|
47
|
-
def initialize(id: SKIP, type: SKIP, message: SKIP,
|
48
|
-
additional_properties: {})
|
49
|
-
@id = id unless id == SKIP
|
50
|
-
@type = type unless type == SKIP
|
51
|
-
@message = message unless message == SKIP
|
52
|
-
|
53
|
-
# Add additional model properties to the instance.
|
54
|
-
additional_properties.each do |_name, _value|
|
55
|
-
instance_variable_set("@#{_name}", _value)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
# Creates an instance of the object from a hash.
|
60
|
-
def self.from_hash(hash)
|
61
|
-
return nil unless hash
|
62
|
-
|
63
|
-
# Extract variables from the hash.
|
64
|
-
id = hash.key?('id') ? hash['id'] : SKIP
|
65
|
-
type = hash.key?('type') ? hash['type'] : SKIP
|
66
|
-
message = hash.key?('message') ? hash['message'] : SKIP
|
67
|
-
|
68
|
-
# Clean out expected properties from Hash.
|
69
|
-
names.each_value { |k| hash.delete(k) }
|
70
|
-
|
71
|
-
# Create object from extracted values.
|
72
|
-
SubscriptionGroupMemberError.new(id: id,
|
73
|
-
type: type,
|
74
|
-
message: message,
|
75
|
-
additional_properties: hash)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
@@ -1,93 +0,0 @@
|
|
1
|
-
# advanced_billing
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module AdvancedBilling
|
7
|
-
# SubscriptionGroupSignupFailure Model.
|
8
|
-
class SubscriptionGroupSignupFailure < BaseModel
|
9
|
-
SKIP = Object.new
|
10
|
-
private_constant :SKIP
|
11
|
-
|
12
|
-
# TODO: Write general description for this method
|
13
|
-
# @return [SubscriptionGroupSignupFailureData]
|
14
|
-
attr_accessor :subscription_group
|
15
|
-
|
16
|
-
# TODO: Write general description for this method
|
17
|
-
# @return [String]
|
18
|
-
attr_accessor :customer
|
19
|
-
|
20
|
-
# A mapping from model property names to API property names.
|
21
|
-
def self.names
|
22
|
-
@_hash = {} if @_hash.nil?
|
23
|
-
@_hash['subscription_group'] = 'subscription_group'
|
24
|
-
@_hash['customer'] = 'customer'
|
25
|
-
@_hash
|
26
|
-
end
|
27
|
-
|
28
|
-
# An array for optional fields
|
29
|
-
def self.optionals
|
30
|
-
[]
|
31
|
-
end
|
32
|
-
|
33
|
-
# An array for nullable fields
|
34
|
-
def self.nullables
|
35
|
-
%w[
|
36
|
-
customer
|
37
|
-
]
|
38
|
-
end
|
39
|
-
|
40
|
-
def initialize(subscription_group:, customer:, additional_properties: {})
|
41
|
-
@subscription_group = subscription_group
|
42
|
-
@customer = customer
|
43
|
-
|
44
|
-
# Add additional model properties to the instance.
|
45
|
-
additional_properties.each do |_name, _value|
|
46
|
-
instance_variable_set("@#{_name}", _value)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
# Creates an instance of the object from a hash.
|
51
|
-
def self.from_hash(hash)
|
52
|
-
return nil unless hash
|
53
|
-
|
54
|
-
# Extract variables from the hash.
|
55
|
-
if hash['subscription_group']
|
56
|
-
subscription_group = SubscriptionGroupSignupFailureData.from_hash(hash['subscription_group'])
|
57
|
-
end
|
58
|
-
customer = hash.key?('customer') ? hash['customer'] : nil
|
59
|
-
|
60
|
-
# Clean out expected properties from Hash.
|
61
|
-
names.each_value { |k| hash.delete(k) }
|
62
|
-
|
63
|
-
# Create object from extracted values.
|
64
|
-
SubscriptionGroupSignupFailure.new(subscription_group: subscription_group,
|
65
|
-
customer: customer,
|
66
|
-
additional_properties: hash)
|
67
|
-
end
|
68
|
-
|
69
|
-
# Validates an instance of the object from a given value.
|
70
|
-
# @param [SubscriptionGroupSignupFailure | Hash] The value against the validation is performed.
|
71
|
-
def self.validate(value)
|
72
|
-
if value.instance_of? self
|
73
|
-
return (
|
74
|
-
APIHelper.valid_type?(value.subscription_group,
|
75
|
-
->(val) { SubscriptionGroupSignupFailureData.validate(val) },
|
76
|
-
is_model_hash: true) and
|
77
|
-
APIHelper.valid_type?(value.customer,
|
78
|
-
->(val) { val.instance_of? String })
|
79
|
-
)
|
80
|
-
end
|
81
|
-
|
82
|
-
return false unless value.instance_of? Hash
|
83
|
-
|
84
|
-
(
|
85
|
-
APIHelper.valid_type?(value['subscription_group'],
|
86
|
-
->(val) { SubscriptionGroupSignupFailureData.validate(val) },
|
87
|
-
is_model_hash: true) and
|
88
|
-
APIHelper.valid_type?(value['customer'],
|
89
|
-
->(val) { val.instance_of? String })
|
90
|
-
)
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|