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
|
# FullSubscriptionGroupResponse Model.
|
8
9
|
class FullSubscriptionGroupResponse < BaseModel
|
@@ -34,26 +35,366 @@ module AdvancedBilling
|
|
34
35
|
attr_accessor :primary_subscription_id
|
35
36
|
|
36
37
|
# TODO: Write general description for this method
|
37
|
-
# @return [
|
38
|
+
# @return [DateTime]
|
38
39
|
attr_accessor :next_assessment_at
|
39
40
|
|
40
|
-
#
|
41
|
-
#
|
41
|
+
# The state of a subscription.
|
42
|
+
# * **Live States**
|
43
|
+
# * `active` - A normal, active subscription. It is not in a trial and
|
44
|
+
# is paid and up to date.
|
45
|
+
# * `assessing` - An internal (transient) state that indicates a
|
46
|
+
# subscription is in the middle of periodic assessment. Do not base any
|
47
|
+
# access decisions in your app on this state, as it may not always be
|
48
|
+
# exposed.
|
49
|
+
# * `pending` - An internal (transient) state that indicates a
|
50
|
+
# subscription is in the creation process. Do not base any access decisions
|
51
|
+
# in your app on this state, as it may not always be exposed.
|
52
|
+
# * `trialing` - A subscription in trialing state has a valid trial
|
53
|
+
# subscription. This type of subscription may transition to active once
|
54
|
+
# payment is received when the trial has ended. Otherwise, it may go to a
|
55
|
+
# Problem or End of Life state.
|
56
|
+
# * `paused` - An internal state that indicates that your account with
|
57
|
+
# Advanced Billing is in arrears.
|
58
|
+
# * **Problem States**
|
59
|
+
# * `past_due` - Indicates that the most recent payment has failed, and
|
60
|
+
# payment is past due for this subscription. If you have enabled our
|
61
|
+
# automated dunning, this subscription will be in the dunning process
|
62
|
+
# (additional status and callbacks from the dunning process will be
|
63
|
+
# available in the future). If you are handling dunning and payment updates
|
64
|
+
# yourself, you will want to use this state to initiate a payment update
|
65
|
+
# from your customers.
|
66
|
+
# * `soft_failure` - Indicates that normal assessment/processing of the
|
67
|
+
# subscription has failed for a reason that cannot be fixed by the Customer.
|
68
|
+
# For example, a Soft Fail may result from a timeout at the gateway or
|
69
|
+
# incorrect credentials on your part. The subscriptions should be retried
|
70
|
+
# automatically. An interface is being built for you to review problems
|
71
|
+
# resulting from these events to take manual action when needed.
|
72
|
+
# * `unpaid` - Indicates an unpaid subscription. A subscription is
|
73
|
+
# marked unpaid if the retry period expires and you have configured your
|
74
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
75
|
+
# 05) settings to have a Final Action of `mark the subscription unpaid`.
|
76
|
+
# * **End of Life States**
|
77
|
+
# * `canceled` - Indicates a canceled subscription. This may happen at
|
78
|
+
# your request (via the API or the web interface) or due to the expiration
|
79
|
+
# of the
|
80
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
81
|
+
# 05) process without payment. See the
|
82
|
+
# [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/540455
|
83
|
+
# 9291021) documentation for info on how to restart a canceled subscription.
|
84
|
+
# While a subscription is canceled, its period will not advance, it will
|
85
|
+
# not accrue any new charges, and Advanced Billing will not attempt to
|
86
|
+
# collect the overdue balance.
|
87
|
+
# * `expired` - Indicates a subscription that has expired due to running
|
88
|
+
# its normal life cycle. Some products may be configured to have an
|
89
|
+
# expiration period. An expired subscription then is one that stayed active
|
90
|
+
# until it fulfilled its full period.
|
91
|
+
# * `failed_to_create` - Indicates that signup has failed. (You may see
|
92
|
+
# this state in a signup_failure webhook.)
|
93
|
+
# * `on_hold` - Indicates that a subscription’s billing has been
|
94
|
+
# temporarily stopped. While it is expected that the subscription will
|
95
|
+
# resume and return to active status, this is still treated as an “End of
|
96
|
+
# Life” state because the customer is not paying for services during this
|
97
|
+
# time.
|
98
|
+
# * `suspended` - Indicates that a prepaid subscription has used up all
|
99
|
+
# their prepayment balance. If a prepayment is applied, it will return to an
|
100
|
+
# active state.
|
101
|
+
# * `trial_ended` - A subscription in a trial_ended state is a
|
102
|
+
# subscription that completed a no-obligation trial and did not have a card
|
103
|
+
# on file at the expiration of the trial period. See [Product Pricing – No
|
104
|
+
# Obligation
|
105
|
+
# Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221
|
106
|
+
# ) for more details.
|
107
|
+
# See [Subscription
|
108
|
+
# States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773
|
109
|
+
# ) for more info about subscription states and state transitions.
|
110
|
+
# @return [SubscriptionState]
|
42
111
|
attr_accessor :state
|
43
112
|
|
44
|
-
#
|
113
|
+
# The state of a subscription.
|
114
|
+
# * **Live States**
|
115
|
+
# * `active` - A normal, active subscription. It is not in a trial and
|
116
|
+
# is paid and up to date.
|
117
|
+
# * `assessing` - An internal (transient) state that indicates a
|
118
|
+
# subscription is in the middle of periodic assessment. Do not base any
|
119
|
+
# access decisions in your app on this state, as it may not always be
|
120
|
+
# exposed.
|
121
|
+
# * `pending` - An internal (transient) state that indicates a
|
122
|
+
# subscription is in the creation process. Do not base any access decisions
|
123
|
+
# in your app on this state, as it may not always be exposed.
|
124
|
+
# * `trialing` - A subscription in trialing state has a valid trial
|
125
|
+
# subscription. This type of subscription may transition to active once
|
126
|
+
# payment is received when the trial has ended. Otherwise, it may go to a
|
127
|
+
# Problem or End of Life state.
|
128
|
+
# * `paused` - An internal state that indicates that your account with
|
129
|
+
# Advanced Billing is in arrears.
|
130
|
+
# * **Problem States**
|
131
|
+
# * `past_due` - Indicates that the most recent payment has failed, and
|
132
|
+
# payment is past due for this subscription. If you have enabled our
|
133
|
+
# automated dunning, this subscription will be in the dunning process
|
134
|
+
# (additional status and callbacks from the dunning process will be
|
135
|
+
# available in the future). If you are handling dunning and payment updates
|
136
|
+
# yourself, you will want to use this state to initiate a payment update
|
137
|
+
# from your customers.
|
138
|
+
# * `soft_failure` - Indicates that normal assessment/processing of the
|
139
|
+
# subscription has failed for a reason that cannot be fixed by the Customer.
|
140
|
+
# For example, a Soft Fail may result from a timeout at the gateway or
|
141
|
+
# incorrect credentials on your part. The subscriptions should be retried
|
142
|
+
# automatically. An interface is being built for you to review problems
|
143
|
+
# resulting from these events to take manual action when needed.
|
144
|
+
# * `unpaid` - Indicates an unpaid subscription. A subscription is
|
145
|
+
# marked unpaid if the retry period expires and you have configured your
|
146
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
147
|
+
# 05) settings to have a Final Action of `mark the subscription unpaid`.
|
148
|
+
# * **End of Life States**
|
149
|
+
# * `canceled` - Indicates a canceled subscription. This may happen at
|
150
|
+
# your request (via the API or the web interface) or due to the expiration
|
151
|
+
# of the
|
152
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
153
|
+
# 05) process without payment. See the
|
154
|
+
# [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/540455
|
155
|
+
# 9291021) documentation for info on how to restart a canceled subscription.
|
156
|
+
# While a subscription is canceled, its period will not advance, it will
|
157
|
+
# not accrue any new charges, and Advanced Billing will not attempt to
|
158
|
+
# collect the overdue balance.
|
159
|
+
# * `expired` - Indicates a subscription that has expired due to running
|
160
|
+
# its normal life cycle. Some products may be configured to have an
|
161
|
+
# expiration period. An expired subscription then is one that stayed active
|
162
|
+
# until it fulfilled its full period.
|
163
|
+
# * `failed_to_create` - Indicates that signup has failed. (You may see
|
164
|
+
# this state in a signup_failure webhook.)
|
165
|
+
# * `on_hold` - Indicates that a subscription’s billing has been
|
166
|
+
# temporarily stopped. While it is expected that the subscription will
|
167
|
+
# resume and return to active status, this is still treated as an “End of
|
168
|
+
# Life” state because the customer is not paying for services during this
|
169
|
+
# time.
|
170
|
+
# * `suspended` - Indicates that a prepaid subscription has used up all
|
171
|
+
# their prepayment balance. If a prepayment is applied, it will return to an
|
172
|
+
# active state.
|
173
|
+
# * `trial_ended` - A subscription in a trial_ended state is a
|
174
|
+
# subscription that completed a no-obligation trial and did not have a card
|
175
|
+
# on file at the expiration of the trial period. See [Product Pricing – No
|
176
|
+
# Obligation
|
177
|
+
# Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221
|
178
|
+
# ) for more details.
|
179
|
+
# See [Subscription
|
180
|
+
# States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773
|
181
|
+
# ) for more info about subscription states and state transitions.
|
45
182
|
# @return [TrueClass | FalseClass]
|
46
183
|
attr_accessor :cancel_at_end_of_period
|
47
184
|
|
48
|
-
#
|
185
|
+
# The state of a subscription.
|
186
|
+
# * **Live States**
|
187
|
+
# * `active` - A normal, active subscription. It is not in a trial and
|
188
|
+
# is paid and up to date.
|
189
|
+
# * `assessing` - An internal (transient) state that indicates a
|
190
|
+
# subscription is in the middle of periodic assessment. Do not base any
|
191
|
+
# access decisions in your app on this state, as it may not always be
|
192
|
+
# exposed.
|
193
|
+
# * `pending` - An internal (transient) state that indicates a
|
194
|
+
# subscription is in the creation process. Do not base any access decisions
|
195
|
+
# in your app on this state, as it may not always be exposed.
|
196
|
+
# * `trialing` - A subscription in trialing state has a valid trial
|
197
|
+
# subscription. This type of subscription may transition to active once
|
198
|
+
# payment is received when the trial has ended. Otherwise, it may go to a
|
199
|
+
# Problem or End of Life state.
|
200
|
+
# * `paused` - An internal state that indicates that your account with
|
201
|
+
# Advanced Billing is in arrears.
|
202
|
+
# * **Problem States**
|
203
|
+
# * `past_due` - Indicates that the most recent payment has failed, and
|
204
|
+
# payment is past due for this subscription. If you have enabled our
|
205
|
+
# automated dunning, this subscription will be in the dunning process
|
206
|
+
# (additional status and callbacks from the dunning process will be
|
207
|
+
# available in the future). If you are handling dunning and payment updates
|
208
|
+
# yourself, you will want to use this state to initiate a payment update
|
209
|
+
# from your customers.
|
210
|
+
# * `soft_failure` - Indicates that normal assessment/processing of the
|
211
|
+
# subscription has failed for a reason that cannot be fixed by the Customer.
|
212
|
+
# For example, a Soft Fail may result from a timeout at the gateway or
|
213
|
+
# incorrect credentials on your part. The subscriptions should be retried
|
214
|
+
# automatically. An interface is being built for you to review problems
|
215
|
+
# resulting from these events to take manual action when needed.
|
216
|
+
# * `unpaid` - Indicates an unpaid subscription. A subscription is
|
217
|
+
# marked unpaid if the retry period expires and you have configured your
|
218
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
219
|
+
# 05) settings to have a Final Action of `mark the subscription unpaid`.
|
220
|
+
# * **End of Life States**
|
221
|
+
# * `canceled` - Indicates a canceled subscription. This may happen at
|
222
|
+
# your request (via the API or the web interface) or due to the expiration
|
223
|
+
# of the
|
224
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
225
|
+
# 05) process without payment. See the
|
226
|
+
# [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/540455
|
227
|
+
# 9291021) documentation for info on how to restart a canceled subscription.
|
228
|
+
# While a subscription is canceled, its period will not advance, it will
|
229
|
+
# not accrue any new charges, and Advanced Billing will not attempt to
|
230
|
+
# collect the overdue balance.
|
231
|
+
# * `expired` - Indicates a subscription that has expired due to running
|
232
|
+
# its normal life cycle. Some products may be configured to have an
|
233
|
+
# expiration period. An expired subscription then is one that stayed active
|
234
|
+
# until it fulfilled its full period.
|
235
|
+
# * `failed_to_create` - Indicates that signup has failed. (You may see
|
236
|
+
# this state in a signup_failure webhook.)
|
237
|
+
# * `on_hold` - Indicates that a subscription’s billing has been
|
238
|
+
# temporarily stopped. While it is expected that the subscription will
|
239
|
+
# resume and return to active status, this is still treated as an “End of
|
240
|
+
# Life” state because the customer is not paying for services during this
|
241
|
+
# time.
|
242
|
+
# * `suspended` - Indicates that a prepaid subscription has used up all
|
243
|
+
# their prepayment balance. If a prepayment is applied, it will return to an
|
244
|
+
# active state.
|
245
|
+
# * `trial_ended` - A subscription in a trial_ended state is a
|
246
|
+
# subscription that completed a no-obligation trial and did not have a card
|
247
|
+
# on file at the expiration of the trial period. See [Product Pricing – No
|
248
|
+
# Obligation
|
249
|
+
# Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221
|
250
|
+
# ) for more details.
|
251
|
+
# See [Subscription
|
252
|
+
# States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773
|
253
|
+
# ) for more info about subscription states and state transitions.
|
49
254
|
# @return [Integer]
|
50
255
|
attr_accessor :current_billing_amount_in_cents
|
51
256
|
|
52
|
-
#
|
257
|
+
# The state of a subscription.
|
258
|
+
# * **Live States**
|
259
|
+
# * `active` - A normal, active subscription. It is not in a trial and
|
260
|
+
# is paid and up to date.
|
261
|
+
# * `assessing` - An internal (transient) state that indicates a
|
262
|
+
# subscription is in the middle of periodic assessment. Do not base any
|
263
|
+
# access decisions in your app on this state, as it may not always be
|
264
|
+
# exposed.
|
265
|
+
# * `pending` - An internal (transient) state that indicates a
|
266
|
+
# subscription is in the creation process. Do not base any access decisions
|
267
|
+
# in your app on this state, as it may not always be exposed.
|
268
|
+
# * `trialing` - A subscription in trialing state has a valid trial
|
269
|
+
# subscription. This type of subscription may transition to active once
|
270
|
+
# payment is received when the trial has ended. Otherwise, it may go to a
|
271
|
+
# Problem or End of Life state.
|
272
|
+
# * `paused` - An internal state that indicates that your account with
|
273
|
+
# Advanced Billing is in arrears.
|
274
|
+
# * **Problem States**
|
275
|
+
# * `past_due` - Indicates that the most recent payment has failed, and
|
276
|
+
# payment is past due for this subscription. If you have enabled our
|
277
|
+
# automated dunning, this subscription will be in the dunning process
|
278
|
+
# (additional status and callbacks from the dunning process will be
|
279
|
+
# available in the future). If you are handling dunning and payment updates
|
280
|
+
# yourself, you will want to use this state to initiate a payment update
|
281
|
+
# from your customers.
|
282
|
+
# * `soft_failure` - Indicates that normal assessment/processing of the
|
283
|
+
# subscription has failed for a reason that cannot be fixed by the Customer.
|
284
|
+
# For example, a Soft Fail may result from a timeout at the gateway or
|
285
|
+
# incorrect credentials on your part. The subscriptions should be retried
|
286
|
+
# automatically. An interface is being built for you to review problems
|
287
|
+
# resulting from these events to take manual action when needed.
|
288
|
+
# * `unpaid` - Indicates an unpaid subscription. A subscription is
|
289
|
+
# marked unpaid if the retry period expires and you have configured your
|
290
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
291
|
+
# 05) settings to have a Final Action of `mark the subscription unpaid`.
|
292
|
+
# * **End of Life States**
|
293
|
+
# * `canceled` - Indicates a canceled subscription. This may happen at
|
294
|
+
# your request (via the API or the web interface) or due to the expiration
|
295
|
+
# of the
|
296
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
297
|
+
# 05) process without payment. See the
|
298
|
+
# [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/540455
|
299
|
+
# 9291021) documentation for info on how to restart a canceled subscription.
|
300
|
+
# While a subscription is canceled, its period will not advance, it will
|
301
|
+
# not accrue any new charges, and Advanced Billing will not attempt to
|
302
|
+
# collect the overdue balance.
|
303
|
+
# * `expired` - Indicates a subscription that has expired due to running
|
304
|
+
# its normal life cycle. Some products may be configured to have an
|
305
|
+
# expiration period. An expired subscription then is one that stayed active
|
306
|
+
# until it fulfilled its full period.
|
307
|
+
# * `failed_to_create` - Indicates that signup has failed. (You may see
|
308
|
+
# this state in a signup_failure webhook.)
|
309
|
+
# * `on_hold` - Indicates that a subscription’s billing has been
|
310
|
+
# temporarily stopped. While it is expected that the subscription will
|
311
|
+
# resume and return to active status, this is still treated as an “End of
|
312
|
+
# Life” state because the customer is not paying for services during this
|
313
|
+
# time.
|
314
|
+
# * `suspended` - Indicates that a prepaid subscription has used up all
|
315
|
+
# their prepayment balance. If a prepayment is applied, it will return to an
|
316
|
+
# active state.
|
317
|
+
# * `trial_ended` - A subscription in a trial_ended state is a
|
318
|
+
# subscription that completed a no-obligation trial and did not have a card
|
319
|
+
# on file at the expiration of the trial period. See [Product Pricing – No
|
320
|
+
# Obligation
|
321
|
+
# Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221
|
322
|
+
# ) for more details.
|
323
|
+
# See [Subscription
|
324
|
+
# States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773
|
325
|
+
# ) for more info about subscription states and state transitions.
|
53
326
|
# @return [SubscriptionGroupCustomer]
|
54
327
|
attr_accessor :customer
|
55
328
|
|
56
|
-
#
|
329
|
+
# The state of a subscription.
|
330
|
+
# * **Live States**
|
331
|
+
# * `active` - A normal, active subscription. It is not in a trial and
|
332
|
+
# is paid and up to date.
|
333
|
+
# * `assessing` - An internal (transient) state that indicates a
|
334
|
+
# subscription is in the middle of periodic assessment. Do not base any
|
335
|
+
# access decisions in your app on this state, as it may not always be
|
336
|
+
# exposed.
|
337
|
+
# * `pending` - An internal (transient) state that indicates a
|
338
|
+
# subscription is in the creation process. Do not base any access decisions
|
339
|
+
# in your app on this state, as it may not always be exposed.
|
340
|
+
# * `trialing` - A subscription in trialing state has a valid trial
|
341
|
+
# subscription. This type of subscription may transition to active once
|
342
|
+
# payment is received when the trial has ended. Otherwise, it may go to a
|
343
|
+
# Problem or End of Life state.
|
344
|
+
# * `paused` - An internal state that indicates that your account with
|
345
|
+
# Advanced Billing is in arrears.
|
346
|
+
# * **Problem States**
|
347
|
+
# * `past_due` - Indicates that the most recent payment has failed, and
|
348
|
+
# payment is past due for this subscription. If you have enabled our
|
349
|
+
# automated dunning, this subscription will be in the dunning process
|
350
|
+
# (additional status and callbacks from the dunning process will be
|
351
|
+
# available in the future). If you are handling dunning and payment updates
|
352
|
+
# yourself, you will want to use this state to initiate a payment update
|
353
|
+
# from your customers.
|
354
|
+
# * `soft_failure` - Indicates that normal assessment/processing of the
|
355
|
+
# subscription has failed for a reason that cannot be fixed by the Customer.
|
356
|
+
# For example, a Soft Fail may result from a timeout at the gateway or
|
357
|
+
# incorrect credentials on your part. The subscriptions should be retried
|
358
|
+
# automatically. An interface is being built for you to review problems
|
359
|
+
# resulting from these events to take manual action when needed.
|
360
|
+
# * `unpaid` - Indicates an unpaid subscription. A subscription is
|
361
|
+
# marked unpaid if the retry period expires and you have configured your
|
362
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
363
|
+
# 05) settings to have a Final Action of `mark the subscription unpaid`.
|
364
|
+
# * **End of Life States**
|
365
|
+
# * `canceled` - Indicates a canceled subscription. This may happen at
|
366
|
+
# your request (via the API or the web interface) or due to the expiration
|
367
|
+
# of the
|
368
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
369
|
+
# 05) process without payment. See the
|
370
|
+
# [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/540455
|
371
|
+
# 9291021) documentation for info on how to restart a canceled subscription.
|
372
|
+
# While a subscription is canceled, its period will not advance, it will
|
373
|
+
# not accrue any new charges, and Advanced Billing will not attempt to
|
374
|
+
# collect the overdue balance.
|
375
|
+
# * `expired` - Indicates a subscription that has expired due to running
|
376
|
+
# its normal life cycle. Some products may be configured to have an
|
377
|
+
# expiration period. An expired subscription then is one that stayed active
|
378
|
+
# until it fulfilled its full period.
|
379
|
+
# * `failed_to_create` - Indicates that signup has failed. (You may see
|
380
|
+
# this state in a signup_failure webhook.)
|
381
|
+
# * `on_hold` - Indicates that a subscription’s billing has been
|
382
|
+
# temporarily stopped. While it is expected that the subscription will
|
383
|
+
# resume and return to active status, this is still treated as an “End of
|
384
|
+
# Life” state because the customer is not paying for services during this
|
385
|
+
# time.
|
386
|
+
# * `suspended` - Indicates that a prepaid subscription has used up all
|
387
|
+
# their prepayment balance. If a prepayment is applied, it will return to an
|
388
|
+
# active state.
|
389
|
+
# * `trial_ended` - A subscription in a trial_ended state is a
|
390
|
+
# subscription that completed a no-obligation trial and did not have a card
|
391
|
+
# on file at the expiration of the trial period. See [Product Pricing – No
|
392
|
+
# Obligation
|
393
|
+
# Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221
|
394
|
+
# ) for more details.
|
395
|
+
# See [Subscription
|
396
|
+
# States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773
|
397
|
+
# ) for more info about subscription states and state transitions.
|
57
398
|
# @return [SubscriptionGroupBalances]
|
58
399
|
attr_accessor :account_balances
|
59
400
|
|
@@ -110,7 +451,8 @@ module AdvancedBilling
|
|
110
451
|
cancel_at_end_of_period = SKIP,
|
111
452
|
current_billing_amount_in_cents = SKIP,
|
112
453
|
customer = SKIP,
|
113
|
-
account_balances = SKIP
|
454
|
+
account_balances = SKIP,
|
455
|
+
additional_properties = {})
|
114
456
|
@uid = uid unless uid == SKIP
|
115
457
|
@scheme = scheme unless scheme == SKIP
|
116
458
|
@customer_id = customer_id unless customer_id == SKIP
|
@@ -126,6 +468,11 @@ module AdvancedBilling
|
|
126
468
|
end
|
127
469
|
@customer = customer unless customer == SKIP
|
128
470
|
@account_balances = account_balances unless account_balances == SKIP
|
471
|
+
|
472
|
+
# Add additional model properties to the instance.
|
473
|
+
additional_properties.each do |_name, _value|
|
474
|
+
instance_variable_set("@#{_name}", _value)
|
475
|
+
end
|
129
476
|
end
|
130
477
|
|
131
478
|
# Creates an instance of the object from a hash.
|
@@ -142,8 +489,11 @@ module AdvancedBilling
|
|
142
489
|
hash.key?('subscription_ids') ? hash['subscription_ids'] : SKIP
|
143
490
|
primary_subscription_id =
|
144
491
|
hash.key?('primary_subscription_id') ? hash['primary_subscription_id'] : SKIP
|
145
|
-
next_assessment_at =
|
146
|
-
|
492
|
+
next_assessment_at = if hash.key?('next_assessment_at')
|
493
|
+
(DateTimeHelper.from_rfc3339(hash['next_assessment_at']) if hash['next_assessment_at'])
|
494
|
+
else
|
495
|
+
SKIP
|
496
|
+
end
|
147
497
|
state = hash.key?('state') ? hash['state'] : SKIP
|
148
498
|
cancel_at_end_of_period =
|
149
499
|
hash.key?('cancel_at_end_of_period') ? hash['cancel_at_end_of_period'] : SKIP
|
@@ -153,6 +503,9 @@ module AdvancedBilling
|
|
153
503
|
account_balances = SubscriptionGroupBalances.from_hash(hash['account_balances']) if
|
154
504
|
hash['account_balances']
|
155
505
|
|
506
|
+
# Clean out expected properties from Hash.
|
507
|
+
names.each_value { |k| hash.delete(k) }
|
508
|
+
|
156
509
|
# Create object from extracted values.
|
157
510
|
FullSubscriptionGroupResponse.new(uid,
|
158
511
|
scheme,
|
@@ -165,7 +518,12 @@ module AdvancedBilling
|
|
165
518
|
cancel_at_end_of_period,
|
166
519
|
current_billing_amount_in_cents,
|
167
520
|
customer,
|
168
|
-
account_balances
|
521
|
+
account_balances,
|
522
|
+
hash)
|
523
|
+
end
|
524
|
+
|
525
|
+
def to_custom_next_assessment_at
|
526
|
+
DateTimeHelper.to_rfc3339(next_assessment_at)
|
169
527
|
end
|
170
528
|
end
|
171
529
|
end
|
@@ -174,7 +174,8 @@ module AdvancedBilling
|
|
174
174
|
customer_id = SKIP,
|
175
175
|
billing_address_2 = SKIP,
|
176
176
|
customer_vault_token = SKIP,
|
177
|
-
gateway_handle = SKIP
|
177
|
+
gateway_handle = SKIP,
|
178
|
+
additional_properties = {})
|
178
179
|
@id = id unless id == SKIP
|
179
180
|
@first_name = first_name
|
180
181
|
@last_name = last_name
|
@@ -196,6 +197,11 @@ module AdvancedBilling
|
|
196
197
|
@site_gateway_setting_id = site_gateway_setting_id
|
197
198
|
@customer_vault_token = customer_vault_token unless customer_vault_token == SKIP
|
198
199
|
@gateway_handle = gateway_handle unless gateway_handle == SKIP
|
200
|
+
|
201
|
+
# Add additional model properties to the instance.
|
202
|
+
additional_properties.each do |_name, _value|
|
203
|
+
instance_variable_set("@#{_name}", _value)
|
204
|
+
end
|
199
205
|
end
|
200
206
|
|
201
207
|
# Creates an instance of the object from a hash.
|
@@ -234,6 +240,9 @@ module AdvancedBilling
|
|
234
240
|
gateway_handle =
|
235
241
|
hash.key?('gateway_handle') ? hash['gateway_handle'] : SKIP
|
236
242
|
|
243
|
+
# Clean out expected properties from Hash.
|
244
|
+
names.each_value { |k| hash.delete(k) }
|
245
|
+
|
237
246
|
# Create object from extracted values.
|
238
247
|
GetOneTimeTokenPaymentProfile.new(first_name,
|
239
248
|
last_name,
|
@@ -255,7 +264,8 @@ module AdvancedBilling
|
|
255
264
|
customer_id,
|
256
265
|
billing_address_2,
|
257
266
|
customer_vault_token,
|
258
|
-
gateway_handle
|
267
|
+
gateway_handle,
|
268
|
+
hash)
|
259
269
|
end
|
260
270
|
end
|
261
271
|
end
|
@@ -30,8 +30,14 @@ module AdvancedBilling
|
|
30
30
|
[]
|
31
31
|
end
|
32
32
|
|
33
|
-
def initialize(payment_profile = nil
|
33
|
+
def initialize(payment_profile = nil,
|
34
|
+
additional_properties = {})
|
34
35
|
@payment_profile = payment_profile
|
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
|
payment_profile = GetOneTimeTokenPaymentProfile.from_hash(hash['payment_profile']) if
|
43
49
|
hash['payment_profile']
|
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
|
-
GetOneTimeTokenRequest.new(payment_profile
|
55
|
+
GetOneTimeTokenRequest.new(payment_profile,
|
56
|
+
hash)
|
47
57
|
end
|
48
58
|
end
|
49
59
|
end
|
@@ -53,10 +53,16 @@ module AdvancedBilling
|
|
53
53
|
|
54
54
|
def initialize(accrue = false,
|
55
55
|
align_date = false,
|
56
|
-
prorate = false
|
56
|
+
prorate = false,
|
57
|
+
additional_properties = {})
|
57
58
|
@accrue = accrue unless accrue == SKIP
|
58
59
|
@align_date = align_date unless align_date == SKIP
|
59
60
|
@prorate = prorate unless prorate == SKIP
|
61
|
+
|
62
|
+
# Add additional model properties to the instance.
|
63
|
+
additional_properties.each do |_name, _value|
|
64
|
+
instance_variable_set("@#{_name}", _value)
|
65
|
+
end
|
60
66
|
end
|
61
67
|
|
62
68
|
# Creates an instance of the object from a hash.
|
@@ -68,10 +74,14 @@ module AdvancedBilling
|
|
68
74
|
align_date = hash['align_date'] ||= false
|
69
75
|
prorate = hash['prorate'] ||= false
|
70
76
|
|
77
|
+
# Clean out expected properties from Hash.
|
78
|
+
names.each_value { |k| hash.delete(k) }
|
79
|
+
|
71
80
|
# Create object from extracted values.
|
72
81
|
GroupBilling.new(accrue,
|
73
82
|
align_date,
|
74
|
-
prorate
|
83
|
+
prorate,
|
84
|
+
hash)
|
75
85
|
end
|
76
86
|
end
|
77
87
|
end
|
@@ -40,9 +40,15 @@ module AdvancedBilling
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def initialize(target = nil,
|
43
|
-
billing = SKIP
|
43
|
+
billing = SKIP,
|
44
|
+
additional_properties = {})
|
44
45
|
@target = target
|
45
46
|
@billing = billing unless billing == SKIP
|
47
|
+
|
48
|
+
# Add additional model properties to the instance.
|
49
|
+
additional_properties.each do |_name, _value|
|
50
|
+
instance_variable_set("@#{_name}", _value)
|
51
|
+
end
|
46
52
|
end
|
47
53
|
|
48
54
|
# Creates an instance of the object from a hash.
|
@@ -53,9 +59,13 @@ module AdvancedBilling
|
|
53
59
|
target = GroupTarget.from_hash(hash['target']) if hash['target']
|
54
60
|
billing = GroupBilling.from_hash(hash['billing']) if hash['billing']
|
55
61
|
|
62
|
+
# Clean out expected properties from Hash.
|
63
|
+
names.each_value { |k| hash.delete(k) }
|
64
|
+
|
56
65
|
# Create object from extracted values.
|
57
66
|
GroupSettings.new(target,
|
58
|
-
billing
|
67
|
+
billing,
|
68
|
+
hash)
|
59
69
|
end
|
60
70
|
|
61
71
|
# Validates an instance of the object from a given value.
|
@@ -41,9 +41,15 @@ module AdvancedBilling
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def initialize(type = nil,
|
44
|
-
id = SKIP
|
44
|
+
id = SKIP,
|
45
|
+
additional_properties = {})
|
45
46
|
@type = type
|
46
47
|
@id = id unless id == SKIP
|
48
|
+
|
49
|
+
# Add additional model properties to the instance.
|
50
|
+
additional_properties.each do |_name, _value|
|
51
|
+
instance_variable_set("@#{_name}", _value)
|
52
|
+
end
|
47
53
|
end
|
48
54
|
|
49
55
|
# Creates an instance of the object from a hash.
|
@@ -54,9 +60,13 @@ module AdvancedBilling
|
|
54
60
|
type = hash.key?('type') ? hash['type'] : nil
|
55
61
|
id = hash.key?('id') ? hash['id'] : SKIP
|
56
62
|
|
63
|
+
# Clean out expected properties from Hash.
|
64
|
+
names.each_value { |k| hash.delete(k) }
|
65
|
+
|
57
66
|
# Create object from extracted values.
|
58
67
|
GroupTarget.new(type,
|
59
|
-
id
|
68
|
+
id,
|
69
|
+
hash)
|
60
70
|
end
|
61
71
|
end
|
62
72
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AdvancedBilling
|
7
|
+
# Group Type.
|
8
|
+
class GroupType
|
9
|
+
GROUP_TYPE = [
|
10
|
+
# TODO: Write general description for SINGLE_CUSTOMER
|
11
|
+
SINGLE_CUSTOMER = 'single_customer'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for MULTIPLE_CUSTOMERS
|
14
|
+
MULTIPLE_CUSTOMERS = 'multiple_customers'.freeze
|
15
|
+
].freeze
|
16
|
+
|
17
|
+
def self.validate(value)
|
18
|
+
return false if value.nil?
|
19
|
+
|
20
|
+
GROUP_TYPE.include?(value)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|