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
@@ -70,7 +70,8 @@ module AdvancedBilling
|
|
70
70
|
transaction_time = nil,
|
71
71
|
payment_method = nil,
|
72
72
|
prepayment = nil,
|
73
|
-
original_amount = SKIP
|
73
|
+
original_amount = SKIP,
|
74
|
+
additional_properties = {})
|
74
75
|
@transaction_id = transaction_id
|
75
76
|
@memo = memo
|
76
77
|
@original_amount = original_amount unless original_amount == SKIP
|
@@ -78,6 +79,11 @@ module AdvancedBilling
|
|
78
79
|
@transaction_time = transaction_time
|
79
80
|
@payment_method = payment_method
|
80
81
|
@prepayment = prepayment
|
82
|
+
|
83
|
+
# Add additional model properties to the instance.
|
84
|
+
additional_properties.each do |_name, _value|
|
85
|
+
instance_variable_set("@#{_name}", _value)
|
86
|
+
end
|
81
87
|
end
|
82
88
|
|
83
89
|
# Creates an instance of the object from a hash.
|
@@ -100,6 +106,9 @@ module AdvancedBilling
|
|
100
106
|
original_amount =
|
101
107
|
hash.key?('original_amount') ? hash['original_amount'] : SKIP
|
102
108
|
|
109
|
+
# Clean out expected properties from Hash.
|
110
|
+
names.each_value { |k| hash.delete(k) }
|
111
|
+
|
103
112
|
# Create object from extracted values.
|
104
113
|
RemovePaymentEventData.new(transaction_id,
|
105
114
|
memo,
|
@@ -107,7 +116,8 @@ module AdvancedBilling
|
|
107
116
|
transaction_time,
|
108
117
|
payment_method,
|
109
118
|
prepayment,
|
110
|
-
original_amount
|
119
|
+
original_amount,
|
120
|
+
hash)
|
111
121
|
end
|
112
122
|
|
113
123
|
def to_custom_transaction_time
|
@@ -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
|
# RenewalPreview Model.
|
8
9
|
class RenewalPreview < BaseModel
|
@@ -10,7 +11,7 @@ module AdvancedBilling
|
|
10
11
|
private_constant :SKIP
|
11
12
|
|
12
13
|
# The timestamp for the subscription’s next renewal
|
13
|
-
# @return [
|
14
|
+
# @return [DateTime]
|
14
15
|
attr_accessor :next_assessment_at
|
15
16
|
|
16
17
|
# An integer representing the amount of the total pre-tax, pre-discount
|
@@ -96,7 +97,8 @@ module AdvancedBilling
|
|
96
97
|
existing_balance_in_cents = SKIP,
|
97
98
|
total_amount_due_in_cents = SKIP,
|
98
99
|
uncalculated_taxes = SKIP,
|
99
|
-
line_items = SKIP
|
100
|
+
line_items = SKIP,
|
101
|
+
additional_properties = {})
|
100
102
|
@next_assessment_at = next_assessment_at unless next_assessment_at == SKIP
|
101
103
|
@subtotal_in_cents = subtotal_in_cents unless subtotal_in_cents == SKIP
|
102
104
|
@total_tax_in_cents = total_tax_in_cents unless total_tax_in_cents == SKIP
|
@@ -112,6 +114,11 @@ module AdvancedBilling
|
|
112
114
|
end
|
113
115
|
@uncalculated_taxes = uncalculated_taxes unless uncalculated_taxes == SKIP
|
114
116
|
@line_items = line_items unless line_items == SKIP
|
117
|
+
|
118
|
+
# Add additional model properties to the instance.
|
119
|
+
additional_properties.each do |_name, _value|
|
120
|
+
instance_variable_set("@#{_name}", _value)
|
121
|
+
end
|
115
122
|
end
|
116
123
|
|
117
124
|
# Creates an instance of the object from a hash.
|
@@ -119,8 +126,11 @@ module AdvancedBilling
|
|
119
126
|
return nil unless hash
|
120
127
|
|
121
128
|
# Extract variables from the hash.
|
122
|
-
next_assessment_at =
|
123
|
-
|
129
|
+
next_assessment_at = if hash.key?('next_assessment_at')
|
130
|
+
(DateTimeHelper.from_rfc3339(hash['next_assessment_at']) if hash['next_assessment_at'])
|
131
|
+
else
|
132
|
+
SKIP
|
133
|
+
end
|
124
134
|
subtotal_in_cents =
|
125
135
|
hash.key?('subtotal_in_cents') ? hash['subtotal_in_cents'] : SKIP
|
126
136
|
total_tax_in_cents =
|
@@ -146,6 +156,9 @@ module AdvancedBilling
|
|
146
156
|
|
147
157
|
line_items = SKIP unless hash.key?('line_items')
|
148
158
|
|
159
|
+
# Clean out expected properties from Hash.
|
160
|
+
names.each_value { |k| hash.delete(k) }
|
161
|
+
|
149
162
|
# Create object from extracted values.
|
150
163
|
RenewalPreview.new(next_assessment_at,
|
151
164
|
subtotal_in_cents,
|
@@ -155,7 +168,12 @@ module AdvancedBilling
|
|
155
168
|
existing_balance_in_cents,
|
156
169
|
total_amount_due_in_cents,
|
157
170
|
uncalculated_taxes,
|
158
|
-
line_items
|
171
|
+
line_items,
|
172
|
+
hash)
|
173
|
+
end
|
174
|
+
|
175
|
+
def to_custom_next_assessment_at
|
176
|
+
DateTimeHelper.to_rfc3339(next_assessment_at)
|
159
177
|
end
|
160
178
|
end
|
161
179
|
end
|
@@ -55,10 +55,16 @@ module AdvancedBilling
|
|
55
55
|
|
56
56
|
def initialize(component_id = SKIP,
|
57
57
|
quantity = SKIP,
|
58
|
-
price_point_id = SKIP
|
58
|
+
price_point_id = SKIP,
|
59
|
+
additional_properties = {})
|
59
60
|
@component_id = component_id unless component_id == SKIP
|
60
61
|
@quantity = quantity unless quantity == SKIP
|
61
62
|
@price_point_id = price_point_id unless price_point_id == SKIP
|
63
|
+
|
64
|
+
# Add additional model properties to the instance.
|
65
|
+
additional_properties.each do |_name, _value|
|
66
|
+
instance_variable_set("@#{_name}", _value)
|
67
|
+
end
|
62
68
|
end
|
63
69
|
|
64
70
|
# Creates an instance of the object from a hash.
|
@@ -74,10 +80,14 @@ module AdvancedBilling
|
|
74
80
|
UnionTypeLookUp.get(:RenewalPreviewComponentPricePointId), hash['price_point_id']
|
75
81
|
) : SKIP
|
76
82
|
|
83
|
+
# Clean out expected properties from Hash.
|
84
|
+
names.each_value { |k| hash.delete(k) }
|
85
|
+
|
77
86
|
# Create object from extracted values.
|
78
87
|
RenewalPreviewComponent.new(component_id,
|
79
88
|
quantity,
|
80
|
-
price_point_id
|
89
|
+
price_point_id,
|
90
|
+
hash)
|
81
91
|
end
|
82
92
|
|
83
93
|
# Validates an instance of the object from a given value.
|
@@ -123,7 +123,8 @@ module AdvancedBilling
|
|
123
123
|
component_name = SKIP,
|
124
124
|
product_handle = SKIP,
|
125
125
|
period_range_start = SKIP,
|
126
|
-
period_range_end = SKIP
|
126
|
+
period_range_end = SKIP,
|
127
|
+
additional_properties = {})
|
127
128
|
@transaction_type = transaction_type unless transaction_type == SKIP
|
128
129
|
@kind = kind unless kind == SKIP
|
129
130
|
@amount_in_cents = amount_in_cents unless amount_in_cents == SKIP
|
@@ -138,6 +139,11 @@ module AdvancedBilling
|
|
138
139
|
@product_handle = product_handle unless product_handle == SKIP
|
139
140
|
@period_range_start = period_range_start unless period_range_start == SKIP
|
140
141
|
@period_range_end = period_range_end unless period_range_end == SKIP
|
142
|
+
|
143
|
+
# Add additional model properties to the instance.
|
144
|
+
additional_properties.each do |_name, _value|
|
145
|
+
instance_variable_set("@#{_name}", _value)
|
146
|
+
end
|
141
147
|
end
|
142
148
|
|
143
149
|
# Creates an instance of the object from a hash.
|
@@ -169,6 +175,9 @@ module AdvancedBilling
|
|
169
175
|
period_range_end =
|
170
176
|
hash.key?('period_range_end') ? hash['period_range_end'] : SKIP
|
171
177
|
|
178
|
+
# Clean out expected properties from Hash.
|
179
|
+
names.each_value { |k| hash.delete(k) }
|
180
|
+
|
172
181
|
# Create object from extracted values.
|
173
182
|
RenewalPreviewLineItem.new(transaction_type,
|
174
183
|
kind,
|
@@ -183,7 +192,8 @@ module AdvancedBilling
|
|
183
192
|
component_name,
|
184
193
|
product_handle,
|
185
194
|
period_range_start,
|
186
|
-
period_range_end
|
195
|
+
period_range_end,
|
196
|
+
hash)
|
187
197
|
end
|
188
198
|
end
|
189
199
|
end
|
@@ -35,8 +35,14 @@ module AdvancedBilling
|
|
35
35
|
[]
|
36
36
|
end
|
37
37
|
|
38
|
-
def initialize(components = SKIP
|
38
|
+
def initialize(components = SKIP,
|
39
|
+
additional_properties = {})
|
39
40
|
@components = components unless components == SKIP
|
41
|
+
|
42
|
+
# Add additional model properties to the instance.
|
43
|
+
additional_properties.each do |_name, _value|
|
44
|
+
instance_variable_set("@#{_name}", _value)
|
45
|
+
end
|
40
46
|
end
|
41
47
|
|
42
48
|
# Creates an instance of the object from a hash.
|
@@ -55,8 +61,12 @@ module AdvancedBilling
|
|
55
61
|
|
56
62
|
components = SKIP unless hash.key?('components')
|
57
63
|
|
64
|
+
# Clean out expected properties from Hash.
|
65
|
+
names.each_value { |k| hash.delete(k) }
|
66
|
+
|
58
67
|
# Create object from extracted values.
|
59
|
-
RenewalPreviewRequest.new(components
|
68
|
+
RenewalPreviewRequest.new(components,
|
69
|
+
hash)
|
60
70
|
end
|
61
71
|
end
|
62
72
|
end
|
@@ -30,8 +30,14 @@ module AdvancedBilling
|
|
30
30
|
[]
|
31
31
|
end
|
32
32
|
|
33
|
-
def initialize(renewal_preview = nil
|
33
|
+
def initialize(renewal_preview = nil,
|
34
|
+
additional_properties = {})
|
34
35
|
@renewal_preview = renewal_preview
|
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.
|
@@ -42,8 +48,12 @@ module AdvancedBilling
|
|
42
48
|
renewal_preview = RenewalPreview.from_hash(hash['renewal_preview']) if
|
43
49
|
hash['renewal_preview']
|
44
50
|
|
51
|
+
# Clean out expected properties from Hash.
|
52
|
+
names.each_value { |k| hash.delete(k) }
|
53
|
+
|
45
54
|
# Create object from extracted values.
|
46
|
-
RenewalPreviewResponse.new(renewal_preview
|
55
|
+
RenewalPreviewResponse.new(renewal_preview,
|
56
|
+
hash)
|
47
57
|
end
|
48
58
|
end
|
49
59
|
end
|
@@ -30,8 +30,14 @@ module AdvancedBilling
|
|
30
30
|
[]
|
31
31
|
end
|
32
32
|
|
33
|
-
def initialize(ids = nil
|
33
|
+
def initialize(ids = nil,
|
34
|
+
additional_properties = {})
|
34
35
|
@ids = ids
|
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
|
ids = hash.key?('ids') ? hash['ids'] : nil
|
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
|
-
ReplayWebhooksRequest.new(ids
|
54
|
+
ReplayWebhooksRequest.new(ids,
|
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(status = SKIP
|
35
|
+
def initialize(status = SKIP,
|
36
|
+
additional_properties = {})
|
36
37
|
@status = status unless status == 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
|
status = hash.key?('status') ? hash['status'] : 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
|
-
ReplayWebhooksResponse.new(status
|
56
|
+
ReplayWebhooksResponse.new(status,
|
57
|
+
hash)
|
48
58
|
end
|
49
59
|
end
|
50
60
|
end
|
@@ -53,11 +53,17 @@ module AdvancedBilling
|
|
53
53
|
def initialize(last_sent_at = SKIP,
|
54
54
|
last_accepted_at = SKIP,
|
55
55
|
send_invite_link_text = SKIP,
|
56
|
-
uninvited_count = SKIP
|
56
|
+
uninvited_count = SKIP,
|
57
|
+
additional_properties = {})
|
57
58
|
@last_sent_at = last_sent_at unless last_sent_at == SKIP
|
58
59
|
@last_accepted_at = last_accepted_at unless last_accepted_at == SKIP
|
59
60
|
@send_invite_link_text = send_invite_link_text unless send_invite_link_text == SKIP
|
60
61
|
@uninvited_count = uninvited_count unless uninvited_count == SKIP
|
62
|
+
|
63
|
+
# Add additional model properties to the instance.
|
64
|
+
additional_properties.each do |_name, _value|
|
65
|
+
instance_variable_set("@#{_name}", _value)
|
66
|
+
end
|
61
67
|
end
|
62
68
|
|
63
69
|
# Creates an instance of the object from a hash.
|
@@ -73,11 +79,15 @@ module AdvancedBilling
|
|
73
79
|
uninvited_count =
|
74
80
|
hash.key?('uninvited_count') ? hash['uninvited_count'] : SKIP
|
75
81
|
|
82
|
+
# Clean out expected properties from Hash.
|
83
|
+
names.each_value { |k| hash.delete(k) }
|
84
|
+
|
76
85
|
# Create object from extracted values.
|
77
86
|
ResentInvitation.new(last_sent_at,
|
78
87
|
last_accepted_at,
|
79
88
|
send_invite_link_text,
|
80
|
-
uninvited_count
|
89
|
+
uninvited_count,
|
90
|
+
hash)
|
81
91
|
end
|
82
92
|
end
|
83
93
|
end
|
@@ -43,9 +43,15 @@ module AdvancedBilling
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def initialize(require_resume = SKIP,
|
46
|
-
forgive_balance = SKIP
|
46
|
+
forgive_balance = SKIP,
|
47
|
+
additional_properties = {})
|
47
48
|
@require_resume = require_resume unless require_resume == SKIP
|
48
49
|
@forgive_balance = forgive_balance unless forgive_balance == SKIP
|
50
|
+
|
51
|
+
# Add additional model properties to the instance.
|
52
|
+
additional_properties.each do |_name, _value|
|
53
|
+
instance_variable_set("@#{_name}", _value)
|
54
|
+
end
|
49
55
|
end
|
50
56
|
|
51
57
|
# Creates an instance of the object from a hash.
|
@@ -58,9 +64,13 @@ module AdvancedBilling
|
|
58
64
|
forgive_balance =
|
59
65
|
hash.key?('forgive_balance') ? hash['forgive_balance'] : SKIP
|
60
66
|
|
67
|
+
# Clean out expected properties from Hash.
|
68
|
+
names.each_value { |k| hash.delete(k) }
|
69
|
+
|
61
70
|
# Create object from extracted values.
|
62
71
|
ResumeOptions.new(require_resume,
|
63
|
-
forgive_balance
|
72
|
+
forgive_balance,
|
73
|
+
hash)
|
64
74
|
end
|
65
75
|
|
66
76
|
# Validates an instance of the object from a given value.
|
@@ -46,10 +46,16 @@ module AdvancedBilling
|
|
46
46
|
|
47
47
|
def initialize(last_sent_at = SKIP,
|
48
48
|
last_accepted_at = SKIP,
|
49
|
-
uninvited_count = SKIP
|
49
|
+
uninvited_count = SKIP,
|
50
|
+
additional_properties = {})
|
50
51
|
@last_sent_at = last_sent_at unless last_sent_at == SKIP
|
51
52
|
@last_accepted_at = last_accepted_at unless last_accepted_at == SKIP
|
52
53
|
@uninvited_count = uninvited_count unless uninvited_count == SKIP
|
54
|
+
|
55
|
+
# Add additional model properties to the instance.
|
56
|
+
additional_properties.each do |_name, _value|
|
57
|
+
instance_variable_set("@#{_name}", _value)
|
58
|
+
end
|
53
59
|
end
|
54
60
|
|
55
61
|
# Creates an instance of the object from a hash.
|
@@ -63,10 +69,14 @@ module AdvancedBilling
|
|
63
69
|
uninvited_count =
|
64
70
|
hash.key?('uninvited_count') ? hash['uninvited_count'] : SKIP
|
65
71
|
|
72
|
+
# Clean out expected properties from Hash.
|
73
|
+
names.each_value { |k| hash.delete(k) }
|
74
|
+
|
66
75
|
# Create object from extracted values.
|
67
76
|
RevokedInvitation.new(last_sent_at,
|
68
77
|
last_accepted_at,
|
69
|
-
uninvited_count
|
78
|
+
uninvited_count,
|
79
|
+
hash)
|
70
80
|
end
|
71
81
|
end
|
72
82
|
end
|
@@ -60,12 +60,18 @@ module AdvancedBilling
|
|
60
60
|
full_name = SKIP,
|
61
61
|
subscriptions_count = SKIP,
|
62
62
|
test_mode = SKIP,
|
63
|
-
subscriptions = SKIP
|
63
|
+
subscriptions = SKIP,
|
64
|
+
additional_properties = {})
|
64
65
|
@id = id unless id == SKIP
|
65
66
|
@full_name = full_name unless full_name == SKIP
|
66
67
|
@subscriptions_count = subscriptions_count unless subscriptions_count == SKIP
|
67
68
|
@test_mode = test_mode unless test_mode == SKIP
|
68
69
|
@subscriptions = subscriptions unless subscriptions == SKIP
|
70
|
+
|
71
|
+
# Add additional model properties to the instance.
|
72
|
+
additional_properties.each do |_name, _value|
|
73
|
+
instance_variable_set("@#{_name}", _value)
|
74
|
+
end
|
69
75
|
end
|
70
76
|
|
71
77
|
# Creates an instance of the object from a hash.
|
@@ -89,12 +95,16 @@ module AdvancedBilling
|
|
89
95
|
|
90
96
|
subscriptions = SKIP unless hash.key?('subscriptions')
|
91
97
|
|
98
|
+
# Clean out expected properties from Hash.
|
99
|
+
names.each_value { |k| hash.delete(k) }
|
100
|
+
|
92
101
|
# Create object from extracted values.
|
93
102
|
SaleRep.new(id,
|
94
103
|
full_name,
|
95
104
|
subscriptions_count,
|
96
105
|
test_mode,
|
97
|
-
subscriptions
|
106
|
+
subscriptions,
|
107
|
+
hash)
|
98
108
|
end
|
99
109
|
end
|
100
110
|
end
|
@@ -46,10 +46,16 @@ module AdvancedBilling
|
|
46
46
|
|
47
47
|
def initialize(mrr = SKIP,
|
48
48
|
usage = SKIP,
|
49
|
-
recurring = SKIP
|
49
|
+
recurring = SKIP,
|
50
|
+
additional_properties = {})
|
50
51
|
@mrr = mrr unless mrr == SKIP
|
51
52
|
@usage = usage unless usage == SKIP
|
52
53
|
@recurring = recurring unless recurring == SKIP
|
54
|
+
|
55
|
+
# Add additional model properties to the instance.
|
56
|
+
additional_properties.each do |_name, _value|
|
57
|
+
instance_variable_set("@#{_name}", _value)
|
58
|
+
end
|
53
59
|
end
|
54
60
|
|
55
61
|
# Creates an instance of the object from a hash.
|
@@ -61,10 +67,14 @@ module AdvancedBilling
|
|
61
67
|
usage = hash.key?('usage') ? hash['usage'] : SKIP
|
62
68
|
recurring = hash.key?('recurring') ? hash['recurring'] : SKIP
|
63
69
|
|
70
|
+
# Clean out expected properties from Hash.
|
71
|
+
names.each_value { |k| hash.delete(k) }
|
72
|
+
|
64
73
|
# Create object from extracted values.
|
65
74
|
SaleRepItemMrr.new(mrr,
|
66
75
|
usage,
|
67
|
-
recurring
|
76
|
+
recurring,
|
77
|
+
hash)
|
68
78
|
end
|
69
79
|
end
|
70
80
|
end
|
@@ -74,7 +74,8 @@ module AdvancedBilling
|
|
74
74
|
site_name = SKIP,
|
75
75
|
subscription_mrr = SKIP,
|
76
76
|
sales_rep_id = SKIP,
|
77
|
-
sales_rep_name = SKIP
|
77
|
+
sales_rep_name = SKIP,
|
78
|
+
additional_properties = {})
|
78
79
|
@customer_name = customer_name unless customer_name == SKIP
|
79
80
|
@subscription_id = subscription_id unless subscription_id == SKIP
|
80
81
|
@site_link = site_link unless site_link == SKIP
|
@@ -82,6 +83,11 @@ module AdvancedBilling
|
|
82
83
|
@subscription_mrr = subscription_mrr unless subscription_mrr == SKIP
|
83
84
|
@sales_rep_id = sales_rep_id unless sales_rep_id == SKIP
|
84
85
|
@sales_rep_name = sales_rep_name unless sales_rep_name == SKIP
|
86
|
+
|
87
|
+
# Add additional model properties to the instance.
|
88
|
+
additional_properties.each do |_name, _value|
|
89
|
+
instance_variable_set("@#{_name}", _value)
|
90
|
+
end
|
85
91
|
end
|
86
92
|
|
87
93
|
# Creates an instance of the object from a hash.
|
@@ -100,6 +106,9 @@ module AdvancedBilling
|
|
100
106
|
sales_rep_name =
|
101
107
|
hash.key?('sales_rep_name') ? hash['sales_rep_name'] : SKIP
|
102
108
|
|
109
|
+
# Clean out expected properties from Hash.
|
110
|
+
names.each_value { |k| hash.delete(k) }
|
111
|
+
|
103
112
|
# Create object from extracted values.
|
104
113
|
SaleRepSettings.new(customer_name,
|
105
114
|
subscription_id,
|
@@ -107,7 +116,8 @@ module AdvancedBilling
|
|
107
116
|
site_name,
|
108
117
|
subscription_mrr,
|
109
118
|
sales_rep_id,
|
110
|
-
sales_rep_name
|
119
|
+
sales_rep_name,
|
120
|
+
hash)
|
111
121
|
end
|
112
122
|
end
|
113
123
|
end
|
@@ -97,7 +97,8 @@ module AdvancedBilling
|
|
97
97
|
usage = SKIP,
|
98
98
|
recurring = SKIP,
|
99
99
|
last_payment = SKIP,
|
100
|
-
churn_date = SKIP
|
100
|
+
churn_date = SKIP,
|
101
|
+
additional_properties = {})
|
101
102
|
@id = id unless id == SKIP
|
102
103
|
@site_name = site_name unless site_name == SKIP
|
103
104
|
@subscription_url = subscription_url unless subscription_url == SKIP
|
@@ -108,6 +109,11 @@ module AdvancedBilling
|
|
108
109
|
@recurring = recurring unless recurring == SKIP
|
109
110
|
@last_payment = last_payment unless last_payment == SKIP
|
110
111
|
@churn_date = churn_date unless churn_date == SKIP
|
112
|
+
|
113
|
+
# Add additional model properties to the instance.
|
114
|
+
additional_properties.each do |_name, _value|
|
115
|
+
instance_variable_set("@#{_name}", _value)
|
116
|
+
end
|
111
117
|
end
|
112
118
|
|
113
119
|
# Creates an instance of the object from a hash.
|
@@ -127,6 +133,9 @@ module AdvancedBilling
|
|
127
133
|
last_payment = hash.key?('last_payment') ? hash['last_payment'] : SKIP
|
128
134
|
churn_date = hash.key?('churn_date') ? hash['churn_date'] : SKIP
|
129
135
|
|
136
|
+
# Clean out expected properties from Hash.
|
137
|
+
names.each_value { |k| hash.delete(k) }
|
138
|
+
|
130
139
|
# Create object from extracted values.
|
131
140
|
SaleRepSubscription.new(id,
|
132
141
|
site_name,
|
@@ -137,7 +146,8 @@ module AdvancedBilling
|
|
137
146
|
usage,
|
138
147
|
recurring,
|
139
148
|
last_payment,
|
140
|
-
churn_date
|
149
|
+
churn_date,
|
150
|
+
hash)
|
141
151
|
end
|
142
152
|
end
|
143
153
|
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
|
# Segment Model.
|
8
9
|
class Segment < BaseModel
|
@@ -58,13 +59,13 @@ module AdvancedBilling
|
|
58
59
|
# The identifier for the pricing scheme. See [Product
|
59
60
|
# Components](https://help.chargify.com/products/product-components.html)
|
60
61
|
# for an overview of pricing schemes.
|
61
|
-
# @return [
|
62
|
+
# @return [DateTime]
|
62
63
|
attr_accessor :created_at
|
63
64
|
|
64
65
|
# The identifier for the pricing scheme. See [Product
|
65
66
|
# Components](https://help.chargify.com/products/product-components.html)
|
66
67
|
# for an overview of pricing schemes.
|
67
|
-
# @return [
|
68
|
+
# @return [DateTime]
|
68
69
|
attr_accessor :updated_at
|
69
70
|
|
70
71
|
# The identifier for the pricing scheme. See [Product
|
@@ -126,7 +127,8 @@ module AdvancedBilling
|
|
126
127
|
segment_property_4_value = SKIP,
|
127
128
|
created_at = SKIP,
|
128
129
|
updated_at = SKIP,
|
129
|
-
prices = SKIP
|
130
|
+
prices = SKIP,
|
131
|
+
additional_properties = {})
|
130
132
|
@id = id unless id == SKIP
|
131
133
|
@component_id = component_id unless component_id == SKIP
|
132
134
|
@price_point_id = price_point_id unless price_point_id == SKIP
|
@@ -142,6 +144,11 @@ module AdvancedBilling
|
|
142
144
|
@created_at = created_at unless created_at == SKIP
|
143
145
|
@updated_at = updated_at unless updated_at == SKIP
|
144
146
|
@prices = prices unless prices == SKIP
|
147
|
+
|
148
|
+
# Add additional model properties to the instance.
|
149
|
+
additional_properties.each do |_name, _value|
|
150
|
+
instance_variable_set("@#{_name}", _value)
|
151
|
+
end
|
145
152
|
end
|
146
153
|
|
147
154
|
# Creates an instance of the object from a hash.
|
@@ -169,8 +176,16 @@ module AdvancedBilling
|
|
169
176
|
segment_property_4_value = hash.key?('segment_property_4_value') ? APIHelper.deserialize_union_type(
|
170
177
|
UnionTypeLookUp.get(:SegmentSegmentProperty4Value), hash['segment_property_4_value']
|
171
178
|
) : SKIP
|
172
|
-
created_at = hash.key?('created_at')
|
173
|
-
|
179
|
+
created_at = if hash.key?('created_at')
|
180
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
181
|
+
else
|
182
|
+
SKIP
|
183
|
+
end
|
184
|
+
updated_at = if hash.key?('updated_at')
|
185
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
186
|
+
else
|
187
|
+
SKIP
|
188
|
+
end
|
174
189
|
# Parameter is an array, so we need to iterate through it
|
175
190
|
prices = nil
|
176
191
|
unless hash['prices'].nil?
|
@@ -182,6 +197,9 @@ module AdvancedBilling
|
|
182
197
|
|
183
198
|
prices = SKIP unless hash.key?('prices')
|
184
199
|
|
200
|
+
# Clean out expected properties from Hash.
|
201
|
+
names.each_value { |k| hash.delete(k) }
|
202
|
+
|
185
203
|
# Create object from extracted values.
|
186
204
|
Segment.new(id,
|
187
205
|
component_id,
|
@@ -194,7 +212,16 @@ module AdvancedBilling
|
|
194
212
|
segment_property_4_value,
|
195
213
|
created_at,
|
196
214
|
updated_at,
|
197
|
-
prices
|
215
|
+
prices,
|
216
|
+
hash)
|
217
|
+
end
|
218
|
+
|
219
|
+
def to_custom_created_at
|
220
|
+
DateTimeHelper.to_rfc3339(created_at)
|
221
|
+
end
|
222
|
+
|
223
|
+
def to_custom_updated_at
|
224
|
+
DateTimeHelper.to_rfc3339(updated_at)
|
198
225
|
end
|
199
226
|
|
200
227
|
# Validates an instance of the object from a given value.
|