maxio-advanced-billing-sdk 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +59 -297
- data/lib/advanced_billing/client.rb +21 -22
- data/lib/advanced_billing/configuration.rb +17 -18
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +8 -10
- data/lib/advanced_billing/controllers/api_exports_controller.rb +9 -9
- data/lib/advanced_billing/controllers/base_controller.rb +2 -1
- data/lib/advanced_billing/controllers/billing_portal_controller.rb +4 -4
- data/lib/advanced_billing/controllers/components_controller.rb +22 -22
- data/lib/advanced_billing/controllers/coupons_controller.rb +14 -14
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +9 -9
- data/lib/advanced_billing/controllers/customers_controller.rb +7 -7
- data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +6 -6
- data/lib/advanced_billing/controllers/events_controller.rb +3 -3
- data/lib/advanced_billing/controllers/insights_controller.rb +4 -4
- data/lib/advanced_billing/controllers/invoices_controller.rb +24 -20
- data/lib/advanced_billing/controllers/offers_controller.rb +5 -5
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +12 -12
- data/lib/advanced_billing/controllers/product_families_controller.rb +4 -4
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +11 -11
- data/lib/advanced_billing/controllers/products_controller.rb +6 -6
- data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +44 -25
- data/lib/advanced_billing/controllers/reason_codes_controller.rb +5 -5
- data/lib/advanced_billing/controllers/referral_codes_controller.rb +2 -2
- data/lib/advanced_billing/controllers/sales_commissions_controller.rb +3 -3
- data/lib/advanced_billing/controllers/sites_controller.rb +3 -3
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +37 -31
- data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +4 -4
- data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +4 -4
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +23 -16
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +11 -7
- data/lib/advanced_billing/controllers/subscription_notes_controller.rb +5 -5
- data/lib/advanced_billing/controllers/subscription_products_controller.rb +2 -2
- data/lib/advanced_billing/controllers/subscription_status_controller.rb +10 -10
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +12 -12
- data/lib/advanced_billing/controllers/webhooks_controller.rb +8 -8
- data/lib/advanced_billing/exceptions/subscription_group_create_error_response_exception.rb +34 -0
- data/lib/advanced_billing/http/auth/basic_auth.rb +27 -6
- data/lib/advanced_billing/models/account_balance.rb +44 -3
- data/lib/advanced_billing/models/account_balances.rb +24 -2
- data/lib/advanced_billing/models/ach_agreement.rb +12 -2
- data/lib/advanced_billing/models/activate_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/add_coupons_request.rb +12 -2
- data/lib/advanced_billing/models/add_subscription_to_a_group.rb +12 -2
- data/lib/advanced_billing/models/address_change.rb +12 -2
- data/lib/advanced_billing/models/agreement_acceptance.rb +12 -2
- data/lib/advanced_billing/models/allocate_components.rb +12 -2
- data/lib/advanced_billing/models/allocation.rb +56 -2
- data/lib/advanced_billing/models/allocation_expiration_date.rb +23 -4
- data/lib/advanced_billing/models/allocation_preview.rb +33 -6
- data/lib/advanced_billing/models/allocation_preview_item.rb +12 -2
- data/lib/advanced_billing/models/allocation_preview_line_item.rb +12 -2
- data/lib/advanced_billing/models/allocation_preview_response.rb +12 -2
- data/lib/advanced_billing/models/allocation_response.rb +12 -2
- data/lib/advanced_billing/models/allocation_settings.rb +12 -2
- data/lib/advanced_billing/models/applied_credit_note_data.rb +12 -2
- data/lib/advanced_billing/models/apply_credit_note_event_data.rb +12 -2
- data/lib/advanced_billing/models/apply_debit_note_event_data.rb +12 -2
- data/lib/advanced_billing/models/apply_payment_event_data.rb +12 -2
- data/lib/advanced_billing/models/attribute_error.rb +12 -2
- data/lib/advanced_billing/models/auto_resume.rb +12 -2
- data/lib/advanced_billing/models/bank_account_attributes.rb +12 -2
- data/lib/advanced_billing/models/bank_account_payment_profile.rb +13 -2
- data/lib/advanced_billing/models/bank_account_response.rb +12 -2
- data/lib/advanced_billing/models/bank_account_verification.rb +12 -2
- data/lib/advanced_billing/models/bank_account_verification_request.rb +12 -2
- data/lib/advanced_billing/models/base_refund_error.rb +12 -2
- data/lib/advanced_billing/models/base_string_error.rb +12 -2
- data/lib/advanced_billing/models/batch_job.rb +33 -6
- data/lib/advanced_billing/models/batch_job_response.rb +12 -2
- data/lib/advanced_billing/models/billing_address.rb +12 -2
- data/lib/advanced_billing/models/billing_manifest.rb +33 -6
- data/lib/advanced_billing/models/billing_manifest_item.rb +12 -2
- data/lib/advanced_billing/models/billing_schedule.rb +12 -2
- data/lib/advanced_billing/models/breakouts.rb +12 -2
- data/lib/advanced_billing/models/{bulk_component_s_price_point_assignment.rb → bulk_components_price_point_assignment.rb} +16 -6
- data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +12 -2
- data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +12 -2
- data/lib/advanced_billing/models/bulk_create_segments.rb +12 -2
- data/lib/advanced_billing/models/bulk_update_segments.rb +12 -2
- data/lib/advanced_billing/models/bulk_update_segments_item.rb +12 -2
- data/lib/advanced_billing/models/calendar_billing.rb +12 -2
- data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +12 -2
- data/lib/advanced_billing/models/cancellation_options.rb +12 -2
- data/lib/advanced_billing/models/cancellation_request.rb +12 -2
- data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +12 -2
- data/lib/advanced_billing/models/chargify_ebb.rb +33 -6
- data/lib/advanced_billing/models/component.rb +22 -4
- data/lib/advanced_billing/models/component_allocation_change.rb +12 -2
- data/lib/advanced_billing/models/component_allocation_error_item.rb +12 -2
- data/lib/advanced_billing/models/component_cost_data.rb +12 -2
- data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +12 -2
- data/lib/advanced_billing/models/component_currency_price.rb +12 -2
- data/lib/advanced_billing/models/component_currency_prices_response.rb +12 -2
- data/lib/advanced_billing/models/component_custom_price.rb +12 -2
- data/lib/advanced_billing/models/component_price.rb +12 -2
- data/lib/advanced_billing/models/component_price_point.rb +12 -2
- data/lib/advanced_billing/models/{component_s_price_point_assignment.rb → component_price_point_assignment.rb} +17 -7
- data/lib/advanced_billing/models/component_price_point_error_item.rb +12 -2
- data/lib/advanced_billing/models/component_price_point_item.rb +12 -2
- data/lib/advanced_billing/models/component_price_point_response.rb +12 -2
- data/lib/advanced_billing/models/component_price_points_response.rb +12 -2
- data/lib/advanced_billing/models/component_response.rb +12 -2
- data/lib/advanced_billing/models/consolidated_invoice.rb +12 -2
- data/lib/advanced_billing/models/count_response.rb +12 -2
- data/lib/advanced_billing/models/coupon.rb +78 -12
- data/lib/advanced_billing/models/coupon_currency.rb +12 -2
- data/lib/advanced_billing/models/coupon_currency_request.rb +12 -2
- data/lib/advanced_billing/models/coupon_currency_response.rb +12 -2
- data/lib/advanced_billing/models/coupon_response.rb +12 -2
- data/lib/advanced_billing/models/coupon_restriction.rb +12 -2
- data/lib/advanced_billing/models/coupon_subcodes.rb +12 -2
- data/lib/advanced_billing/models/coupon_subcodes_response.rb +12 -2
- data/lib/advanced_billing/models/coupon_usage.rb +12 -2
- data/lib/advanced_billing/models/create_allocation.rb +12 -2
- data/lib/advanced_billing/models/create_allocation_request.rb +12 -2
- data/lib/advanced_billing/models/create_component_price_point.rb +12 -2
- data/lib/advanced_billing/models/create_component_price_point_request.rb +12 -2
- data/lib/advanced_billing/models/create_component_price_points_request.rb +12 -2
- data/lib/advanced_billing/models/create_currency_price.rb +12 -2
- data/lib/advanced_billing/models/create_currency_prices_request.rb +12 -2
- data/lib/advanced_billing/models/create_customer.rb +12 -2
- data/lib/advanced_billing/models/create_customer_request.rb +12 -2
- data/lib/advanced_billing/models/create_ebb_component.rb +12 -2
- data/lib/advanced_billing/models/create_invoice.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_address.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_coupon.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_item.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_payment.rb +23 -2
- data/lib/advanced_billing/models/create_invoice_payment_application.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_payment_request.rb +12 -2
- data/lib/advanced_billing/models/create_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/create_metadata.rb +12 -2
- data/lib/advanced_billing/models/create_metadata_request.rb +12 -2
- data/lib/advanced_billing/models/create_metafield.rb +12 -2
- data/lib/advanced_billing/models/create_metafields_request.rb +12 -2
- data/lib/advanced_billing/models/create_metered_component.rb +12 -2
- data/lib/advanced_billing/models/create_multi_invoice_payment.rb +12 -2
- data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +12 -2
- data/lib/advanced_billing/models/create_offer.rb +12 -2
- data/lib/advanced_billing/models/create_offer_component.rb +12 -2
- data/lib/advanced_billing/models/create_offer_request.rb +12 -2
- data/lib/advanced_billing/models/create_on_off_component.rb +12 -2
- data/lib/advanced_billing/models/create_or_update_coupon.rb +12 -2
- data/lib/advanced_billing/models/{update_endpoint.rb → create_or_update_endpoint.rb} +14 -4
- data/lib/advanced_billing/models/{update_endpoint_request.rb → create_or_update_endpoint_request.rb} +15 -5
- data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +29 -2
- data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +29 -2
- data/lib/advanced_billing/models/create_or_update_product.rb +86 -4
- data/lib/advanced_billing/models/create_or_update_product_request.rb +12 -2
- data/lib/advanced_billing/models/create_or_update_segment_price.rb +12 -2
- data/lib/advanced_billing/models/create_payment.rb +14 -4
- data/lib/advanced_billing/models/create_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/create_payment_profile_request.rb +12 -2
- data/lib/advanced_billing/models/create_prepaid_component.rb +12 -2
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +12 -2
- data/lib/advanced_billing/models/create_prepayment.rb +13 -3
- data/lib/advanced_billing/models/create_prepayment_method.rb +44 -0
- data/lib/advanced_billing/models/create_prepayment_request.rb +12 -2
- data/lib/advanced_billing/models/create_prepayment_response.rb +12 -2
- data/lib/advanced_billing/models/create_product_currency_price.rb +12 -2
- data/lib/advanced_billing/models/create_product_currency_prices_request.rb +12 -2
- data/lib/advanced_billing/models/create_product_family.rb +12 -2
- data/lib/advanced_billing/models/create_product_family_request.rb +12 -2
- data/lib/advanced_billing/models/create_product_price_point.rb +16 -6
- data/lib/advanced_billing/models/create_product_price_point_request.rb +12 -2
- data/lib/advanced_billing/models/create_quantity_based_component.rb +12 -2
- data/lib/advanced_billing/models/create_reason_code.rb +12 -2
- data/lib/advanced_billing/models/create_reason_code_request.rb +12 -2
- data/lib/advanced_billing/models/create_segment.rb +12 -2
- data/lib/advanced_billing/models/create_segment_request.rb +12 -2
- data/lib/advanced_billing/models/create_signup_proforma_preview_include.rb +20 -0
- data/lib/advanced_billing/models/create_subscription.rb +22 -4
- data/lib/advanced_billing/models/create_subscription_component.rb +12 -2
- data/lib/advanced_billing/models/create_subscription_group.rb +15 -20
- data/lib/advanced_billing/models/create_subscription_group_request.rb +12 -2
- data/lib/advanced_billing/models/create_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/create_usage.rb +12 -2
- data/lib/advanced_billing/models/create_usage_request.rb +12 -2
- data/lib/advanced_billing/models/created_prepayment.rb +23 -4
- data/lib/advanced_billing/models/credit_account_balance_changed.rb +22 -5
- data/lib/advanced_billing/models/credit_card_attributes.rb +12 -2
- data/lib/advanced_billing/models/credit_card_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/credit_note.rb +12 -2
- data/lib/advanced_billing/models/credit_note1.rb +12 -2
- data/lib/advanced_billing/models/credit_note_application.rb +23 -5
- data/lib/advanced_billing/models/credit_note_line_item.rb +38 -4
- data/lib/advanced_billing/models/credit_scheme_request.rb +12 -2
- data/lib/advanced_billing/models/currency_price.rb +12 -2
- data/lib/advanced_billing/models/currency_prices_response.rb +12 -2
- data/lib/advanced_billing/models/custom_field_value_change.rb +12 -2
- data/lib/advanced_billing/models/customer.rb +63 -15
- data/lib/advanced_billing/models/customer1.rb +13 -2
- data/lib/advanced_billing/models/customer_attributes.rb +12 -2
- data/lib/advanced_billing/models/customer_change.rb +12 -2
- data/lib/advanced_billing/models/customer_changes_preview_response.rb +12 -2
- data/lib/advanced_billing/models/customer_custom_fields_change.rb +12 -2
- data/lib/advanced_billing/models/customer_error.rb +12 -2
- data/lib/advanced_billing/models/customer_payer_change.rb +12 -2
- data/lib/advanced_billing/models/customer_response.rb +12 -2
- data/lib/advanced_billing/models/deduct_service_credit.rb +12 -2
- data/lib/advanced_billing/models/deduct_service_credit_request.rb +12 -2
- data/lib/advanced_billing/models/delayed_cancellation_response.rb +12 -2
- data/lib/advanced_billing/models/delete_subscription_group_response.rb +12 -2
- data/lib/advanced_billing/models/dunner_data.rb +29 -7
- data/lib/advanced_billing/models/dunning_step_data.rb +12 -2
- data/lib/advanced_billing/models/dunning_step_reached.rb +12 -2
- data/lib/advanced_billing/models/ebb_component.rb +12 -2
- data/lib/advanced_billing/models/ebb_event.rb +12 -2
- data/lib/advanced_billing/models/enable_webhooks_request.rb +12 -2
- data/lib/advanced_billing/models/enable_webhooks_response.rb +12 -2
- data/lib/advanced_billing/models/endpoint.rb +12 -2
- data/lib/advanced_billing/models/endpoint_response.rb +12 -2
- data/lib/advanced_billing/models/errors.rb +12 -2
- data/lib/advanced_billing/models/event.rb +23 -5
- data/lib/advanced_billing/models/event_based_billing_segment_error.rb +12 -2
- data/lib/advanced_billing/models/event_response.rb +12 -2
- data/lib/advanced_billing/models/full_subscription_group_response.rb +369 -11
- data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/get_one_time_token_request.rb +12 -2
- data/lib/advanced_billing/models/group_billing.rb +12 -2
- data/lib/advanced_billing/models/group_settings.rb +12 -2
- data/lib/advanced_billing/models/group_target.rb +12 -2
- data/lib/advanced_billing/models/group_type.rb +23 -0
- data/lib/advanced_billing/models/invoice.rb +12 -2
- data/lib/advanced_billing/models/invoice_address.rb +12 -2
- data/lib/advanced_billing/models/invoice_balance_item.rb +12 -2
- data/lib/advanced_billing/models/invoice_credit.rb +12 -2
- data/lib/advanced_billing/models/invoice_custom_field.rb +12 -2
- data/lib/advanced_billing/models/invoice_customer.rb +13 -2
- data/lib/advanced_billing/models/invoice_discount.rb +14 -4
- data/lib/advanced_billing/models/invoice_discount_breakout.rb +12 -2
- data/lib/advanced_billing/models/invoice_discount_source_type.rb +26 -0
- data/lib/advanced_billing/models/invoice_discount_type.rb +26 -0
- data/lib/advanced_billing/models/invoice_display_settings.rb +12 -2
- data/lib/advanced_billing/models/invoice_event.rb +23 -4
- data/lib/advanced_billing/models/invoice_event_data.rb +12 -2
- data/lib/advanced_billing/models/invoice_event_payment.rb +12 -2
- data/lib/advanced_billing/models/invoice_event_payment1.rb +12 -2
- data/lib/advanced_billing/models/invoice_issued.rb +27 -15
- data/lib/advanced_billing/models/invoice_line_item.rb +22 -2
- data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +12 -2
- data/lib/advanced_billing/models/invoice_line_item_event_data.rb +12 -2
- data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +12 -2
- data/lib/advanced_billing/models/invoice_payer.rb +12 -2
- data/lib/advanced_billing/models/invoice_payer_change.rb +12 -2
- data/lib/advanced_billing/models/invoice_payment.rb +12 -2
- data/lib/advanced_billing/models/invoice_payment_application.rb +12 -2
- data/lib/advanced_billing/models/invoice_payment_method.rb +12 -2
- data/lib/advanced_billing/models/invoice_pre_payment.rb +25 -5
- data/lib/advanced_billing/models/invoice_previous_balance.rb +12 -2
- data/lib/advanced_billing/models/invoice_refund.rb +34 -2
- data/lib/advanced_billing/models/invoice_response.rb +12 -2
- data/lib/advanced_billing/models/invoice_seller.rb +12 -2
- data/lib/advanced_billing/models/invoice_tax.rb +13 -3
- data/lib/advanced_billing/models/invoice_tax_breakout.rb +23 -2
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +12 -2
- data/lib/advanced_billing/models/issue_advance_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +12 -2
- data/lib/advanced_billing/models/issue_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/issue_service_credit.rb +12 -2
- data/lib/advanced_billing/models/issue_service_credit_request.rb +12 -2
- data/lib/advanced_billing/models/item_price_point_changed.rb +12 -2
- data/lib/advanced_billing/models/item_price_point_data.rb +12 -2
- data/lib/advanced_billing/models/list_components_price_points_response.rb +12 -2
- data/lib/advanced_billing/models/list_credit_notes_response.rb +12 -2
- data/lib/advanced_billing/models/list_invoice_events_response.rb +12 -2
- data/lib/advanced_billing/models/list_invoices_response.rb +12 -2
- data/lib/advanced_billing/models/list_metafields_response.rb +12 -2
- data/lib/advanced_billing/models/list_mrr_response.rb +12 -2
- data/lib/advanced_billing/models/list_mrr_response_result.rb +12 -2
- data/lib/advanced_billing/models/list_offers_response.rb +12 -2
- data/lib/advanced_billing/models/list_product_price_points_response.rb +12 -2
- data/lib/advanced_billing/models/list_proforma_invoices_meta.rb +90 -0
- data/lib/advanced_billing/models/list_proforma_invoices_response.rb +79 -0
- data/lib/advanced_billing/models/list_public_keys_meta.rb +12 -2
- data/lib/advanced_billing/models/list_public_keys_response.rb +12 -2
- data/lib/advanced_billing/models/list_sale_rep_item.rb +12 -2
- data/lib/advanced_billing/models/list_segments_response.rb +12 -2
- data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +25 -12
- data/lib/advanced_billing/models/list_subscription_components_response.rb +12 -2
- data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +12 -2
- data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +12 -2
- data/lib/advanced_billing/models/list_subscription_groups_item.rb +33 -5
- data/lib/advanced_billing/models/list_subscription_groups_meta.rb +12 -2
- data/lib/advanced_billing/models/list_subscription_groups_response.rb +12 -2
- data/lib/advanced_billing/models/metadata.rb +23 -4
- data/lib/advanced_billing/models/metafield.rb +12 -2
- data/lib/advanced_billing/models/metafield_scope.rb +12 -2
- data/lib/advanced_billing/models/metered_component.rb +12 -2
- data/lib/advanced_billing/models/metered_usage.rb +12 -2
- data/lib/advanced_billing/models/movement.rb +23 -4
- data/lib/advanced_billing/models/movement_line_item.rb +12 -2
- data/lib/advanced_billing/models/mrr.rb +23 -4
- data/lib/advanced_billing/models/mrr_movement.rb +12 -2
- data/lib/advanced_billing/models/mrr_response.rb +12 -2
- data/lib/advanced_billing/models/multi_invoice_payment.rb +12 -2
- data/lib/advanced_billing/models/multi_invoice_payment_response.rb +12 -2
- data/lib/advanced_billing/models/nested_subscription_group.rb +12 -2
- data/lib/advanced_billing/models/net_terms.rb +12 -2
- data/lib/advanced_billing/models/offer.rb +43 -8
- data/lib/advanced_billing/models/offer_discount.rb +12 -2
- data/lib/advanced_billing/models/offer_item.rb +12 -2
- data/lib/advanced_billing/models/offer_response.rb +12 -2
- data/lib/advanced_billing/models/offer_signup_page.rb +12 -2
- data/lib/advanced_billing/models/on_off_component.rb +12 -2
- data/lib/advanced_billing/models/organization_address.rb +12 -2
- data/lib/advanced_billing/models/origin_invoice.rb +12 -2
- data/lib/advanced_billing/models/overage_pricing.rb +12 -2
- data/lib/advanced_billing/models/override_subscription.rb +12 -2
- data/lib/advanced_billing/models/override_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/paginated_metadata.rb +12 -2
- data/lib/advanced_billing/models/{payment.rb → paid_invoice.rb} +23 -13
- data/lib/advanced_billing/models/pause_request.rb +12 -2
- data/lib/advanced_billing/models/payer_attributes.rb +13 -3
- data/lib/advanced_billing/models/payer_error.rb +12 -2
- data/lib/advanced_billing/models/payment_collection_method_changed.rb +12 -2
- data/lib/advanced_billing/models/payment_for_allocation.rb +12 -2
- data/lib/advanced_billing/models/payment_method_apple_pay.rb +12 -2
- data/lib/advanced_billing/models/payment_method_bank_account.rb +12 -2
- data/lib/advanced_billing/models/payment_method_credit_card.rb +12 -2
- data/lib/advanced_billing/models/payment_method_external.rb +12 -2
- data/lib/advanced_billing/models/payment_method_paypal.rb +12 -2
- data/lib/advanced_billing/models/payment_profile_attributes.rb +12 -2
- data/lib/advanced_billing/models/payment_profile_response.rb +12 -2
- data/lib/advanced_billing/models/payment_related_events.rb +12 -2
- data/lib/advanced_billing/models/pending_cancellation_change.rb +22 -5
- data/lib/advanced_billing/models/portal_management_link.rb +53 -12
- data/lib/advanced_billing/models/prepaid_component_price_point.rb +12 -2
- data/lib/advanced_billing/models/prepaid_configuration.rb +12 -2
- data/lib/advanced_billing/models/prepaid_configuration_response.rb +12 -2
- data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +12 -2
- data/lib/advanced_billing/models/prepaid_usage.rb +12 -2
- data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +12 -2
- data/lib/advanced_billing/models/prepaid_usage_component.rb +12 -2
- data/lib/advanced_billing/models/prepayment.rb +21 -4
- data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +12 -2
- data/lib/advanced_billing/models/prepayment_aggregated_error.rb +12 -2
- data/lib/advanced_billing/models/prepayment_method.rb +3 -6
- data/lib/advanced_billing/models/prepayment_response.rb +12 -2
- data/lib/advanced_billing/models/prepayments_response.rb +12 -2
- data/lib/advanced_billing/models/preview_allocations_request.rb +12 -2
- data/lib/advanced_billing/models/price.rb +12 -2
- data/lib/advanced_billing/models/price_point.rb +12 -2
- data/lib/advanced_billing/models/product.rb +14 -4
- data/lib/advanced_billing/models/product_family.rb +33 -6
- data/lib/advanced_billing/models/product_family_response.rb +12 -2
- data/lib/advanced_billing/models/product_price_point.rb +16 -6
- data/lib/advanced_billing/models/product_price_point_errors.rb +12 -2
- data/lib/advanced_billing/models/product_price_point_response.rb +12 -2
- data/lib/advanced_billing/models/product_response.rb +12 -2
- data/lib/advanced_billing/models/proforma_error.rb +12 -2
- data/lib/advanced_billing/models/proforma_invoice.rb +87 -19
- data/lib/advanced_billing/models/proforma_invoice_credit.rb +12 -2
- data/lib/advanced_billing/models/proforma_invoice_discount.rb +37 -7
- data/lib/advanced_billing/models/proforma_invoice_discount_source_type.rb +23 -0
- data/lib/advanced_billing/models/proforma_invoice_issued.rb +23 -6
- data/lib/advanced_billing/models/proforma_invoice_payment.rb +12 -2
- data/lib/advanced_billing/models/proforma_invoice_role.rb +30 -0
- data/lib/advanced_billing/models/proforma_invoice_status.rb +26 -0
- data/lib/advanced_billing/models/proforma_invoice_tax.rb +15 -5
- data/lib/advanced_billing/models/proforma_invoice_tax_source_type.rb +23 -0
- data/lib/advanced_billing/models/proration.rb +12 -2
- data/lib/advanced_billing/models/public_key.rb +23 -4
- data/lib/advanced_billing/models/public_signup_page.rb +12 -2
- data/lib/advanced_billing/models/quantity_based_component.rb +12 -2
- data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +12 -2
- data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +23 -5
- data/lib/advanced_billing/models/reactivate_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/reactivation_billing.rb +12 -2
- data/lib/advanced_billing/models/reason_code.rb +33 -6
- data/lib/advanced_billing/models/reason_code_response.rb +12 -2
- data/lib/advanced_billing/models/reason_codes_json_response.rb +12 -2
- data/lib/advanced_billing/models/record_payment_request.rb +12 -2
- data/lib/advanced_billing/models/{payment_response.rb → record_payment_response.rb} +33 -9
- data/lib/advanced_billing/models/referral_code.rb +12 -2
- data/lib/advanced_billing/models/referral_validation_response.rb +12 -2
- data/lib/advanced_billing/models/refund.rb +12 -2
- data/lib/advanced_billing/models/refund_consolidated_invoice.rb +12 -2
- data/lib/advanced_billing/models/refund_invoice.rb +12 -2
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +12 -2
- data/lib/advanced_billing/models/refund_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/refund_prepayment.rb +12 -2
- data/lib/advanced_billing/models/refund_prepayment_aggregated_error.rb +12 -2
- data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +12 -2
- data/lib/advanced_billing/models/refund_prepayment_request.rb +12 -2
- data/lib/advanced_billing/models/refund_success.rb +12 -2
- data/lib/advanced_billing/models/remove_payment_event_data.rb +12 -2
- data/lib/advanced_billing/models/renewal_preview.rb +23 -5
- data/lib/advanced_billing/models/renewal_preview_component.rb +12 -2
- data/lib/advanced_billing/models/renewal_preview_line_item.rb +12 -2
- data/lib/advanced_billing/models/renewal_preview_request.rb +12 -2
- data/lib/advanced_billing/models/renewal_preview_response.rb +12 -2
- data/lib/advanced_billing/models/replay_webhooks_request.rb +12 -2
- data/lib/advanced_billing/models/replay_webhooks_response.rb +12 -2
- data/lib/advanced_billing/models/resent_invitation.rb +12 -2
- data/lib/advanced_billing/models/resume_options.rb +12 -2
- data/lib/advanced_billing/models/revoked_invitation.rb +12 -2
- data/lib/advanced_billing/models/sale_rep.rb +12 -2
- data/lib/advanced_billing/models/sale_rep_item_mrr.rb +12 -2
- data/lib/advanced_billing/models/sale_rep_settings.rb +12 -2
- data/lib/advanced_billing/models/sale_rep_subscription.rb +12 -2
- data/lib/advanced_billing/models/segment.rb +33 -6
- data/lib/advanced_billing/models/segment_price.rb +12 -2
- data/lib/advanced_billing/models/segment_response.rb +12 -2
- data/lib/advanced_billing/models/seller.rb +12 -2
- data/lib/advanced_billing/models/send_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/service_credit.rb +12 -2
- data/lib/advanced_billing/models/service_credit_response.rb +12 -2
- data/lib/advanced_billing/models/shipping_address.rb +12 -2
- data/lib/advanced_billing/models/signup_proforma_preview.rb +12 -2
- data/lib/advanced_billing/models/signup_proforma_preview_response.rb +12 -2
- data/lib/advanced_billing/models/site.rb +12 -2
- data/lib/advanced_billing/models/site_response.rb +12 -2
- data/lib/advanced_billing/models/site_statistics.rb +16 -6
- data/lib/advanced_billing/models/site_summary.rb +12 -2
- data/lib/advanced_billing/models/subscription.rb +12 -2
- data/lib/advanced_billing/models/subscription_component.rb +22 -4
- data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +12 -2
- data/lib/advanced_billing/models/subscription_component_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_component_subscription.rb +23 -4
- data/lib/advanced_billing/models/subscription_custom_price.rb +12 -2
- data/lib/advanced_billing/models/subscription_group.rb +38 -10
- data/lib/advanced_billing/models/subscription_group_balances.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_credit_card.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_customer.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_include.rb +20 -0
- data/lib/advanced_billing/models/subscription_group_item.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_member_error.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_members_array_error.rb +72 -0
- data/lib/advanced_billing/models/subscription_group_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_prepayment.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_component.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_error.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_failure.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_item.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_request.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +231 -9
- data/lib/advanced_billing/models/subscription_group_signup_success.rb +12 -2
- data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +21 -5
- data/lib/advanced_billing/models/subscription_group_single_error.rb +73 -0
- data/lib/advanced_billing/models/subscription_group_subscription_error.rb +66 -2
- data/lib/advanced_billing/models/subscription_group_update_error.rb +12 -2
- data/lib/advanced_billing/models/subscription_groups_list_include.rb +20 -0
- data/lib/advanced_billing/models/subscription_included_coupon.rb +12 -2
- data/lib/advanced_billing/models/subscription_migration_preview.rb +12 -2
- data/lib/advanced_billing/models/subscription_migration_preview_options.rb +23 -5
- data/lib/advanced_billing/models/subscription_migration_preview_request.rb +12 -2
- data/lib/advanced_billing/models/subscription_migration_preview_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_mrr.rb +12 -2
- data/lib/advanced_billing/models/subscription_mrr_breakout.rb +12 -2
- data/lib/advanced_billing/models/subscription_mrr_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_note.rb +33 -6
- data/lib/advanced_billing/models/subscription_note_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_preview.rb +12 -2
- data/lib/advanced_billing/models/subscription_preview_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_product_change.rb +12 -2
- data/lib/advanced_billing/models/subscription_product_migration.rb +12 -2
- data/lib/advanced_billing/models/subscription_product_migration_request.rb +12 -2
- data/lib/advanced_billing/models/subscription_response.rb +12 -2
- data/lib/advanced_billing/models/subscription_state_change.rb +12 -2
- data/lib/advanced_billing/models/tax_configuration.rb +12 -2
- data/lib/advanced_billing/models/too_many_management_link_requests.rb +12 -2
- data/lib/advanced_billing/models/update_allocation_expiration_date.rb +12 -2
- data/lib/advanced_billing/models/update_component.rb +12 -2
- data/lib/advanced_billing/models/update_component_price_point.rb +12 -2
- data/lib/advanced_billing/models/update_component_price_point_request.rb +12 -2
- data/lib/advanced_billing/models/update_component_request.rb +12 -2
- data/lib/advanced_billing/models/update_coupon_currency.rb +12 -2
- data/lib/advanced_billing/models/update_currency_price.rb +12 -2
- data/lib/advanced_billing/models/update_currency_prices_request.rb +12 -2
- data/lib/advanced_billing/models/update_customer.rb +12 -2
- data/lib/advanced_billing/models/update_customer_request.rb +12 -2
- data/lib/advanced_billing/models/update_metadata.rb +12 -2
- data/lib/advanced_billing/models/update_metadata_request.rb +12 -2
- data/lib/advanced_billing/models/update_metafield.rb +12 -2
- data/lib/advanced_billing/models/update_metafields_request.rb +12 -2
- data/lib/advanced_billing/models/update_payment_profile.rb +12 -2
- data/lib/advanced_billing/models/update_payment_profile_request.rb +12 -2
- data/lib/advanced_billing/models/update_price.rb +12 -2
- data/lib/advanced_billing/models/update_product_price_point.rb +12 -2
- data/lib/advanced_billing/models/update_product_price_point_request.rb +12 -2
- data/lib/advanced_billing/models/update_reason_code.rb +12 -2
- data/lib/advanced_billing/models/update_reason_code_request.rb +12 -2
- data/lib/advanced_billing/models/update_segment.rb +12 -2
- data/lib/advanced_billing/models/update_segment_request.rb +12 -2
- data/lib/advanced_billing/models/update_subscription.rb +23 -5
- data/lib/advanced_billing/models/update_subscription_component.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_group.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_group_request.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_note.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_note_request.rb +12 -2
- data/lib/advanced_billing/models/update_subscription_request.rb +12 -2
- data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +12 -2
- data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +12 -2
- data/lib/advanced_billing/models/usage.rb +12 -2
- data/lib/advanced_billing/models/usage_response.rb +12 -2
- data/lib/advanced_billing/models/void_invoice.rb +12 -2
- data/lib/advanced_billing/models/void_invoice_event_data.rb +12 -2
- data/lib/advanced_billing/models/void_invoice_request.rb +12 -2
- data/lib/advanced_billing/models/void_remainder_event_data.rb +12 -2
- data/lib/advanced_billing/models/webhook.rb +53 -10
- data/lib/advanced_billing/models/webhook_response.rb +12 -2
- data/lib/advanced_billing/utilities/union_type_lookup.rb +20 -8
- data/lib/advanced_billing.rb +25 -12
- metadata +24 -11
- data/lib/advanced_billing/models/proforma_invoice_discount_breakout.rb +0 -62
- data/lib/advanced_billing/models/proforma_invoice_preview.rb +0 -484
- data/lib/advanced_billing/models/proforma_invoice_tax_breakout.rb +0 -61
@@ -3,6 +3,7 @@
|
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
+
require 'date'
|
6
7
|
module AdvancedBilling
|
7
8
|
# Customer Model.
|
8
9
|
class Customer < BaseModel
|
@@ -39,11 +40,11 @@ module AdvancedBilling
|
|
39
40
|
attr_accessor :id
|
40
41
|
|
41
42
|
# The timestamp in which the customer object was created in Chargify
|
42
|
-
# @return [
|
43
|
+
# @return [DateTime]
|
43
44
|
attr_accessor :created_at
|
44
45
|
|
45
46
|
# The timestamp in which the customer object was last edited
|
46
|
-
# @return [
|
47
|
+
# @return [DateTime]
|
47
48
|
attr_accessor :updated_at
|
48
49
|
|
49
50
|
# The customer’s shipping street address (i.e. “123 Main St.”)
|
@@ -89,15 +90,15 @@ module AdvancedBilling
|
|
89
90
|
|
90
91
|
# The timestamp of when the Billing Portal entry was created at for the
|
91
92
|
# customer
|
92
|
-
# @return [
|
93
|
+
# @return [DateTime]
|
93
94
|
attr_accessor :portal_customer_created_at
|
94
95
|
|
95
96
|
# The timestamp of when the Billing Portal invite was last sent at
|
96
|
-
# @return [
|
97
|
+
# @return [DateTime]
|
97
98
|
attr_accessor :portal_invite_last_sent_at
|
98
99
|
|
99
100
|
# The timestamp of when the Billing Portal invite was last accepted
|
100
|
-
# @return [
|
101
|
+
# @return [DateTime]
|
101
102
|
attr_accessor :portal_invite_last_accepted_at
|
102
103
|
|
103
104
|
# The tax exempt status for the customer. Acceptable values are true or 1
|
@@ -246,7 +247,8 @@ module AdvancedBilling
|
|
246
247
|
vat_number = SKIP,
|
247
248
|
parent_id = SKIP,
|
248
249
|
locale = SKIP,
|
249
|
-
default_subscription_group_uid = SKIP
|
250
|
+
default_subscription_group_uid = SKIP,
|
251
|
+
additional_properties = {})
|
250
252
|
@first_name = first_name unless first_name == SKIP
|
251
253
|
@last_name = last_name unless last_name == SKIP
|
252
254
|
@email = email unless email == SKIP
|
@@ -286,6 +288,11 @@ module AdvancedBilling
|
|
286
288
|
@default_subscription_group_uid =
|
287
289
|
default_subscription_group_uid
|
288
290
|
end
|
291
|
+
|
292
|
+
# Add additional model properties to the instance.
|
293
|
+
additional_properties.each do |_name, _value|
|
294
|
+
instance_variable_set("@#{_name}", _value)
|
295
|
+
end
|
289
296
|
end
|
290
297
|
|
291
298
|
# Creates an instance of the object from a hash.
|
@@ -300,8 +307,16 @@ module AdvancedBilling
|
|
300
307
|
organization = hash.key?('organization') ? hash['organization'] : SKIP
|
301
308
|
reference = hash.key?('reference') ? hash['reference'] : SKIP
|
302
309
|
id = hash.key?('id') ? hash['id'] : SKIP
|
303
|
-
created_at = hash.key?('created_at')
|
304
|
-
|
310
|
+
created_at = if hash.key?('created_at')
|
311
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
312
|
+
else
|
313
|
+
SKIP
|
314
|
+
end
|
315
|
+
updated_at = if hash.key?('updated_at')
|
316
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
317
|
+
else
|
318
|
+
SKIP
|
319
|
+
end
|
305
320
|
address = hash.key?('address') ? hash['address'] : SKIP
|
306
321
|
address_2 = hash.key?('address_2') ? hash['address_2'] : SKIP
|
307
322
|
city = hash.key?('city') ? hash['city'] : SKIP
|
@@ -312,12 +327,21 @@ module AdvancedBilling
|
|
312
327
|
country_name = hash.key?('country_name') ? hash['country_name'] : SKIP
|
313
328
|
phone = hash.key?('phone') ? hash['phone'] : SKIP
|
314
329
|
verified = hash.key?('verified') ? hash['verified'] : SKIP
|
315
|
-
portal_customer_created_at =
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
330
|
+
portal_customer_created_at = if hash.key?('portal_customer_created_at')
|
331
|
+
(DateTimeHelper.from_rfc3339(hash['portal_customer_created_at']) if hash['portal_customer_created_at'])
|
332
|
+
else
|
333
|
+
SKIP
|
334
|
+
end
|
335
|
+
portal_invite_last_sent_at = if hash.key?('portal_invite_last_sent_at')
|
336
|
+
(DateTimeHelper.from_rfc3339(hash['portal_invite_last_sent_at']) if hash['portal_invite_last_sent_at'])
|
337
|
+
else
|
338
|
+
SKIP
|
339
|
+
end
|
340
|
+
portal_invite_last_accepted_at = if hash.key?('portal_invite_last_accepted_at')
|
341
|
+
(DateTimeHelper.from_rfc3339(hash['portal_invite_last_accepted_at']) if hash['portal_invite_last_accepted_at'])
|
342
|
+
else
|
343
|
+
SKIP
|
344
|
+
end
|
321
345
|
tax_exempt = hash.key?('tax_exempt') ? hash['tax_exempt'] : SKIP
|
322
346
|
vat_number = hash.key?('vat_number') ? hash['vat_number'] : SKIP
|
323
347
|
parent_id = hash.key?('parent_id') ? hash['parent_id'] : SKIP
|
@@ -325,6 +349,9 @@ module AdvancedBilling
|
|
325
349
|
default_subscription_group_uid =
|
326
350
|
hash.key?('default_subscription_group_uid') ? hash['default_subscription_group_uid'] : SKIP
|
327
351
|
|
352
|
+
# Clean out expected properties from Hash.
|
353
|
+
names.each_value { |k| hash.delete(k) }
|
354
|
+
|
328
355
|
# Create object from extracted values.
|
329
356
|
Customer.new(first_name,
|
330
357
|
last_name,
|
@@ -352,7 +379,28 @@ module AdvancedBilling
|
|
352
379
|
vat_number,
|
353
380
|
parent_id,
|
354
381
|
locale,
|
355
|
-
default_subscription_group_uid
|
382
|
+
default_subscription_group_uid,
|
383
|
+
hash)
|
384
|
+
end
|
385
|
+
|
386
|
+
def to_custom_created_at
|
387
|
+
DateTimeHelper.to_rfc3339(created_at)
|
388
|
+
end
|
389
|
+
|
390
|
+
def to_custom_updated_at
|
391
|
+
DateTimeHelper.to_rfc3339(updated_at)
|
392
|
+
end
|
393
|
+
|
394
|
+
def to_custom_portal_customer_created_at
|
395
|
+
DateTimeHelper.to_rfc3339(portal_customer_created_at)
|
396
|
+
end
|
397
|
+
|
398
|
+
def to_custom_portal_invite_last_sent_at
|
399
|
+
DateTimeHelper.to_rfc3339(portal_invite_last_sent_at)
|
400
|
+
end
|
401
|
+
|
402
|
+
def to_custom_portal_invite_last_accepted_at
|
403
|
+
DateTimeHelper.to_rfc3339(portal_invite_last_accepted_at)
|
356
404
|
end
|
357
405
|
end
|
358
406
|
end
|
@@ -66,6 +66,7 @@ module AdvancedBilling
|
|
66
66
|
# An array for nullable fields
|
67
67
|
def self.nullables
|
68
68
|
%w[
|
69
|
+
chargify_id
|
69
70
|
organization
|
70
71
|
vat_number
|
71
72
|
reference
|
@@ -78,7 +79,8 @@ module AdvancedBilling
|
|
78
79
|
organization = SKIP,
|
79
80
|
email = SKIP,
|
80
81
|
vat_number = SKIP,
|
81
|
-
reference = SKIP
|
82
|
+
reference = SKIP,
|
83
|
+
additional_properties = {})
|
82
84
|
@chargify_id = chargify_id unless chargify_id == SKIP
|
83
85
|
@first_name = first_name unless first_name == SKIP
|
84
86
|
@last_name = last_name unless last_name == SKIP
|
@@ -86,6 +88,11 @@ module AdvancedBilling
|
|
86
88
|
@email = email unless email == SKIP
|
87
89
|
@vat_number = vat_number unless vat_number == SKIP
|
88
90
|
@reference = reference unless reference == SKIP
|
91
|
+
|
92
|
+
# Add additional model properties to the instance.
|
93
|
+
additional_properties.each do |_name, _value|
|
94
|
+
instance_variable_set("@#{_name}", _value)
|
95
|
+
end
|
89
96
|
end
|
90
97
|
|
91
98
|
# Creates an instance of the object from a hash.
|
@@ -101,6 +108,9 @@ module AdvancedBilling
|
|
101
108
|
vat_number = hash.key?('vat_number') ? hash['vat_number'] : SKIP
|
102
109
|
reference = hash.key?('reference') ? hash['reference'] : SKIP
|
103
110
|
|
111
|
+
# Clean out expected properties from Hash.
|
112
|
+
names.each_value { |k| hash.delete(k) }
|
113
|
+
|
104
114
|
# Create object from extracted values.
|
105
115
|
Customer1.new(chargify_id,
|
106
116
|
first_name,
|
@@ -108,7 +118,8 @@ module AdvancedBilling
|
|
108
118
|
organization,
|
109
119
|
email,
|
110
120
|
vat_number,
|
111
|
-
reference
|
121
|
+
reference,
|
122
|
+
hash)
|
112
123
|
end
|
113
124
|
end
|
114
125
|
end
|
@@ -174,7 +174,8 @@ module AdvancedBilling
|
|
174
174
|
tax_exempt = SKIP,
|
175
175
|
vat_number = SKIP,
|
176
176
|
metafields = SKIP,
|
177
|
-
parent_id = SKIP
|
177
|
+
parent_id = SKIP,
|
178
|
+
additional_properties = {})
|
178
179
|
@first_name = first_name unless first_name == SKIP
|
179
180
|
@last_name = last_name unless last_name == SKIP
|
180
181
|
@email = email unless email == SKIP
|
@@ -193,6 +194,11 @@ module AdvancedBilling
|
|
193
194
|
@vat_number = vat_number unless vat_number == SKIP
|
194
195
|
@metafields = metafields unless metafields == SKIP
|
195
196
|
@parent_id = parent_id unless parent_id == SKIP
|
197
|
+
|
198
|
+
# Add additional model properties to the instance.
|
199
|
+
additional_properties.each do |_name, _value|
|
200
|
+
instance_variable_set("@#{_name}", _value)
|
201
|
+
end
|
196
202
|
end
|
197
203
|
|
198
204
|
# Creates an instance of the object from a hash.
|
@@ -219,6 +225,9 @@ module AdvancedBilling
|
|
219
225
|
metafields = hash.key?('metafields') ? hash['metafields'] : SKIP
|
220
226
|
parent_id = hash.key?('parent_id') ? hash['parent_id'] : SKIP
|
221
227
|
|
228
|
+
# Clean out expected properties from Hash.
|
229
|
+
names.each_value { |k| hash.delete(k) }
|
230
|
+
|
222
231
|
# Create object from extracted values.
|
223
232
|
CustomerAttributes.new(first_name,
|
224
233
|
last_name,
|
@@ -237,7 +246,8 @@ module AdvancedBilling
|
|
237
246
|
tax_exempt,
|
238
247
|
vat_number,
|
239
248
|
metafields,
|
240
|
-
parent_id
|
249
|
+
parent_id,
|
250
|
+
hash)
|
241
251
|
end
|
242
252
|
end
|
243
253
|
end
|
@@ -58,11 +58,17 @@ module AdvancedBilling
|
|
58
58
|
def initialize(payer = SKIP,
|
59
59
|
shipping_address = SKIP,
|
60
60
|
billing_address = SKIP,
|
61
|
-
custom_fields = SKIP
|
61
|
+
custom_fields = SKIP,
|
62
|
+
additional_properties = {})
|
62
63
|
@payer = payer unless payer == SKIP
|
63
64
|
@shipping_address = shipping_address unless shipping_address == SKIP
|
64
65
|
@billing_address = billing_address unless billing_address == SKIP
|
65
66
|
@custom_fields = custom_fields unless custom_fields == SKIP
|
67
|
+
|
68
|
+
# Add additional model properties to the instance.
|
69
|
+
additional_properties.each do |_name, _value|
|
70
|
+
instance_variable_set("@#{_name}", _value)
|
71
|
+
end
|
66
72
|
end
|
67
73
|
|
68
74
|
# Creates an instance of the object from a hash.
|
@@ -83,11 +89,15 @@ module AdvancedBilling
|
|
83
89
|
UnionTypeLookUp.get(:CustomerChangeCustomFields), hash['custom_fields']
|
84
90
|
) : SKIP
|
85
91
|
|
92
|
+
# Clean out expected properties from Hash.
|
93
|
+
names.each_value { |k| hash.delete(k) }
|
94
|
+
|
86
95
|
# Create object from extracted values.
|
87
96
|
CustomerChange.new(payer,
|
88
97
|
shipping_address,
|
89
98
|
billing_address,
|
90
|
-
custom_fields
|
99
|
+
custom_fields,
|
100
|
+
hash)
|
91
101
|
end
|
92
102
|
|
93
103
|
# Validates an instance of the object from a given value.
|
@@ -30,8 +30,14 @@ module AdvancedBilling
|
|
30
30
|
[]
|
31
31
|
end
|
32
32
|
|
33
|
-
def initialize(changes = nil
|
33
|
+
def initialize(changes = nil,
|
34
|
+
additional_properties = {})
|
34
35
|
@changes = changes
|
36
|
+
|
37
|
+
# Add additional model properties to the instance.
|
38
|
+
additional_properties.each do |_name, _value|
|
39
|
+
instance_variable_set("@#{_name}", _value)
|
40
|
+
end
|
35
41
|
end
|
36
42
|
|
37
43
|
# Creates an instance of the object from a hash.
|
@@ -41,8 +47,12 @@ module AdvancedBilling
|
|
41
47
|
# Extract variables from the hash.
|
42
48
|
changes = CustomerChange.from_hash(hash['changes']) if hash['changes']
|
43
49
|
|
50
|
+
# Clean out expected properties from Hash.
|
51
|
+
names.each_value { |k| hash.delete(k) }
|
52
|
+
|
44
53
|
# Create object from extracted values.
|
45
|
-
CustomerChangesPreviewResponse.new(changes
|
54
|
+
CustomerChangesPreviewResponse.new(changes,
|
55
|
+
hash)
|
46
56
|
end
|
47
57
|
end
|
48
58
|
end
|
@@ -36,9 +36,15 @@ module AdvancedBilling
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def initialize(before = nil,
|
39
|
-
after = nil
|
39
|
+
after = nil,
|
40
|
+
additional_properties = {})
|
40
41
|
@before = before
|
41
42
|
@after = after
|
43
|
+
|
44
|
+
# Add additional model properties to the instance.
|
45
|
+
additional_properties.each do |_name, _value|
|
46
|
+
instance_variable_set("@#{_name}", _value)
|
47
|
+
end
|
42
48
|
end
|
43
49
|
|
44
50
|
# Creates an instance of the object from a hash.
|
@@ -67,9 +73,13 @@ module AdvancedBilling
|
|
67
73
|
|
68
74
|
after = nil unless hash.key?('after')
|
69
75
|
|
76
|
+
# Clean out expected properties from Hash.
|
77
|
+
names.each_value { |k| hash.delete(k) }
|
78
|
+
|
70
79
|
# Create object from extracted values.
|
71
80
|
CustomerCustomFieldsChange.new(before,
|
72
|
-
after
|
81
|
+
after,
|
82
|
+
hash)
|
73
83
|
end
|
74
84
|
|
75
85
|
# Validates an instance of the object from a given value.
|
@@ -32,8 +32,14 @@ module AdvancedBilling
|
|
32
32
|
[]
|
33
33
|
end
|
34
34
|
|
35
|
-
def initialize(customer = SKIP
|
35
|
+
def initialize(customer = SKIP,
|
36
|
+
additional_properties = {})
|
36
37
|
@customer = customer unless customer == SKIP
|
38
|
+
|
39
|
+
# Add additional model properties to the instance.
|
40
|
+
additional_properties.each do |_name, _value|
|
41
|
+
instance_variable_set("@#{_name}", _value)
|
42
|
+
end
|
37
43
|
end
|
38
44
|
|
39
45
|
# Creates an instance of the object from a hash.
|
@@ -43,8 +49,12 @@ module AdvancedBilling
|
|
43
49
|
# Extract variables from the hash.
|
44
50
|
customer = hash.key?('customer') ? hash['customer'] : SKIP
|
45
51
|
|
52
|
+
# Clean out expected properties from Hash.
|
53
|
+
names.each_value { |k| hash.delete(k) }
|
54
|
+
|
46
55
|
# Create object from extracted values.
|
47
|
-
CustomerError.new(customer
|
56
|
+
CustomerError.new(customer,
|
57
|
+
hash)
|
48
58
|
end
|
49
59
|
|
50
60
|
# Validates an instance of the object from a given value.
|
@@ -36,9 +36,15 @@ module AdvancedBilling
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def initialize(before = nil,
|
39
|
-
after = nil
|
39
|
+
after = nil,
|
40
|
+
additional_properties = {})
|
40
41
|
@before = before
|
41
42
|
@after = after
|
43
|
+
|
44
|
+
# Add additional model properties to the instance.
|
45
|
+
additional_properties.each do |_name, _value|
|
46
|
+
instance_variable_set("@#{_name}", _value)
|
47
|
+
end
|
42
48
|
end
|
43
49
|
|
44
50
|
# Creates an instance of the object from a hash.
|
@@ -49,9 +55,13 @@ module AdvancedBilling
|
|
49
55
|
before = InvoicePayerChange.from_hash(hash['before']) if hash['before']
|
50
56
|
after = InvoicePayerChange.from_hash(hash['after']) if hash['after']
|
51
57
|
|
58
|
+
# Clean out expected properties from Hash.
|
59
|
+
names.each_value { |k| hash.delete(k) }
|
60
|
+
|
52
61
|
# Create object from extracted values.
|
53
62
|
CustomerPayerChange.new(before,
|
54
|
-
after
|
63
|
+
after,
|
64
|
+
hash)
|
55
65
|
end
|
56
66
|
|
57
67
|
# Validates an instance of the object from a given value.
|
@@ -30,8 +30,14 @@ module AdvancedBilling
|
|
30
30
|
[]
|
31
31
|
end
|
32
32
|
|
33
|
-
def initialize(customer = nil
|
33
|
+
def initialize(customer = nil,
|
34
|
+
additional_properties = {})
|
34
35
|
@customer = customer
|
36
|
+
|
37
|
+
# Add additional model properties to the instance.
|
38
|
+
additional_properties.each do |_name, _value|
|
39
|
+
instance_variable_set("@#{_name}", _value)
|
40
|
+
end
|
35
41
|
end
|
36
42
|
|
37
43
|
# Creates an instance of the object from a hash.
|
@@ -41,8 +47,12 @@ module AdvancedBilling
|
|
41
47
|
# Extract variables from the hash.
|
42
48
|
customer = Customer.from_hash(hash['customer']) if hash['customer']
|
43
49
|
|
50
|
+
# Clean out expected properties from Hash.
|
51
|
+
names.each_value { |k| hash.delete(k) }
|
52
|
+
|
44
53
|
# Create object from extracted values.
|
45
|
-
CustomerResponse.new(customer
|
54
|
+
CustomerResponse.new(customer,
|
55
|
+
hash)
|
46
56
|
end
|
47
57
|
end
|
48
58
|
end
|
@@ -36,9 +36,15 @@ module AdvancedBilling
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def initialize(amount = nil,
|
39
|
-
memo = nil
|
39
|
+
memo = nil,
|
40
|
+
additional_properties = {})
|
40
41
|
@amount = amount
|
41
42
|
@memo = memo
|
43
|
+
|
44
|
+
# Add additional model properties to the instance.
|
45
|
+
additional_properties.each do |_name, _value|
|
46
|
+
instance_variable_set("@#{_name}", _value)
|
47
|
+
end
|
42
48
|
end
|
43
49
|
|
44
50
|
# Creates an instance of the object from a hash.
|
@@ -51,9 +57,13 @@ module AdvancedBilling
|
|
51
57
|
) : nil
|
52
58
|
memo = hash.key?('memo') ? hash['memo'] : nil
|
53
59
|
|
60
|
+
# Clean out expected properties from Hash.
|
61
|
+
names.each_value { |k| hash.delete(k) }
|
62
|
+
|
54
63
|
# Create object from extracted values.
|
55
64
|
DeductServiceCredit.new(amount,
|
56
|
-
memo
|
65
|
+
memo,
|
66
|
+
hash)
|
57
67
|
end
|
58
68
|
|
59
69
|
# Validates an instance of the object from a given value.
|
@@ -30,8 +30,14 @@ module AdvancedBilling
|
|
30
30
|
[]
|
31
31
|
end
|
32
32
|
|
33
|
-
def initialize(deduction = nil
|
33
|
+
def initialize(deduction = nil,
|
34
|
+
additional_properties = {})
|
34
35
|
@deduction = deduction
|
36
|
+
|
37
|
+
# Add additional model properties to the instance.
|
38
|
+
additional_properties.each do |_name, _value|
|
39
|
+
instance_variable_set("@#{_name}", _value)
|
40
|
+
end
|
35
41
|
end
|
36
42
|
|
37
43
|
# Creates an instance of the object from a hash.
|
@@ -41,8 +47,12 @@ module AdvancedBilling
|
|
41
47
|
# Extract variables from the hash.
|
42
48
|
deduction = DeductServiceCredit.from_hash(hash['deduction']) if hash['deduction']
|
43
49
|
|
50
|
+
# Clean out expected properties from Hash.
|
51
|
+
names.each_value { |k| hash.delete(k) }
|
52
|
+
|
44
53
|
# Create object from extracted values.
|
45
|
-
DeductServiceCreditRequest.new(deduction
|
54
|
+
DeductServiceCreditRequest.new(deduction,
|
55
|
+
hash)
|
46
56
|
end
|
47
57
|
end
|
48
58
|
end
|
@@ -32,8 +32,14 @@ module AdvancedBilling
|
|
32
32
|
[]
|
33
33
|
end
|
34
34
|
|
35
|
-
def initialize(message = SKIP
|
35
|
+
def initialize(message = SKIP,
|
36
|
+
additional_properties = {})
|
36
37
|
@message = message unless message == SKIP
|
38
|
+
|
39
|
+
# Add additional model properties to the instance.
|
40
|
+
additional_properties.each do |_name, _value|
|
41
|
+
instance_variable_set("@#{_name}", _value)
|
42
|
+
end
|
37
43
|
end
|
38
44
|
|
39
45
|
# Creates an instance of the object from a hash.
|
@@ -43,8 +49,12 @@ module AdvancedBilling
|
|
43
49
|
# Extract variables from the hash.
|
44
50
|
message = hash.key?('message') ? hash['message'] : SKIP
|
45
51
|
|
52
|
+
# Clean out expected properties from Hash.
|
53
|
+
names.each_value { |k| hash.delete(k) }
|
54
|
+
|
46
55
|
# Create object from extracted values.
|
47
|
-
DelayedCancellationResponse.new(message
|
56
|
+
DelayedCancellationResponse.new(message,
|
57
|
+
hash)
|
48
58
|
end
|
49
59
|
end
|
50
60
|
end
|
@@ -39,9 +39,15 @@ module AdvancedBilling
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def initialize(uid = SKIP,
|
42
|
-
deleted = SKIP
|
42
|
+
deleted = SKIP,
|
43
|
+
additional_properties = {})
|
43
44
|
@uid = uid unless uid == SKIP
|
44
45
|
@deleted = deleted unless deleted == SKIP
|
46
|
+
|
47
|
+
# Add additional model properties to the instance.
|
48
|
+
additional_properties.each do |_name, _value|
|
49
|
+
instance_variable_set("@#{_name}", _value)
|
50
|
+
end
|
45
51
|
end
|
46
52
|
|
47
53
|
# Creates an instance of the object from a hash.
|
@@ -52,9 +58,13 @@ module AdvancedBilling
|
|
52
58
|
uid = hash.key?('uid') ? hash['uid'] : SKIP
|
53
59
|
deleted = hash.key?('deleted') ? hash['deleted'] : SKIP
|
54
60
|
|
61
|
+
# Clean out expected properties from Hash.
|
62
|
+
names.each_value { |k| hash.delete(k) }
|
63
|
+
|
55
64
|
# Create object from extracted values.
|
56
65
|
DeleteSubscriptionGroupResponse.new(uid,
|
57
|
-
deleted
|
66
|
+
deleted,
|
67
|
+
hash)
|
58
68
|
end
|
59
69
|
end
|
60
70
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
+
require 'date'
|
6
7
|
module AdvancedBilling
|
7
8
|
# DunnerData Model.
|
8
9
|
class DunnerData < BaseModel
|
@@ -22,7 +23,7 @@ module AdvancedBilling
|
|
22
23
|
attr_accessor :revenue_at_risk_in_cents
|
23
24
|
|
24
25
|
# TODO: Write general description for this method
|
25
|
-
# @return [
|
26
|
+
# @return [DateTime]
|
26
27
|
attr_accessor :created_at
|
27
28
|
|
28
29
|
# TODO: Write general description for this method
|
@@ -30,7 +31,7 @@ module AdvancedBilling
|
|
30
31
|
attr_accessor :attempts
|
31
32
|
|
32
33
|
# TODO: Write general description for this method
|
33
|
-
# @return [
|
34
|
+
# @return [DateTime]
|
34
35
|
attr_accessor :last_attempted_at
|
35
36
|
|
36
37
|
# A mapping from model property names to API property names.
|
@@ -60,13 +61,19 @@ module AdvancedBilling
|
|
60
61
|
revenue_at_risk_in_cents = nil,
|
61
62
|
created_at = nil,
|
62
63
|
attempts = nil,
|
63
|
-
last_attempted_at = nil
|
64
|
+
last_attempted_at = nil,
|
65
|
+
additional_properties = {})
|
64
66
|
@state = state
|
65
67
|
@subscription_id = subscription_id
|
66
68
|
@revenue_at_risk_in_cents = revenue_at_risk_in_cents
|
67
69
|
@created_at = created_at
|
68
70
|
@attempts = attempts
|
69
71
|
@last_attempted_at = last_attempted_at
|
72
|
+
|
73
|
+
# Add additional model properties to the instance.
|
74
|
+
additional_properties.each do |_name, _value|
|
75
|
+
instance_variable_set("@#{_name}", _value)
|
76
|
+
end
|
70
77
|
end
|
71
78
|
|
72
79
|
# Creates an instance of the object from a hash.
|
@@ -79,10 +86,16 @@ module AdvancedBilling
|
|
79
86
|
hash.key?('subscription_id') ? hash['subscription_id'] : nil
|
80
87
|
revenue_at_risk_in_cents =
|
81
88
|
hash.key?('revenue_at_risk_in_cents') ? hash['revenue_at_risk_in_cents'] : nil
|
82
|
-
created_at = hash.key?('created_at')
|
89
|
+
created_at = if hash.key?('created_at')
|
90
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
91
|
+
end
|
83
92
|
attempts = hash.key?('attempts') ? hash['attempts'] : nil
|
84
|
-
last_attempted_at =
|
85
|
-
|
93
|
+
last_attempted_at = if hash.key?('last_attempted_at')
|
94
|
+
(DateTimeHelper.from_rfc3339(hash['last_attempted_at']) if hash['last_attempted_at'])
|
95
|
+
end
|
96
|
+
|
97
|
+
# Clean out expected properties from Hash.
|
98
|
+
names.each_value { |k| hash.delete(k) }
|
86
99
|
|
87
100
|
# Create object from extracted values.
|
88
101
|
DunnerData.new(state,
|
@@ -90,7 +103,16 @@ module AdvancedBilling
|
|
90
103
|
revenue_at_risk_in_cents,
|
91
104
|
created_at,
|
92
105
|
attempts,
|
93
|
-
last_attempted_at
|
106
|
+
last_attempted_at,
|
107
|
+
hash)
|
108
|
+
end
|
109
|
+
|
110
|
+
def to_custom_created_at
|
111
|
+
DateTimeHelper.to_rfc3339(created_at)
|
112
|
+
end
|
113
|
+
|
114
|
+
def to_custom_last_attempted_at
|
115
|
+
DateTimeHelper.to_rfc3339(last_attempted_at)
|
94
116
|
end
|
95
117
|
end
|
96
118
|
end
|
@@ -80,7 +80,8 @@ module AdvancedBilling
|
|
80
80
|
send_sms = nil,
|
81
81
|
email_body = SKIP,
|
82
82
|
email_subject = SKIP,
|
83
|
-
sms_body = SKIP
|
83
|
+
sms_body = SKIP,
|
84
|
+
additional_properties = {})
|
84
85
|
@day_threshold = day_threshold
|
85
86
|
@action = action
|
86
87
|
@email_body = email_body unless email_body == SKIP
|
@@ -89,6 +90,11 @@ module AdvancedBilling
|
|
89
90
|
@send_bcc_email = send_bcc_email
|
90
91
|
@send_sms = send_sms
|
91
92
|
@sms_body = sms_body unless sms_body == SKIP
|
93
|
+
|
94
|
+
# Add additional model properties to the instance.
|
95
|
+
additional_properties.each do |_name, _value|
|
96
|
+
instance_variable_set("@#{_name}", _value)
|
97
|
+
end
|
92
98
|
end
|
93
99
|
|
94
100
|
# Creates an instance of the object from a hash.
|
@@ -106,6 +112,9 @@ module AdvancedBilling
|
|
106
112
|
email_subject = hash.key?('email_subject') ? hash['email_subject'] : SKIP
|
107
113
|
sms_body = hash.key?('sms_body') ? hash['sms_body'] : SKIP
|
108
114
|
|
115
|
+
# Clean out expected properties from Hash.
|
116
|
+
names.each_value { |k| hash.delete(k) }
|
117
|
+
|
109
118
|
# Create object from extracted values.
|
110
119
|
DunningStepData.new(day_threshold,
|
111
120
|
action,
|
@@ -114,7 +123,8 @@ module AdvancedBilling
|
|
114
123
|
send_sms,
|
115
124
|
email_body,
|
116
125
|
email_subject,
|
117
|
-
sms_body
|
126
|
+
sms_body,
|
127
|
+
hash)
|
118
128
|
end
|
119
129
|
end
|
120
130
|
end
|