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
@@ -40,13 +40,13 @@ module AdvancedBilling
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def initialize(captured_at: SKIP, invoices: SKIP, additional_properties: {})
|
43
|
-
@captured_at = captured_at unless captured_at == SKIP
|
44
|
-
@invoices = invoices unless invoices == SKIP
|
45
|
-
|
46
43
|
# Add additional model properties to the instance.
|
47
44
|
additional_properties.each do |_name, _value|
|
48
45
|
instance_variable_set("@#{_name}", _value)
|
49
46
|
end
|
47
|
+
|
48
|
+
@captured_at = captured_at unless captured_at == SKIP
|
49
|
+
@invoices = invoices unless invoices == SKIP
|
50
50
|
end
|
51
51
|
|
52
52
|
# Creates an instance of the object from a hash.
|
@@ -71,12 +71,12 @@ module AdvancedBilling
|
|
71
71
|
invoices = SKIP unless hash.key?('invoices')
|
72
72
|
|
73
73
|
# Clean out expected properties from Hash.
|
74
|
-
|
74
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
75
75
|
|
76
76
|
# Create object from extracted values.
|
77
77
|
InvoicePreviousBalance.new(captured_at: captured_at,
|
78
78
|
invoices: invoices,
|
79
|
-
additional_properties:
|
79
|
+
additional_properties: additional_properties)
|
80
80
|
end
|
81
81
|
|
82
82
|
def to_custom_captured_at
|
@@ -92,5 +92,19 @@ module AdvancedBilling
|
|
92
92
|
|
93
93
|
true
|
94
94
|
end
|
95
|
+
|
96
|
+
# Provides a human-readable string representation of the object.
|
97
|
+
def to_s
|
98
|
+
class_name = self.class.name.split('::').last
|
99
|
+
"<#{class_name} captured_at: #{@captured_at}, invoices: #{@invoices},"\
|
100
|
+
" additional_properties: #{get_additional_properties}>"
|
101
|
+
end
|
102
|
+
|
103
|
+
# Provides a debugging-friendly string with detailed object information.
|
104
|
+
def inspect
|
105
|
+
class_name = self.class.name.split('::').last
|
106
|
+
"<#{class_name} captured_at: #{@captured_at.inspect}, invoices: #{@invoices.inspect},"\
|
107
|
+
" additional_properties: #{get_additional_properties}>"
|
108
|
+
end
|
95
109
|
end
|
96
110
|
end
|
@@ -89,6 +89,11 @@ module AdvancedBilling
|
|
89
89
|
gateway_transaction_id: SKIP, gateway_used: SKIP,
|
90
90
|
gateway_handle: SKIP, ach_late_reject: SKIP,
|
91
91
|
additional_properties: {})
|
92
|
+
# Add additional model properties to the instance.
|
93
|
+
additional_properties.each do |_name, _value|
|
94
|
+
instance_variable_set("@#{_name}", _value)
|
95
|
+
end
|
96
|
+
|
92
97
|
@transaction_id = transaction_id unless transaction_id == SKIP
|
93
98
|
@payment_id = payment_id unless payment_id == SKIP
|
94
99
|
@memo = memo unless memo == SKIP
|
@@ -98,11 +103,6 @@ module AdvancedBilling
|
|
98
103
|
@gateway_used = gateway_used unless gateway_used == SKIP
|
99
104
|
@gateway_handle = gateway_handle unless gateway_handle == SKIP
|
100
105
|
@ach_late_reject = ach_late_reject unless ach_late_reject == SKIP
|
101
|
-
|
102
|
-
# Add additional model properties to the instance.
|
103
|
-
additional_properties.each do |_name, _value|
|
104
|
-
instance_variable_set("@#{_name}", _value)
|
105
|
-
end
|
106
106
|
end
|
107
107
|
|
108
108
|
# Creates an instance of the object from a hash.
|
@@ -127,7 +127,7 @@ module AdvancedBilling
|
|
127
127
|
hash.key?('ach_late_reject') ? hash['ach_late_reject'] : SKIP
|
128
128
|
|
129
129
|
# Clean out expected properties from Hash.
|
130
|
-
|
130
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
131
131
|
|
132
132
|
# Create object from extracted values.
|
133
133
|
InvoiceRefund.new(transaction_id: transaction_id,
|
@@ -139,7 +139,7 @@ module AdvancedBilling
|
|
139
139
|
gateway_used: gateway_used,
|
140
140
|
gateway_handle: gateway_handle,
|
141
141
|
ach_late_reject: ach_late_reject,
|
142
|
-
additional_properties:
|
142
|
+
additional_properties: additional_properties)
|
143
143
|
end
|
144
144
|
|
145
145
|
# Validates an instance of the object from a given value.
|
@@ -151,5 +151,26 @@ module AdvancedBilling
|
|
151
151
|
|
152
152
|
true
|
153
153
|
end
|
154
|
+
|
155
|
+
# Provides a human-readable string representation of the object.
|
156
|
+
def to_s
|
157
|
+
class_name = self.class.name.split('::').last
|
158
|
+
"<#{class_name} transaction_id: #{@transaction_id}, payment_id: #{@payment_id}, memo:"\
|
159
|
+
" #{@memo}, original_amount: #{@original_amount}, applied_amount: #{@applied_amount},"\
|
160
|
+
" gateway_transaction_id: #{@gateway_transaction_id}, gateway_used: #{@gateway_used},"\
|
161
|
+
" gateway_handle: #{@gateway_handle}, ach_late_reject: #{@ach_late_reject},"\
|
162
|
+
" additional_properties: #{get_additional_properties}>"
|
163
|
+
end
|
164
|
+
|
165
|
+
# Provides a debugging-friendly string with detailed object information.
|
166
|
+
def inspect
|
167
|
+
class_name = self.class.name.split('::').last
|
168
|
+
"<#{class_name} transaction_id: #{@transaction_id.inspect}, payment_id:"\
|
169
|
+
" #{@payment_id.inspect}, memo: #{@memo.inspect}, original_amount:"\
|
170
|
+
" #{@original_amount.inspect}, applied_amount: #{@applied_amount.inspect},"\
|
171
|
+
" gateway_transaction_id: #{@gateway_transaction_id.inspect}, gateway_used:"\
|
172
|
+
" #{@gateway_used.inspect}, gateway_handle: #{@gateway_handle.inspect}, ach_late_reject:"\
|
173
|
+
" #{@ach_late_reject.inspect}, additional_properties: #{get_additional_properties}>"
|
174
|
+
end
|
154
175
|
end
|
155
176
|
end
|
@@ -31,12 +31,12 @@ module AdvancedBilling
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def initialize(invoice:, additional_properties: {})
|
34
|
-
@invoice = invoice
|
35
|
-
|
36
34
|
# Add additional model properties to the instance.
|
37
35
|
additional_properties.each do |_name, _value|
|
38
36
|
instance_variable_set("@#{_name}", _value)
|
39
37
|
end
|
38
|
+
|
39
|
+
@invoice = invoice
|
40
40
|
end
|
41
41
|
|
42
42
|
# Creates an instance of the object from a hash.
|
@@ -47,11 +47,24 @@ module AdvancedBilling
|
|
47
47
|
invoice = Invoice.from_hash(hash['invoice']) if hash['invoice']
|
48
48
|
|
49
49
|
# Clean out expected properties from Hash.
|
50
|
-
|
50
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
51
51
|
|
52
52
|
# Create object from extracted values.
|
53
53
|
InvoiceResponse.new(invoice: invoice,
|
54
|
-
additional_properties:
|
54
|
+
additional_properties: additional_properties)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Provides a human-readable string representation of the object.
|
58
|
+
def to_s
|
59
|
+
class_name = self.class.name.split('::').last
|
60
|
+
"<#{class_name} invoice: #{@invoice}, additional_properties: #{get_additional_properties}>"
|
61
|
+
end
|
62
|
+
|
63
|
+
# Provides a debugging-friendly string with detailed object information.
|
64
|
+
def inspect
|
65
|
+
class_name = self.class.name.split('::').last
|
66
|
+
"<#{class_name} invoice: #{@invoice.inspect}, additional_properties:"\
|
67
|
+
" #{get_additional_properties}>"
|
55
68
|
end
|
56
69
|
end
|
57
70
|
end
|
@@ -55,15 +55,15 @@ module AdvancedBilling
|
|
55
55
|
|
56
56
|
def initialize(name: SKIP, address: SKIP, phone: SKIP, logo_url: SKIP,
|
57
57
|
additional_properties: {})
|
58
|
-
@name = name unless name == SKIP
|
59
|
-
@address = address unless address == SKIP
|
60
|
-
@phone = phone unless phone == SKIP
|
61
|
-
@logo_url = logo_url unless logo_url == SKIP
|
62
|
-
|
63
58
|
# Add additional model properties to the instance.
|
64
59
|
additional_properties.each do |_name, _value|
|
65
60
|
instance_variable_set("@#{_name}", _value)
|
66
61
|
end
|
62
|
+
|
63
|
+
@name = name unless name == SKIP
|
64
|
+
@address = address unless address == SKIP
|
65
|
+
@phone = phone unless phone == SKIP
|
66
|
+
@logo_url = logo_url unless logo_url == SKIP
|
67
67
|
end
|
68
68
|
|
69
69
|
# Creates an instance of the object from a hash.
|
@@ -77,14 +77,14 @@ module AdvancedBilling
|
|
77
77
|
logo_url = hash.key?('logo_url') ? hash['logo_url'] : SKIP
|
78
78
|
|
79
79
|
# Clean out expected properties from Hash.
|
80
|
-
|
80
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
81
81
|
|
82
82
|
# Create object from extracted values.
|
83
83
|
InvoiceSeller.new(name: name,
|
84
84
|
address: address,
|
85
85
|
phone: phone,
|
86
86
|
logo_url: logo_url,
|
87
|
-
additional_properties:
|
87
|
+
additional_properties: additional_properties)
|
88
88
|
end
|
89
89
|
|
90
90
|
# Validates an instance of the object from a given value.
|
@@ -96,5 +96,20 @@ module AdvancedBilling
|
|
96
96
|
|
97
97
|
true
|
98
98
|
end
|
99
|
+
|
100
|
+
# Provides a human-readable string representation of the object.
|
101
|
+
def to_s
|
102
|
+
class_name = self.class.name.split('::').last
|
103
|
+
"<#{class_name} name: #{@name}, address: #{@address}, phone: #{@phone}, logo_url:"\
|
104
|
+
" #{@logo_url}, additional_properties: #{get_additional_properties}>"
|
105
|
+
end
|
106
|
+
|
107
|
+
# Provides a debugging-friendly string with detailed object information.
|
108
|
+
def inspect
|
109
|
+
class_name = self.class.name.split('::').last
|
110
|
+
"<#{class_name} name: #{@name.inspect}, address: #{@address.inspect}, phone:"\
|
111
|
+
" #{@phone.inspect}, logo_url: #{@logo_url.inspect}, additional_properties:"\
|
112
|
+
" #{get_additional_properties}>"
|
113
|
+
end
|
99
114
|
end
|
100
115
|
end
|
@@ -25,7 +25,10 @@ module AdvancedBilling
|
|
25
25
|
VOIDED = 'voided'.freeze,
|
26
26
|
|
27
27
|
# TODO: Write general description for CANCELED
|
28
|
-
CANCELED = 'canceled'.freeze
|
28
|
+
CANCELED = 'canceled'.freeze,
|
29
|
+
|
30
|
+
# TODO: Write general description for PROCESSING
|
31
|
+
PROCESSING = 'processing'.freeze
|
29
32
|
].freeze
|
30
33
|
|
31
34
|
def self.validate(value)
|
@@ -118,6 +118,11 @@ module AdvancedBilling
|
|
118
118
|
line_item_breakouts: SKIP, tax_component_breakouts: SKIP,
|
119
119
|
eu_vat: SKIP, type: SKIP, tax_exempt_amount: SKIP,
|
120
120
|
additional_properties: {})
|
121
|
+
# Add additional model properties to the instance.
|
122
|
+
additional_properties.each do |_name, _value|
|
123
|
+
instance_variable_set("@#{_name}", _value)
|
124
|
+
end
|
125
|
+
|
121
126
|
@uid = uid unless uid == SKIP
|
122
127
|
@title = title unless title == SKIP
|
123
128
|
@description = description unless description == SKIP
|
@@ -132,11 +137,6 @@ module AdvancedBilling
|
|
132
137
|
@eu_vat = eu_vat unless eu_vat == SKIP
|
133
138
|
@type = type unless type == SKIP
|
134
139
|
@tax_exempt_amount = tax_exempt_amount unless tax_exempt_amount == SKIP
|
135
|
-
|
136
|
-
# Add additional model properties to the instance.
|
137
|
-
additional_properties.each do |_name, _value|
|
138
|
-
instance_variable_set("@#{_name}", _value)
|
139
|
-
end
|
140
140
|
end
|
141
141
|
|
142
142
|
# Creates an instance of the object from a hash.
|
@@ -181,7 +181,7 @@ module AdvancedBilling
|
|
181
181
|
hash.key?('tax_exempt_amount') ? hash['tax_exempt_amount'] : SKIP
|
182
182
|
|
183
183
|
# Clean out expected properties from Hash.
|
184
|
-
|
184
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
185
185
|
|
186
186
|
# Create object from extracted values.
|
187
187
|
InvoiceTax.new(uid: uid,
|
@@ -198,7 +198,7 @@ module AdvancedBilling
|
|
198
198
|
eu_vat: eu_vat,
|
199
199
|
type: type,
|
200
200
|
tax_exempt_amount: tax_exempt_amount,
|
201
|
-
additional_properties:
|
201
|
+
additional_properties: additional_properties)
|
202
202
|
end
|
203
203
|
|
204
204
|
# Validates an instance of the object from a given value.
|
@@ -210,5 +210,29 @@ module AdvancedBilling
|
|
210
210
|
|
211
211
|
true
|
212
212
|
end
|
213
|
+
|
214
|
+
# Provides a human-readable string representation of the object.
|
215
|
+
def to_s
|
216
|
+
class_name = self.class.name.split('::').last
|
217
|
+
"<#{class_name} uid: #{@uid}, title: #{@title}, description: #{@description}, source_type:"\
|
218
|
+
" #{@source_type}, source_id: #{@source_id}, percentage: #{@percentage}, taxable_amount:"\
|
219
|
+
" #{@taxable_amount}, tax_amount: #{@tax_amount}, transaction_id: #{@transaction_id},"\
|
220
|
+
" line_item_breakouts: #{@line_item_breakouts}, tax_component_breakouts:"\
|
221
|
+
" #{@tax_component_breakouts}, eu_vat: #{@eu_vat}, type: #{@type}, tax_exempt_amount:"\
|
222
|
+
" #{@tax_exempt_amount}, additional_properties: #{get_additional_properties}>"
|
223
|
+
end
|
224
|
+
|
225
|
+
# Provides a debugging-friendly string with detailed object information.
|
226
|
+
def inspect
|
227
|
+
class_name = self.class.name.split('::').last
|
228
|
+
"<#{class_name} uid: #{@uid.inspect}, title: #{@title.inspect}, description:"\
|
229
|
+
" #{@description.inspect}, source_type: #{@source_type.inspect}, source_id:"\
|
230
|
+
" #{@source_id.inspect}, percentage: #{@percentage.inspect}, taxable_amount:"\
|
231
|
+
" #{@taxable_amount.inspect}, tax_amount: #{@tax_amount.inspect}, transaction_id:"\
|
232
|
+
" #{@transaction_id.inspect}, line_item_breakouts: #{@line_item_breakouts.inspect},"\
|
233
|
+
" tax_component_breakouts: #{@tax_component_breakouts.inspect}, eu_vat: #{@eu_vat.inspect},"\
|
234
|
+
" type: #{@type.inspect}, tax_exempt_amount: #{@tax_exempt_amount.inspect},"\
|
235
|
+
" additional_properties: #{get_additional_properties}>"
|
236
|
+
end
|
213
237
|
end
|
214
238
|
end
|
@@ -52,15 +52,15 @@ module AdvancedBilling
|
|
52
52
|
|
53
53
|
def initialize(uid: SKIP, taxable_amount: SKIP, tax_amount: SKIP,
|
54
54
|
tax_exempt_amount: SKIP, additional_properties: {})
|
55
|
-
@uid = uid unless uid == SKIP
|
56
|
-
@taxable_amount = taxable_amount unless taxable_amount == SKIP
|
57
|
-
@tax_amount = tax_amount unless tax_amount == SKIP
|
58
|
-
@tax_exempt_amount = tax_exempt_amount unless tax_exempt_amount == SKIP
|
59
|
-
|
60
55
|
# Add additional model properties to the instance.
|
61
56
|
additional_properties.each do |_name, _value|
|
62
57
|
instance_variable_set("@#{_name}", _value)
|
63
58
|
end
|
59
|
+
|
60
|
+
@uid = uid unless uid == SKIP
|
61
|
+
@taxable_amount = taxable_amount unless taxable_amount == SKIP
|
62
|
+
@tax_amount = tax_amount unless tax_amount == SKIP
|
63
|
+
@tax_exempt_amount = tax_exempt_amount unless tax_exempt_amount == SKIP
|
64
64
|
end
|
65
65
|
|
66
66
|
# Creates an instance of the object from a hash.
|
@@ -76,14 +76,14 @@ module AdvancedBilling
|
|
76
76
|
hash.key?('tax_exempt_amount') ? hash['tax_exempt_amount'] : SKIP
|
77
77
|
|
78
78
|
# Clean out expected properties from Hash.
|
79
|
-
|
79
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
80
80
|
|
81
81
|
# Create object from extracted values.
|
82
82
|
InvoiceTaxBreakout.new(uid: uid,
|
83
83
|
taxable_amount: taxable_amount,
|
84
84
|
tax_amount: tax_amount,
|
85
85
|
tax_exempt_amount: tax_exempt_amount,
|
86
|
-
additional_properties:
|
86
|
+
additional_properties: additional_properties)
|
87
87
|
end
|
88
88
|
|
89
89
|
# Validates an instance of the object from a given value.
|
@@ -95,5 +95,21 @@ module AdvancedBilling
|
|
95
95
|
|
96
96
|
true
|
97
97
|
end
|
98
|
+
|
99
|
+
# Provides a human-readable string representation of the object.
|
100
|
+
def to_s
|
101
|
+
class_name = self.class.name.split('::').last
|
102
|
+
"<#{class_name} uid: #{@uid}, taxable_amount: #{@taxable_amount}, tax_amount:"\
|
103
|
+
" #{@tax_amount}, tax_exempt_amount: #{@tax_exempt_amount}, additional_properties:"\
|
104
|
+
" #{get_additional_properties}>"
|
105
|
+
end
|
106
|
+
|
107
|
+
# Provides a debugging-friendly string with detailed object information.
|
108
|
+
def inspect
|
109
|
+
class_name = self.class.name.split('::').last
|
110
|
+
"<#{class_name} uid: #{@uid.inspect}, taxable_amount: #{@taxable_amount.inspect},"\
|
111
|
+
" tax_amount: #{@tax_amount.inspect}, tax_exempt_amount: #{@tax_exempt_amount.inspect},"\
|
112
|
+
" additional_properties: #{get_additional_properties}>"
|
113
|
+
end
|
98
114
|
end
|
99
115
|
end
|
@@ -117,6 +117,11 @@ module AdvancedBilling
|
|
117
117
|
rate_type: SKIP, tax_authority_type: SKIP,
|
118
118
|
state_assigned_no: SKIP, tax_sub_type: SKIP,
|
119
119
|
additional_properties: {})
|
120
|
+
# Add additional model properties to the instance.
|
121
|
+
additional_properties.each do |_name, _value|
|
122
|
+
instance_variable_set("@#{_name}", _value)
|
123
|
+
end
|
124
|
+
|
120
125
|
@tax_rule_id = tax_rule_id unless tax_rule_id == SKIP
|
121
126
|
@percentage = percentage unless percentage == SKIP
|
122
127
|
@country_code = country_code unless country_code == SKIP
|
@@ -131,11 +136,6 @@ module AdvancedBilling
|
|
131
136
|
@tax_authority_type = tax_authority_type unless tax_authority_type == SKIP
|
132
137
|
@state_assigned_no = state_assigned_no unless state_assigned_no == SKIP
|
133
138
|
@tax_sub_type = tax_sub_type unless tax_sub_type == SKIP
|
134
|
-
|
135
|
-
# Add additional model properties to the instance.
|
136
|
-
additional_properties.each do |_name, _value|
|
137
|
-
instance_variable_set("@#{_name}", _value)
|
138
|
-
end
|
139
139
|
end
|
140
140
|
|
141
141
|
# Creates an instance of the object from a hash.
|
@@ -165,7 +165,7 @@ module AdvancedBilling
|
|
165
165
|
tax_sub_type = hash.key?('tax_sub_type') ? hash['tax_sub_type'] : SKIP
|
166
166
|
|
167
167
|
# Clean out expected properties from Hash.
|
168
|
-
|
168
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
169
169
|
|
170
170
|
# Create object from extracted values.
|
171
171
|
InvoiceTaxComponentBreakout.new(tax_rule_id: tax_rule_id,
|
@@ -182,7 +182,7 @@ module AdvancedBilling
|
|
182
182
|
tax_authority_type: tax_authority_type,
|
183
183
|
state_assigned_no: state_assigned_no,
|
184
184
|
tax_sub_type: tax_sub_type,
|
185
|
-
additional_properties:
|
185
|
+
additional_properties: additional_properties)
|
186
186
|
end
|
187
187
|
|
188
188
|
# Validates an instance of the object from a given value.
|
@@ -194,5 +194,31 @@ module AdvancedBilling
|
|
194
194
|
|
195
195
|
true
|
196
196
|
end
|
197
|
+
|
198
|
+
# Provides a human-readable string representation of the object.
|
199
|
+
def to_s
|
200
|
+
class_name = self.class.name.split('::').last
|
201
|
+
"<#{class_name} tax_rule_id: #{@tax_rule_id}, percentage: #{@percentage}, country_code:"\
|
202
|
+
" #{@country_code}, subdivision_code: #{@subdivision_code}, tax_amount: #{@tax_amount},"\
|
203
|
+
" taxable_amount: #{@taxable_amount}, tax_exempt_amount: #{@tax_exempt_amount},"\
|
204
|
+
" non_taxable_amount: #{@non_taxable_amount}, tax_name: #{@tax_name}, tax_type:"\
|
205
|
+
" #{@tax_type}, rate_type: #{@rate_type}, tax_authority_type: #{@tax_authority_type},"\
|
206
|
+
" state_assigned_no: #{@state_assigned_no}, tax_sub_type: #{@tax_sub_type},"\
|
207
|
+
" additional_properties: #{get_additional_properties}>"
|
208
|
+
end
|
209
|
+
|
210
|
+
# Provides a debugging-friendly string with detailed object information.
|
211
|
+
def inspect
|
212
|
+
class_name = self.class.name.split('::').last
|
213
|
+
"<#{class_name} tax_rule_id: #{@tax_rule_id.inspect}, percentage: #{@percentage.inspect},"\
|
214
|
+
" country_code: #{@country_code.inspect}, subdivision_code: #{@subdivision_code.inspect},"\
|
215
|
+
" tax_amount: #{@tax_amount.inspect}, taxable_amount: #{@taxable_amount.inspect},"\
|
216
|
+
" tax_exempt_amount: #{@tax_exempt_amount.inspect}, non_taxable_amount:"\
|
217
|
+
" #{@non_taxable_amount.inspect}, tax_name: #{@tax_name.inspect}, tax_type:"\
|
218
|
+
" #{@tax_type.inspect}, rate_type: #{@rate_type.inspect}, tax_authority_type:"\
|
219
|
+
" #{@tax_authority_type.inspect}, state_assigned_no: #{@state_assigned_no.inspect},"\
|
220
|
+
" tax_sub_type: #{@tax_sub_type.inspect}, additional_properties:"\
|
221
|
+
" #{get_additional_properties}>"
|
222
|
+
end
|
197
223
|
end
|
198
224
|
end
|
@@ -33,12 +33,12 @@ module AdvancedBilling
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def initialize(force: SKIP, additional_properties: {})
|
36
|
-
@force = force unless force == SKIP
|
37
|
-
|
38
36
|
# Add additional model properties to the instance.
|
39
37
|
additional_properties.each do |_name, _value|
|
40
38
|
instance_variable_set("@#{_name}", _value)
|
41
39
|
end
|
40
|
+
|
41
|
+
@force = force unless force == SKIP
|
42
42
|
end
|
43
43
|
|
44
44
|
# Creates an instance of the object from a hash.
|
@@ -49,11 +49,24 @@ module AdvancedBilling
|
|
49
49
|
force = hash.key?('force') ? hash['force'] : SKIP
|
50
50
|
|
51
51
|
# Clean out expected properties from Hash.
|
52
|
-
|
52
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
53
53
|
|
54
54
|
# Create object from extracted values.
|
55
55
|
IssueAdvanceInvoiceRequest.new(force: force,
|
56
|
-
additional_properties:
|
56
|
+
additional_properties: additional_properties)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Provides a human-readable string representation of the object.
|
60
|
+
def to_s
|
61
|
+
class_name = self.class.name.split('::').last
|
62
|
+
"<#{class_name} force: #{@force}, additional_properties: #{get_additional_properties}>"
|
63
|
+
end
|
64
|
+
|
65
|
+
# Provides a debugging-friendly string with detailed object information.
|
66
|
+
def inspect
|
67
|
+
class_name = self.class.name.split('::').last
|
68
|
+
"<#{class_name} force: #{@force.inspect}, additional_properties:"\
|
69
|
+
" #{get_additional_properties}>"
|
57
70
|
end
|
58
71
|
end
|
59
72
|
end
|
@@ -54,16 +54,16 @@ module AdvancedBilling
|
|
54
54
|
def initialize(id:, timestamp:, invoice:,
|
55
55
|
event_type: InvoiceEventType::ISSUE_INVOICE, event_data:,
|
56
56
|
additional_properties: {})
|
57
|
+
# Add additional model properties to the instance.
|
58
|
+
additional_properties.each do |_name, _value|
|
59
|
+
instance_variable_set("@#{_name}", _value)
|
60
|
+
end
|
61
|
+
|
57
62
|
@id = id
|
58
63
|
@timestamp = timestamp
|
59
64
|
@invoice = invoice
|
60
65
|
@event_type = event_type
|
61
66
|
@event_data = event_data
|
62
|
-
|
63
|
-
# Add additional model properties to the instance.
|
64
|
-
additional_properties.each do |_name, _value|
|
65
|
-
instance_variable_set("@#{_name}", _value)
|
66
|
-
end
|
67
67
|
end
|
68
68
|
|
69
69
|
# Creates an instance of the object from a hash.
|
@@ -80,7 +80,7 @@ module AdvancedBilling
|
|
80
80
|
event_data = IssueInvoiceEventData.from_hash(hash['event_data']) if hash['event_data']
|
81
81
|
|
82
82
|
# Clean out expected properties from Hash.
|
83
|
-
|
83
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
84
84
|
|
85
85
|
# Create object from extracted values.
|
86
86
|
IssueInvoiceEvent.new(id: id,
|
@@ -88,7 +88,7 @@ module AdvancedBilling
|
|
88
88
|
invoice: invoice,
|
89
89
|
event_type: event_type,
|
90
90
|
event_data: event_data,
|
91
|
-
additional_properties:
|
91
|
+
additional_properties: additional_properties)
|
92
92
|
end
|
93
93
|
|
94
94
|
def to_custom_timestamp
|
@@ -132,5 +132,21 @@ module AdvancedBilling
|
|
132
132
|
is_model_hash: true)
|
133
133
|
)
|
134
134
|
end
|
135
|
+
|
136
|
+
# Provides a human-readable string representation of the object.
|
137
|
+
def to_s
|
138
|
+
class_name = self.class.name.split('::').last
|
139
|
+
"<#{class_name} id: #{@id}, timestamp: #{@timestamp}, invoice: #{@invoice}, event_type:"\
|
140
|
+
" #{@event_type}, event_data: #{@event_data}, additional_properties:"\
|
141
|
+
" #{get_additional_properties}>"
|
142
|
+
end
|
143
|
+
|
144
|
+
# Provides a debugging-friendly string with detailed object information.
|
145
|
+
def inspect
|
146
|
+
class_name = self.class.name.split('::').last
|
147
|
+
"<#{class_name} id: #{@id.inspect}, timestamp: #{@timestamp.inspect}, invoice:"\
|
148
|
+
" #{@invoice.inspect}, event_type: #{@event_type.inspect}, event_data:"\
|
149
|
+
" #{@event_data.inspect}, additional_properties: #{get_additional_properties}>"
|
150
|
+
end
|
135
151
|
end
|
136
152
|
end
|
@@ -69,16 +69,16 @@ module AdvancedBilling
|
|
69
69
|
|
70
70
|
def initialize(consolidation_level:, from_status:, to_status:, due_amount:,
|
71
71
|
total_amount:, additional_properties: {})
|
72
|
+
# Add additional model properties to the instance.
|
73
|
+
additional_properties.each do |_name, _value|
|
74
|
+
instance_variable_set("@#{_name}", _value)
|
75
|
+
end
|
76
|
+
|
72
77
|
@consolidation_level = consolidation_level
|
73
78
|
@from_status = from_status
|
74
79
|
@to_status = to_status
|
75
80
|
@due_amount = due_amount
|
76
81
|
@total_amount = total_amount
|
77
|
-
|
78
|
-
# Add additional model properties to the instance.
|
79
|
-
additional_properties.each do |_name, _value|
|
80
|
-
instance_variable_set("@#{_name}", _value)
|
81
|
-
end
|
82
82
|
end
|
83
83
|
|
84
84
|
# Creates an instance of the object from a hash.
|
@@ -94,7 +94,7 @@ module AdvancedBilling
|
|
94
94
|
total_amount = hash.key?('total_amount') ? hash['total_amount'] : nil
|
95
95
|
|
96
96
|
# Clean out expected properties from Hash.
|
97
|
-
|
97
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
98
98
|
|
99
99
|
# Create object from extracted values.
|
100
100
|
IssueInvoiceEventData.new(consolidation_level: consolidation_level,
|
@@ -102,7 +102,7 @@ module AdvancedBilling
|
|
102
102
|
to_status: to_status,
|
103
103
|
due_amount: due_amount,
|
104
104
|
total_amount: total_amount,
|
105
|
-
additional_properties:
|
105
|
+
additional_properties: additional_properties)
|
106
106
|
end
|
107
107
|
|
108
108
|
# Validates an instance of the object from a given value.
|
@@ -138,5 +138,22 @@ module AdvancedBilling
|
|
138
138
|
->(val) { val.instance_of? String })
|
139
139
|
)
|
140
140
|
end
|
141
|
+
|
142
|
+
# Provides a human-readable string representation of the object.
|
143
|
+
def to_s
|
144
|
+
class_name = self.class.name.split('::').last
|
145
|
+
"<#{class_name} consolidation_level: #{@consolidation_level}, from_status: #{@from_status},"\
|
146
|
+
" to_status: #{@to_status}, due_amount: #{@due_amount}, total_amount: #{@total_amount},"\
|
147
|
+
" additional_properties: #{get_additional_properties}>"
|
148
|
+
end
|
149
|
+
|
150
|
+
# Provides a debugging-friendly string with detailed object information.
|
151
|
+
def inspect
|
152
|
+
class_name = self.class.name.split('::').last
|
153
|
+
"<#{class_name} consolidation_level: #{@consolidation_level.inspect}, from_status:"\
|
154
|
+
" #{@from_status.inspect}, to_status: #{@to_status.inspect}, due_amount:"\
|
155
|
+
" #{@due_amount.inspect}, total_amount: #{@total_amount.inspect}, additional_properties:"\
|
156
|
+
" #{get_additional_properties}>"
|
157
|
+
end
|
141
158
|
end
|
142
159
|
end
|
@@ -46,12 +46,12 @@ module AdvancedBilling
|
|
46
46
|
|
47
47
|
def initialize(on_failed_payment: FailedPaymentAction::LEAVE_OPEN_INVOICE,
|
48
48
|
additional_properties: {})
|
49
|
-
@on_failed_payment = on_failed_payment unless on_failed_payment == SKIP
|
50
|
-
|
51
49
|
# Add additional model properties to the instance.
|
52
50
|
additional_properties.each do |_name, _value|
|
53
51
|
instance_variable_set("@#{_name}", _value)
|
54
52
|
end
|
53
|
+
|
54
|
+
@on_failed_payment = on_failed_payment unless on_failed_payment == SKIP
|
55
55
|
end
|
56
56
|
|
57
57
|
# Creates an instance of the object from a hash.
|
@@ -63,11 +63,25 @@ module AdvancedBilling
|
|
63
63
|
hash['on_failed_payment'] ||= FailedPaymentAction::LEAVE_OPEN_INVOICE
|
64
64
|
|
65
65
|
# Clean out expected properties from Hash.
|
66
|
-
|
66
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
67
67
|
|
68
68
|
# Create object from extracted values.
|
69
69
|
IssueInvoiceRequest.new(on_failed_payment: on_failed_payment,
|
70
|
-
additional_properties:
|
70
|
+
additional_properties: additional_properties)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Provides a human-readable string representation of the object.
|
74
|
+
def to_s
|
75
|
+
class_name = self.class.name.split('::').last
|
76
|
+
"<#{class_name} on_failed_payment: #{@on_failed_payment}, additional_properties:"\
|
77
|
+
" #{get_additional_properties}>"
|
78
|
+
end
|
79
|
+
|
80
|
+
# Provides a debugging-friendly string with detailed object information.
|
81
|
+
def inspect
|
82
|
+
class_name = self.class.name.split('::').last
|
83
|
+
"<#{class_name} on_failed_payment: #{@on_failed_payment.inspect}, additional_properties:"\
|
84
|
+
" #{get_additional_properties}>"
|
71
85
|
end
|
72
86
|
end
|
73
87
|
end
|