maxio-advanced-billing-sdk 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +28 -0
- data/README.md +374 -0
- data/lib/advanced_billing/api_helper.rb +10 -0
- data/lib/advanced_billing/client.rb +242 -0
- data/lib/advanced_billing/configuration.rb +123 -0
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +115 -0
- data/lib/advanced_billing/controllers/api_exports_controller.rb +262 -0
- data/lib/advanced_billing/controllers/base_controller.rb +75 -0
- data/lib/advanced_billing/controllers/billing_portal_controller.rb +162 -0
- data/lib/advanced_billing/controllers/components_controller.rb +908 -0
- data/lib/advanced_billing/controllers/coupons_controller.rb +667 -0
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +443 -0
- data/lib/advanced_billing/controllers/customers_controller.rb +246 -0
- data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +298 -0
- data/lib/advanced_billing/controllers/events_controller.rb +226 -0
- data/lib/advanced_billing/controllers/insights_controller.rb +161 -0
- data/lib/advanced_billing/controllers/invoices_controller.rb +947 -0
- data/lib/advanced_billing/controllers/offers_controller.rb +135 -0
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +745 -0
- data/lib/advanced_billing/controllers/product_families_controller.rb +187 -0
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +461 -0
- data/lib/advanced_billing/controllers/products_controller.rb +224 -0
- data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +359 -0
- data/lib/advanced_billing/controllers/reason_codes_controller.rb +154 -0
- data/lib/advanced_billing/controllers/referral_codes_controller.rb +41 -0
- data/lib/advanced_billing/controllers/sales_commissions_controller.rb +189 -0
- data/lib/advanced_billing/controllers/sites_controller.rb +90 -0
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +982 -0
- data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +155 -0
- data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +157 -0
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +295 -0
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +216 -0
- data/lib/advanced_billing/controllers/subscription_notes_controller.rb +156 -0
- data/lib/advanced_billing/controllers/subscription_products_controller.rb +166 -0
- data/lib/advanced_billing/controllers/subscription_status_controller.rb +479 -0
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +1345 -0
- data/lib/advanced_billing/controllers/webhooks_controller.rb +206 -0
- data/lib/advanced_billing/exceptions/api_exception.rb +10 -0
- data/lib/advanced_billing/exceptions/component_allocation_error_exception.rb +41 -0
- data/lib/advanced_billing/exceptions/component_price_point_error_exception.rb +41 -0
- data/lib/advanced_billing/exceptions/customer_error_response_exception.rb +34 -0
- data/lib/advanced_billing/exceptions/error_array_map_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/error_list_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/error_string_map_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/event_based_billing_list_segments_errors_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/event_based_billing_segment_errors_exception.rb +35 -0
- data/lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/product_price_point_error_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/proforma_bad_request_error_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/refund_prepayment_aggregated_errors_response_exception.rb +33 -0
- data/lib/advanced_billing/exceptions/refund_prepayment_base_errors_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/single_error_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/single_string_error_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/subscription_add_coupon_error_exception.rb +47 -0
- data/lib/advanced_billing/exceptions/subscription_component_allocation_error_exception.rb +41 -0
- data/lib/advanced_billing/exceptions/subscription_group_signup_error_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/subscription_remove_coupon_errors_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/subscriptions_mrr_error_response_exception.rb +32 -0
- data/lib/advanced_billing/exceptions/too_many_management_link_requests_error_exception.rb +32 -0
- data/lib/advanced_billing/http/auth/basic_auth.rb +29 -0
- data/lib/advanced_billing/http/http_call_back.rb +10 -0
- data/lib/advanced_billing/http/http_method_enum.rb +10 -0
- data/lib/advanced_billing/http/http_request.rb +10 -0
- data/lib/advanced_billing/http/http_response.rb +10 -0
- data/lib/advanced_billing/models/account_balance.rb +51 -0
- data/lib/advanced_billing/models/account_balances.rb +83 -0
- data/lib/advanced_billing/models/ach_agreement.rb +88 -0
- data/lib/advanced_billing/models/activate_subscription_request.rb +57 -0
- data/lib/advanced_billing/models/add_coupons_request.rb +50 -0
- data/lib/advanced_billing/models/add_subscription_to_a_group.rb +62 -0
- data/lib/advanced_billing/models/agreement_acceptance.rb +117 -0
- data/lib/advanced_billing/models/allocate_components.rb +151 -0
- data/lib/advanced_billing/models/allocation.rb +340 -0
- data/lib/advanced_billing/models/allocation_expiration_date.rb +50 -0
- data/lib/advanced_billing/models/allocation_preview.rb +197 -0
- data/lib/advanced_billing/models/allocation_preview_direction.rb +23 -0
- data/lib/advanced_billing/models/allocation_preview_item.rb +272 -0
- data/lib/advanced_billing/models/allocation_preview_line_item.rb +135 -0
- data/lib/advanced_billing/models/allocation_preview_line_item_kind.rb +29 -0
- data/lib/advanced_billing/models/allocation_preview_response.rb +49 -0
- data/lib/advanced_billing/models/allocation_response.rb +50 -0
- data/lib/advanced_billing/models/allocation_settings.rb +79 -0
- data/lib/advanced_billing/models/applied_credit_note_data.rb +60 -0
- data/lib/advanced_billing/models/apply_credit_note_event_data.rb +198 -0
- data/lib/advanced_billing/models/apply_debit_note_event_data.rb +111 -0
- data/lib/advanced_billing/models/apply_payment_event_data.rb +150 -0
- data/lib/advanced_billing/models/attribute_error.rb +48 -0
- data/lib/advanced_billing/models/auto_invite.rb +23 -0
- data/lib/advanced_billing/models/auto_resume.rb +61 -0
- data/lib/advanced_billing/models/bank_account_attributes.rb +175 -0
- data/lib/advanced_billing/models/bank_account_holder_type.rb +23 -0
- data/lib/advanced_billing/models/bank_account_payment_profile.rb +310 -0
- data/lib/advanced_billing/models/bank_account_response.rb +49 -0
- data/lib/advanced_billing/models/bank_account_type.rb +23 -0
- data/lib/advanced_billing/models/bank_account_vault.rb +32 -0
- data/lib/advanced_billing/models/bank_account_verification.rb +62 -0
- data/lib/advanced_billing/models/bank_account_verification_request.rb +50 -0
- data/lib/advanced_billing/models/base_model.rb +62 -0
- data/lib/advanced_billing/models/base_refund_error.rb +50 -0
- data/lib/advanced_billing/models/base_string_error.rb +50 -0
- data/lib/advanced_billing/models/basic_date_field.rb +23 -0
- data/lib/advanced_billing/models/batch_job.rb +94 -0
- data/lib/advanced_billing/models/batch_job_response.rb +48 -0
- data/lib/advanced_billing/models/billing_address.rb +107 -0
- data/lib/advanced_billing/models/billing_manifest.rb +147 -0
- data/lib/advanced_billing/models/billing_manifest_item.rb +189 -0
- data/lib/advanced_billing/models/billing_manifest_line_item_kind.rb +35 -0
- data/lib/advanced_billing/models/billing_schedule.rb +55 -0
- data/lib/advanced_billing/models/breakouts.rb +84 -0
- data/lib/advanced_billing/models/bulk_component_s_price_point_assignment.rb +59 -0
- data/lib/advanced_billing/models/bulk_create_product_price_points_request.rb +57 -0
- data/lib/advanced_billing/models/bulk_create_product_price_points_response.rb +59 -0
- data/lib/advanced_billing/models/bulk_create_segments.rb +59 -0
- data/lib/advanced_billing/models/bulk_update_segments.rb +59 -0
- data/lib/advanced_billing/models/bulk_update_segments_item.rb +80 -0
- data/lib/advanced_billing/models/calendar_billing.rb +79 -0
- data/lib/advanced_billing/models/cancel_grouped_subscriptions_request.rb +51 -0
- data/lib/advanced_billing/models/cancellation_method.rb +33 -0
- data/lib/advanced_billing/models/cancellation_options.rb +63 -0
- data/lib/advanced_billing/models/cancellation_request.rb +48 -0
- data/lib/advanced_billing/models/card_type.rb +125 -0
- data/lib/advanced_billing/models/change_invoice_collection_method_event_data.rb +81 -0
- data/lib/advanced_billing/models/chargify_ebb.rb +116 -0
- data/lib/advanced_billing/models/cleanup_scope.rb +26 -0
- data/lib/advanced_billing/models/collection_method.rb +32 -0
- data/lib/advanced_billing/models/component.rb +495 -0
- data/lib/advanced_billing/models/component_allocation_change.rb +147 -0
- data/lib/advanced_billing/models/component_allocation_error_item.rb +80 -0
- data/lib/advanced_billing/models/component_cost_data.rb +128 -0
- data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +94 -0
- data/lib/advanced_billing/models/component_currency_price.rb +102 -0
- data/lib/advanced_billing/models/component_currency_prices_response.rb +57 -0
- data/lib/advanced_billing/models/component_custom_price.rb +96 -0
- data/lib/advanced_billing/models/component_kind.rb +32 -0
- data/lib/advanced_billing/models/component_price.rb +127 -0
- data/lib/advanced_billing/models/component_price_point.rb +302 -0
- data/lib/advanced_billing/models/component_price_point_error_item.rb +70 -0
- data/lib/advanced_billing/models/component_price_point_item.rb +119 -0
- data/lib/advanced_billing/models/component_price_point_response.rb +48 -0
- data/lib/advanced_billing/models/component_price_points_response.rb +69 -0
- data/lib/advanced_billing/models/component_response.rb +48 -0
- data/lib/advanced_billing/models/component_s_price_point_assignment.rb +72 -0
- data/lib/advanced_billing/models/compounding_strategy.rb +23 -0
- data/lib/advanced_billing/models/consolidated_invoice.rb +59 -0
- data/lib/advanced_billing/models/count_response.rb +50 -0
- data/lib/advanced_billing/models/coupon.rb +384 -0
- data/lib/advanced_billing/models/coupon_currency.rb +80 -0
- data/lib/advanced_billing/models/coupon_currency_request.rb +57 -0
- data/lib/advanced_billing/models/coupon_currency_response.rb +59 -0
- data/lib/advanced_billing/models/coupon_response.rb +50 -0
- data/lib/advanced_billing/models/coupon_restriction.rb +92 -0
- data/lib/advanced_billing/models/coupon_subcodes.rb +50 -0
- data/lib/advanced_billing/models/coupon_subcodes_response.rb +71 -0
- data/lib/advanced_billing/models/coupon_usage.rb +118 -0
- data/lib/advanced_billing/models/create_allocation.rb +198 -0
- data/lib/advanced_billing/models/create_allocation_request.rb +48 -0
- data/lib/advanced_billing/models/create_component_price_point.rb +163 -0
- data/lib/advanced_billing/models/create_component_price_point_request.rb +64 -0
- data/lib/advanced_billing/models/create_component_price_points_request.rb +64 -0
- data/lib/advanced_billing/models/create_currency_price.rb +70 -0
- data/lib/advanced_billing/models/create_currency_prices_request.rb +57 -0
- data/lib/advanced_billing/models/create_customer.rb +221 -0
- data/lib/advanced_billing/models/create_customer_request.rb +48 -0
- data/lib/advanced_billing/models/create_ebb_component.rb +49 -0
- data/lib/advanced_billing/models/create_invoice.rb +168 -0
- data/lib/advanced_billing/models/create_invoice_address.rb +130 -0
- data/lib/advanced_billing/models/create_invoice_coupon.rb +117 -0
- data/lib/advanced_billing/models/create_invoice_item.rb +192 -0
- data/lib/advanced_billing/models/create_invoice_payment.rb +92 -0
- data/lib/advanced_billing/models/create_invoice_payment_application.rb +58 -0
- data/lib/advanced_billing/models/create_invoice_payment_request.rb +59 -0
- data/lib/advanced_billing/models/create_invoice_request.rb +48 -0
- data/lib/advanced_billing/models/create_invoice_status.rb +23 -0
- data/lib/advanced_billing/models/create_metadata.rb +60 -0
- data/lib/advanced_billing/models/create_metadata_request.rb +57 -0
- data/lib/advanced_billing/models/create_metafield.rb +96 -0
- data/lib/advanced_billing/models/create_metafields_request.rb +64 -0
- data/lib/advanced_billing/models/create_metered_component.rb +49 -0
- data/lib/advanced_billing/models/create_multi_invoice_payment.rb +133 -0
- data/lib/advanced_billing/models/create_multi_invoice_payment_request.rb +48 -0
- data/lib/advanced_billing/models/create_offer.rb +117 -0
- data/lib/advanced_billing/models/create_offer_component.rb +61 -0
- data/lib/advanced_billing/models/create_offer_request.rb +48 -0
- data/lib/advanced_billing/models/create_on_off_component.rb +49 -0
- data/lib/advanced_billing/models/create_or_update_coupon.rb +86 -0
- data/lib/advanced_billing/models/create_or_update_flat_amount_coupon.rb +228 -0
- data/lib/advanced_billing/models/create_or_update_percentage_coupon.rb +229 -0
- data/lib/advanced_billing/models/create_or_update_product.rb +146 -0
- data/lib/advanced_billing/models/create_or_update_product_request.rb +48 -0
- data/lib/advanced_billing/models/create_or_update_segment_price.rb +88 -0
- data/lib/advanced_billing/models/create_payment.rb +77 -0
- data/lib/advanced_billing/models/create_payment_profile.rb +430 -0
- data/lib/advanced_billing/models/create_payment_profile_request.rb +49 -0
- data/lib/advanced_billing/models/create_prepaid_component.rb +49 -0
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +197 -0
- data/lib/advanced_billing/models/create_prepayment.rb +93 -0
- data/lib/advanced_billing/models/create_prepayment_request.rb +48 -0
- data/lib/advanced_billing/models/create_prepayment_response.rb +48 -0
- data/lib/advanced_billing/models/create_product_currency_price.rb +66 -0
- data/lib/advanced_billing/models/create_product_currency_prices_request.rb +57 -0
- data/lib/advanced_billing/models/create_product_family.rb +62 -0
- data/lib/advanced_billing/models/create_product_family_request.rb +49 -0
- data/lib/advanced_billing/models/create_product_price_point.rb +198 -0
- data/lib/advanced_billing/models/create_product_price_point_request.rb +48 -0
- data/lib/advanced_billing/models/create_quantity_based_component.rb +50 -0
- data/lib/advanced_billing/models/create_reason_code.rb +68 -0
- data/lib/advanced_billing/models/create_reason_code_request.rb +48 -0
- data/lib/advanced_billing/models/create_segment.rb +143 -0
- data/lib/advanced_billing/models/create_segment_request.rb +48 -0
- data/lib/advanced_billing/models/create_subscription.rb +749 -0
- data/lib/advanced_billing/models/create_subscription_component.rb +127 -0
- data/lib/advanced_billing/models/create_subscription_group.rb +75 -0
- data/lib/advanced_billing/models/create_subscription_group_request.rb +49 -0
- data/lib/advanced_billing/models/create_subscription_request.rb +48 -0
- data/lib/advanced_billing/models/create_usage.rb +88 -0
- data/lib/advanced_billing/models/create_usage_request.rb +48 -0
- data/lib/advanced_billing/models/created_prepayment.rb +117 -0
- data/lib/advanced_billing/models/credit_account_balance_changed.rb +122 -0
- data/lib/advanced_billing/models/credit_card_attributes.rb +72 -0
- data/lib/advanced_billing/models/credit_card_payment_profile.rb +306 -0
- data/lib/advanced_billing/models/credit_note.rb +417 -0
- data/lib/advanced_billing/models/credit_note1.rb +409 -0
- data/lib/advanced_billing/models/credit_note_application.rb +92 -0
- data/lib/advanced_billing/models/credit_note_line_item.rb +245 -0
- data/lib/advanced_billing/models/credit_note_status.rb +23 -0
- data/lib/advanced_billing/models/credit_scheme.rb +26 -0
- data/lib/advanced_billing/models/credit_scheme_request.rb +48 -0
- data/lib/advanced_billing/models/credit_type.rb +28 -0
- data/lib/advanced_billing/models/currency_price.rb +102 -0
- data/lib/advanced_billing/models/currency_price_role.rb +26 -0
- data/lib/advanced_billing/models/currency_prices_response.rb +57 -0
- data/lib/advanced_billing/models/current_vault.rb +99 -0
- data/lib/advanced_billing/models/custom_field_value_change.rb +148 -0
- data/lib/advanced_billing/models/customer.rb +358 -0
- data/lib/advanced_billing/models/customer1.rb +114 -0
- data/lib/advanced_billing/models/customer_attributes.rb +243 -0
- data/lib/advanced_billing/models/customer_billing_address_change.rb +60 -0
- data/lib/advanced_billing/models/customer_change.rb +83 -0
- data/lib/advanced_billing/models/customer_changes_preview_response.rb +48 -0
- data/lib/advanced_billing/models/customer_custom_fields_change.rb +78 -0
- data/lib/advanced_billing/models/customer_error.rb +60 -0
- data/lib/advanced_billing/models/customer_payer_change.rb +60 -0
- data/lib/advanced_billing/models/customer_response.rb +48 -0
- data/lib/advanced_billing/models/customer_shipping_address_change.rb +60 -0
- data/lib/advanced_billing/models/deduct_service_credit.rb +81 -0
- data/lib/advanced_billing/models/deduct_service_credit_request.rb +48 -0
- data/lib/advanced_billing/models/delayed_cancellation_response.rb +50 -0
- data/lib/advanced_billing/models/delete_subscription_group_response.rb +60 -0
- data/lib/advanced_billing/models/direction.rb +23 -0
- data/lib/advanced_billing/models/discount_type.rb +23 -0
- data/lib/advanced_billing/models/dunner_data.rb +96 -0
- data/lib/advanced_billing/models/dunning_step_data.rb +120 -0
- data/lib/advanced_billing/models/dunning_step_reached.rb +92 -0
- data/lib/advanced_billing/models/ebb_component.rb +301 -0
- data/lib/advanced_billing/models/ebb_event.rb +50 -0
- data/lib/advanced_billing/models/enable_webhooks_request.rb +49 -0
- data/lib/advanced_billing/models/enable_webhooks_response.rb +51 -0
- data/lib/advanced_billing/models/endpoint.rb +91 -0
- data/lib/advanced_billing/models/endpoint_response.rb +50 -0
- data/lib/advanced_billing/models/errors.rb +60 -0
- data/lib/advanced_billing/models/event.rb +150 -0
- data/lib/advanced_billing/models/event_based_billing_segment_error.rb +51 -0
- data/lib/advanced_billing/models/event_response.rb +48 -0
- data/lib/advanced_billing/models/event_type.rb +121 -0
- data/lib/advanced_billing/models/extended_interval_unit.rb +26 -0
- data/lib/advanced_billing/models/failed_payment_action.rb +37 -0
- data/lib/advanced_billing/models/first_charge_type.rb +26 -0
- data/lib/advanced_billing/models/full_subscription_group_response.rb +171 -0
- data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +261 -0
- data/lib/advanced_billing/models/get_one_time_token_request.rb +49 -0
- data/lib/advanced_billing/models/group_billing.rb +77 -0
- data/lib/advanced_billing/models/group_settings.rb +75 -0
- data/lib/advanced_billing/models/group_target.rb +62 -0
- data/lib/advanced_billing/models/group_target_type.rb +32 -0
- data/lib/advanced_billing/models/include_not_null.rb +20 -0
- data/lib/advanced_billing/models/include_option.rb +23 -0
- data/lib/advanced_billing/models/interval_unit.rb +23 -0
- data/lib/advanced_billing/models/invoice.rb +734 -0
- data/lib/advanced_billing/models/invoice_address.rb +107 -0
- data/lib/advanced_billing/models/invoice_balance_item.rb +71 -0
- data/lib/advanced_billing/models/invoice_consolidation_level.rb +34 -0
- data/lib/advanced_billing/models/invoice_credit.rb +123 -0
- data/lib/advanced_billing/models/invoice_custom_field.rb +80 -0
- data/lib/advanced_billing/models/invoice_customer.rb +115 -0
- data/lib/advanced_billing/models/invoice_date_field.rb +32 -0
- data/lib/advanced_billing/models/invoice_discount.rb +174 -0
- data/lib/advanced_billing/models/invoice_discount_breakout.rb +72 -0
- data/lib/advanced_billing/models/invoice_display_settings.rb +65 -0
- data/lib/advanced_billing/models/invoice_event.rb +105 -0
- data/lib/advanced_billing/models/invoice_event1.rb +399 -0
- data/lib/advanced_billing/models/invoice_event_type.rb +59 -0
- data/lib/advanced_billing/models/invoice_issued.rb +258 -0
- data/lib/advanced_billing/models/invoice_line_item.rb +332 -0
- data/lib/advanced_billing/models/invoice_line_item_component_cost_data.rb +69 -0
- data/lib/advanced_billing/models/invoice_line_item_event_data.rb +266 -0
- data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +60 -0
- data/lib/advanced_billing/models/invoice_payer.rb +103 -0
- data/lib/advanced_billing/models/invoice_payment.rb +158 -0
- data/lib/advanced_billing/models/invoice_payment_application.rb +74 -0
- data/lib/advanced_billing/models/invoice_payment_method.rb +124 -0
- data/lib/advanced_billing/models/invoice_payment_method_type.rb +35 -0
- data/lib/advanced_billing/models/invoice_payment_type.rb +29 -0
- data/lib/advanced_billing/models/invoice_pre_payment.rb +75 -0
- data/lib/advanced_billing/models/invoice_previous_balance.rb +78 -0
- data/lib/advanced_billing/models/invoice_refund.rb +106 -0
- data/lib/advanced_billing/models/invoice_response.rb +48 -0
- data/lib/advanced_billing/models/invoice_role.rb +47 -0
- data/lib/advanced_billing/models/invoice_seller.rb +83 -0
- data/lib/advanced_billing/models/invoice_sort_field.rb +41 -0
- data/lib/advanced_billing/models/invoice_status.rb +37 -0
- data/lib/advanced_billing/models/invoice_tax.rb +172 -0
- data/lib/advanced_billing/models/invoice_tax_breakout.rb +71 -0
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +81 -0
- data/lib/advanced_billing/models/issue_advance_invoice_request.rb +50 -0
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +136 -0
- data/lib/advanced_billing/models/issue_invoice_request.rb +63 -0
- data/lib/advanced_billing/models/issue_service_credit.rb +81 -0
- data/lib/advanced_billing/models/issue_service_credit_request.rb +49 -0
- data/lib/advanced_billing/models/item_category.rb +33 -0
- data/lib/advanced_billing/models/item_price_point_changed.rb +133 -0
- data/lib/advanced_billing/models/item_price_point_data.rb +70 -0
- data/lib/advanced_billing/models/line_item_kind.rb +47 -0
- data/lib/advanced_billing/models/line_item_transaction_type.rb +38 -0
- data/lib/advanced_billing/models/list_components_price_points_include.rb +20 -0
- data/lib/advanced_billing/models/list_components_price_points_response.rb +57 -0
- data/lib/advanced_billing/models/list_credit_notes_response.rb +57 -0
- data/lib/advanced_billing/models/list_events_date_field.rb +20 -0
- data/lib/advanced_billing/models/list_invoice_events_response.rb +89 -0
- data/lib/advanced_billing/models/list_invoices_response.rb +57 -0
- data/lib/advanced_billing/models/list_metafields_response.rb +99 -0
- data/lib/advanced_billing/models/list_mrr_response.rb +48 -0
- data/lib/advanced_billing/models/list_mrr_response_result.rb +120 -0
- data/lib/advanced_billing/models/list_offers_response.rb +59 -0
- data/lib/advanced_billing/models/list_product_price_points_response.rb +57 -0
- data/lib/advanced_billing/models/list_products_include.rb +20 -0
- data/lib/advanced_billing/models/list_products_price_points_include.rb +20 -0
- data/lib/advanced_billing/models/list_public_keys_meta.rb +80 -0
- data/lib/advanced_billing/models/list_public_keys_response.rb +69 -0
- data/lib/advanced_billing/models/list_sale_rep_item.rb +93 -0
- data/lib/advanced_billing/models/list_segments_response.rb +59 -0
- data/lib/advanced_billing/models/list_subcription_group_prepayment_item.rb +142 -0
- data/lib/advanced_billing/models/list_subscription_components_include.rb +20 -0
- data/lib/advanced_billing/models/list_subscription_components_response.rb +57 -0
- data/lib/advanced_billing/models/list_subscription_components_sort.rb +23 -0
- data/lib/advanced_billing/models/list_subscription_group_prepayment.rb +49 -0
- data/lib/advanced_billing/models/list_subscription_group_prepayment_date_field.rb +23 -0
- data/lib/advanced_billing/models/list_subscription_group_prepayment_response.rb +57 -0
- data/lib/advanced_billing/models/list_subscription_groups_item.rb +146 -0
- data/lib/advanced_billing/models/list_subscription_groups_meta.rb +60 -0
- data/lib/advanced_billing/models/list_subscription_groups_response.rb +69 -0
- data/lib/advanced_billing/models/metadata.rb +102 -0
- data/lib/advanced_billing/models/metafield.rb +124 -0
- data/lib/advanced_billing/models/metafield_input.rb +33 -0
- data/lib/advanced_billing/models/metafield_scope.rb +113 -0
- data/lib/advanced_billing/models/metered_component.rb +323 -0
- data/lib/advanced_billing/models/metered_usage.rb +135 -0
- data/lib/advanced_billing/models/movement.rb +143 -0
- data/lib/advanced_billing/models/movement_line_item.rb +148 -0
- data/lib/advanced_billing/models/mrr.rb +103 -0
- data/lib/advanced_billing/models/mrr_movement.rb +81 -0
- data/lib/advanced_billing/models/mrr_response.rb +48 -0
- data/lib/advanced_billing/models/multi_invoice_payment.rb +92 -0
- data/lib/advanced_billing/models/multi_invoice_payment_response.rb +48 -0
- data/lib/advanced_billing/models/nested_subscription_group.rb +94 -0
- data/lib/advanced_billing/models/net_terms.rb +95 -0
- data/lib/advanced_billing/models/offer.rb +266 -0
- data/lib/advanced_billing/models/offer_discount.rb +70 -0
- data/lib/advanced_billing/models/offer_item.rb +159 -0
- data/lib/advanced_billing/models/offer_response.rb +50 -0
- data/lib/advanced_billing/models/offer_signup_page.rb +100 -0
- data/lib/advanced_billing/models/on_off_component.rb +287 -0
- data/lib/advanced_billing/models/organization_address.rb +129 -0
- data/lib/advanced_billing/models/origin_invoice.rb +60 -0
- data/lib/advanced_billing/models/overage_pricing.rb +73 -0
- data/lib/advanced_billing/models/override_subscription.rb +134 -0
- data/lib/advanced_billing/models/override_subscription_request.rb +48 -0
- data/lib/advanced_billing/models/paginated_metadata.rb +99 -0
- data/lib/advanced_billing/models/pause_request.rb +50 -0
- data/lib/advanced_billing/models/payer_attributes.rb +223 -0
- data/lib/advanced_billing/models/payer_error.rb +70 -0
- data/lib/advanced_billing/models/payment.rb +82 -0
- data/lib/advanced_billing/models/payment_collection_method_changed.rb +80 -0
- data/lib/advanced_billing/models/payment_for_allocation.rb +91 -0
- data/lib/advanced_billing/models/payment_method_apple_pay_type.rb +60 -0
- data/lib/advanced_billing/models/payment_method_bank_account_type.rb +94 -0
- data/lib/advanced_billing/models/payment_method_credit_card_type.rb +117 -0
- data/lib/advanced_billing/models/payment_method_external_type.rb +105 -0
- data/lib/advanced_billing/models/payment_method_nested_data.rb +156 -0
- data/lib/advanced_billing/models/payment_method_nested_data1.rb +148 -0
- data/lib/advanced_billing/models/payment_method_paypal_type.rb +79 -0
- data/lib/advanced_billing/models/payment_profile_attributes.rb +370 -0
- data/lib/advanced_billing/models/payment_profile_response.rb +64 -0
- data/lib/advanced_billing/models/payment_related_events.rb +80 -0
- data/lib/advanced_billing/models/payment_response.rb +69 -0
- data/lib/advanced_billing/models/payment_type.rb +26 -0
- data/lib/advanced_billing/models/pending_cancellation_change.rb +80 -0
- data/lib/advanced_billing/models/portal_management_link.rb +104 -0
- data/lib/advanced_billing/models/prepaid_component_price_point.rb +107 -0
- data/lib/advanced_billing/models/prepaid_configuration.rb +105 -0
- data/lib/advanced_billing/models/prepaid_configuration_response.rb +49 -0
- data/lib/advanced_billing/models/prepaid_subscription_balance_changed.rb +111 -0
- data/lib/advanced_billing/models/prepaid_usage.rb +200 -0
- data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +71 -0
- data/lib/advanced_billing/models/prepaid_usage_component.rb +358 -0
- data/lib/advanced_billing/models/prepayment.rb +137 -0
- data/lib/advanced_billing/models/prepayment_account_balance_changed.rb +109 -0
- data/lib/advanced_billing/models/prepayment_aggregated_error.rb +71 -0
- data/lib/advanced_billing/models/prepayment_method.rb +41 -0
- data/lib/advanced_billing/models/prepayment_response.rb +48 -0
- data/lib/advanced_billing/models/prepayments_response.rb +59 -0
- data/lib/advanced_billing/models/preview_allocations_request.rb +99 -0
- data/lib/advanced_billing/models/price.rb +99 -0
- data/lib/advanced_billing/models/price_point.rb +206 -0
- data/lib/advanced_billing/models/price_point_type.rb +30 -0
- data/lib/advanced_billing/models/pricing_scheme.rb +31 -0
- data/lib/advanced_billing/models/product.rb +547 -0
- data/lib/advanced_billing/models/product_family.rb +114 -0
- data/lib/advanced_billing/models/product_family_response.rb +50 -0
- data/lib/advanced_billing/models/product_price_point.rb +346 -0
- data/lib/advanced_billing/models/product_price_point_errors.rb +101 -0
- data/lib/advanced_billing/models/product_price_point_response.rb +48 -0
- data/lib/advanced_billing/models/product_response.rb +48 -0
- data/lib/advanced_billing/models/proforma_custom_field.rb +90 -0
- data/lib/advanced_billing/models/proforma_error.rb +51 -0
- data/lib/advanced_billing/models/proforma_invoice.rb +484 -0
- data/lib/advanced_billing/models/proforma_invoice_credit.rb +82 -0
- data/lib/advanced_billing/models/proforma_invoice_discount.rb +111 -0
- data/lib/advanced_billing/models/proforma_invoice_discount_breakout.rb +62 -0
- data/lib/advanced_billing/models/proforma_invoice_issued.rb +205 -0
- data/lib/advanced_billing/models/proforma_invoice_payment.rb +82 -0
- data/lib/advanced_billing/models/proforma_invoice_preview.rb +484 -0
- data/lib/advanced_billing/models/proforma_invoice_tax.rb +120 -0
- data/lib/advanced_billing/models/proforma_invoice_tax_breakout.rb +61 -0
- data/lib/advanced_billing/models/proration.rb +52 -0
- data/lib/advanced_billing/models/public_key.rb +71 -0
- data/lib/advanced_billing/models/public_signup_page.rb +84 -0
- data/lib/advanced_billing/models/quantity_based_component.rb +333 -0
- data/lib/advanced_billing/models/reactivate_subscription_group_request.rb +61 -0
- data/lib/advanced_billing/models/reactivate_subscription_group_response.rb +135 -0
- data/lib/advanced_billing/models/reactivate_subscription_request.rb +125 -0
- data/lib/advanced_billing/models/reactivation_billing.rb +56 -0
- data/lib/advanced_billing/models/reactivation_charge.rb +30 -0
- data/lib/advanced_billing/models/reason_code.rb +110 -0
- data/lib/advanced_billing/models/reason_code_response.rb +48 -0
- data/lib/advanced_billing/models/reason_codes_json_response.rb +50 -0
- data/lib/advanced_billing/models/record_payment_request.rb +48 -0
- data/lib/advanced_billing/models/recurring_scheme.rb +26 -0
- data/lib/advanced_billing/models/referral_code.rb +81 -0
- data/lib/advanced_billing/models/referral_validation_response.rb +50 -0
- data/lib/advanced_billing/models/refund.rb +128 -0
- data/lib/advanced_billing/models/refund_consolidated_invoice.rb +129 -0
- data/lib/advanced_billing/models/refund_invoice.rb +128 -0
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +195 -0
- data/lib/advanced_billing/models/refund_invoice_request.rb +64 -0
- data/lib/advanced_billing/models/refund_prepayment.rb +108 -0
- data/lib/advanced_billing/models/refund_prepayment_aggregated_error.rb +50 -0
- data/lib/advanced_billing/models/refund_prepayment_base_refund_error.rb +50 -0
- data/lib/advanced_billing/models/refund_prepayment_request.rb +48 -0
- data/lib/advanced_billing/models/refund_success.rb +93 -0
- data/lib/advanced_billing/models/remove_payment_event_data.rb +155 -0
- data/lib/advanced_billing/models/renewal_preview.rb +161 -0
- data/lib/advanced_billing/models/renewal_preview_component.rb +93 -0
- data/lib/advanced_billing/models/renewal_preview_line_item.rb +189 -0
- data/lib/advanced_billing/models/renewal_preview_request.rb +62 -0
- data/lib/advanced_billing/models/renewal_preview_response.rb +49 -0
- data/lib/advanced_billing/models/replay_webhooks_request.rb +48 -0
- data/lib/advanced_billing/models/replay_webhooks_response.rb +50 -0
- data/lib/advanced_billing/models/resent_invitation.rb +83 -0
- data/lib/advanced_billing/models/resource_type.rb +23 -0
- data/lib/advanced_billing/models/restriction_type.rb +23 -0
- data/lib/advanced_billing/models/resume_options.rb +76 -0
- data/lib/advanced_billing/models/resumption_charge.rb +27 -0
- data/lib/advanced_billing/models/revoked_invitation.rb +72 -0
- data/lib/advanced_billing/models/sale_rep.rb +100 -0
- data/lib/advanced_billing/models/sale_rep_item_mrr.rb +70 -0
- data/lib/advanced_billing/models/sale_rep_settings.rb +113 -0
- data/lib/advanced_billing/models/sale_rep_subscription.rb +143 -0
- data/lib/advanced_billing/models/segment.rb +210 -0
- data/lib/advanced_billing/models/segment_price.rb +126 -0
- data/lib/advanced_billing/models/segment_response.rb +50 -0
- data/lib/advanced_billing/models/seller.rb +82 -0
- data/lib/advanced_billing/models/send_invoice_request.rb +73 -0
- data/lib/advanced_billing/models/service_credit.rb +92 -0
- data/lib/advanced_billing/models/service_credit_response.rb +48 -0
- data/lib/advanced_billing/models/service_credit_type.rb +23 -0
- data/lib/advanced_billing/models/shipping_address.rb +107 -0
- data/lib/advanced_billing/models/signup_proforma_preview.rb +62 -0
- data/lib/advanced_billing/models/signup_proforma_preview_response.rb +50 -0
- data/lib/advanced_billing/models/site.rb +220 -0
- data/lib/advanced_billing/models/site_response.rb +48 -0
- data/lib/advanced_billing/models/site_statistics.rb +174 -0
- data/lib/advanced_billing/models/site_summary.rb +90 -0
- data/lib/advanced_billing/models/snap_day.rb +21 -0
- data/lib/advanced_billing/models/sorting_direction.rb +23 -0
- data/lib/advanced_billing/models/subscription.rb +1014 -0
- data/lib/advanced_billing/models/subscription_component.rb +460 -0
- data/lib/advanced_billing/models/subscription_component_allocation_error_item.rb +60 -0
- data/lib/advanced_billing/models/subscription_component_response.rb +50 -0
- data/lib/advanced_billing/models/subscription_component_subscription.rb +197 -0
- data/lib/advanced_billing/models/subscription_custom_price.rb +212 -0
- data/lib/advanced_billing/models/subscription_date_field.rb +44 -0
- data/lib/advanced_billing/models/subscription_group.rb +96 -0
- data/lib/advanced_billing/models/subscription_group_balances.rb +82 -0
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +216 -0
- data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +96 -0
- data/lib/advanced_billing/models/subscription_group_credit_card.rb +273 -0
- data/lib/advanced_billing/models/subscription_group_customer.rb +90 -0
- data/lib/advanced_billing/models/subscription_group_item.rb +152 -0
- data/lib/advanced_billing/models/subscription_group_member_error.rb +70 -0
- data/lib/advanced_billing/models/subscription_group_payment_profile.rb +81 -0
- data/lib/advanced_billing/models/subscription_group_prepayment.rb +75 -0
- data/lib/advanced_billing/models/subscription_group_prepayment_method.rb +35 -0
- data/lib/advanced_billing/models/subscription_group_prepayment_request.rb +48 -0
- data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +92 -0
- data/lib/advanced_billing/models/subscription_group_response.rb +49 -0
- data/lib/advanced_billing/models/subscription_group_signup.rb +154 -0
- data/lib/advanced_billing/models/subscription_group_signup_component.rb +110 -0
- data/lib/advanced_billing/models/subscription_group_signup_error.rb +112 -0
- data/lib/advanced_billing/models/subscription_group_signup_failure.rb +83 -0
- data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +140 -0
- data/lib/advanced_billing/models/subscription_group_signup_item.rb +197 -0
- data/lib/advanced_billing/models/subscription_group_signup_request.rb +49 -0
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +171 -0
- data/lib/advanced_billing/models/subscription_group_signup_success.rb +81 -0
- data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +125 -0
- data/lib/advanced_billing/models/subscription_group_subscription_error.rb +87 -0
- data/lib/advanced_billing/models/subscription_group_update_error.rb +59 -0
- data/lib/advanced_billing/models/subscription_include.rb +23 -0
- data/lib/advanced_billing/models/subscription_included_coupon.rb +115 -0
- data/lib/advanced_billing/models/subscription_list_date_field.rb +20 -0
- data/lib/advanced_billing/models/subscription_list_include.rb +20 -0
- data/lib/advanced_billing/models/subscription_migration_preview.rb +90 -0
- data/lib/advanced_billing/models/subscription_migration_preview_options.rb +163 -0
- data/lib/advanced_billing/models/subscription_migration_preview_request.rb +49 -0
- data/lib/advanced_billing/models/subscription_migration_preview_response.rb +48 -0
- data/lib/advanced_billing/models/subscription_mrr.rb +70 -0
- data/lib/advanced_billing/models/subscription_mrr_breakout.rb +59 -0
- data/lib/advanced_billing/models/subscription_mrr_response.rb +57 -0
- data/lib/advanced_billing/models/subscription_note.rb +101 -0
- data/lib/advanced_billing/models/subscription_note_response.rb +48 -0
- data/lib/advanced_billing/models/subscription_preview.rb +62 -0
- data/lib/advanced_billing/models/subscription_preview_response.rb +49 -0
- data/lib/advanced_billing/models/subscription_product_change.rb +81 -0
- data/lib/advanced_billing/models/subscription_product_migration.rb +152 -0
- data/lib/advanced_billing/models/subscription_product_migration_request.rb +48 -0
- data/lib/advanced_billing/models/subscription_purge_type.rb +23 -0
- data/lib/advanced_billing/models/subscription_response.rb +50 -0
- data/lib/advanced_billing/models/subscription_sort.rb +35 -0
- data/lib/advanced_billing/models/subscription_state.rb +118 -0
- data/lib/advanced_billing/models/subscription_state_change.rb +81 -0
- data/lib/advanced_billing/models/subscription_state_filter.rb +53 -0
- data/lib/advanced_billing/models/tax_configuration.rb +74 -0
- data/lib/advanced_billing/models/tax_configuration_kind.rb +29 -0
- data/lib/advanced_billing/models/tax_destination_address.rb +29 -0
- data/lib/advanced_billing/models/too_many_management_link_requests.rb +64 -0
- data/lib/advanced_billing/models/update_allocation_expiration_date.rb +50 -0
- data/lib/advanced_billing/models/update_component.rb +146 -0
- data/lib/advanced_billing/models/update_component_price_point.rb +141 -0
- data/lib/advanced_billing/models/update_component_price_point_request.rb +51 -0
- data/lib/advanced_billing/models/update_component_request.rb +48 -0
- data/lib/advanced_billing/models/update_coupon_currency.rb +57 -0
- data/lib/advanced_billing/models/update_currency_price.rb +57 -0
- data/lib/advanced_billing/models/update_currency_prices_request.rb +57 -0
- data/lib/advanced_billing/models/update_customer.rb +223 -0
- data/lib/advanced_billing/models/update_customer_request.rb +48 -0
- data/lib/advanced_billing/models/update_endpoint.rb +58 -0
- data/lib/advanced_billing/models/update_endpoint_request.rb +48 -0
- data/lib/advanced_billing/models/update_metadata.rb +70 -0
- data/lib/advanced_billing/models/update_metadata_request.rb +50 -0
- data/lib/advanced_billing/models/update_metafield.rb +106 -0
- data/lib/advanced_billing/models/update_metafields_request.rb +62 -0
- data/lib/advanced_billing/models/update_payment_profile.rb +194 -0
- data/lib/advanced_billing/models/update_payment_profile_request.rb +49 -0
- data/lib/advanced_billing/models/update_price.rb +109 -0
- data/lib/advanced_billing/models/update_product_price_point.rb +61 -0
- data/lib/advanced_billing/models/update_product_price_point_request.rb +48 -0
- data/lib/advanced_billing/models/update_reason_code.rb +70 -0
- data/lib/advanced_billing/models/update_reason_code_request.rb +48 -0
- data/lib/advanced_billing/models/update_segment.rb +73 -0
- data/lib/advanced_billing/models/update_segment_request.rb +48 -0
- data/lib/advanced_billing/models/update_subscription.rb +277 -0
- data/lib/advanced_billing/models/update_subscription_component.rb +61 -0
- data/lib/advanced_billing/models/update_subscription_group.rb +50 -0
- data/lib/advanced_billing/models/update_subscription_group_request.rb +49 -0
- data/lib/advanced_billing/models/update_subscription_note.rb +57 -0
- data/lib/advanced_billing/models/update_subscription_note_request.rb +48 -0
- data/lib/advanced_billing/models/update_subscription_request.rb +48 -0
- data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +95 -0
- data/lib/advanced_billing/models/upsert_prepaid_configuration_request.rb +49 -0
- data/lib/advanced_billing/models/usage.rb +155 -0
- data/lib/advanced_billing/models/usage_response.rb +48 -0
- data/lib/advanced_billing/models/void_invoice.rb +48 -0
- data/lib/advanced_billing/models/void_invoice_event_data.rb +148 -0
- data/lib/advanced_billing/models/void_invoice_request.rb +48 -0
- data/lib/advanced_billing/models/void_remainder_event_data.rb +115 -0
- data/lib/advanced_billing/models/webhook.rb +173 -0
- data/lib/advanced_billing/models/webhook_order.rb +23 -0
- data/lib/advanced_billing/models/webhook_response.rb +50 -0
- data/lib/advanced_billing/models/webhook_status.rb +29 -0
- data/lib/advanced_billing/models/webhook_subscription.rb +124 -0
- data/lib/advanced_billing/utilities/date_time_helper.rb +11 -0
- data/lib/advanced_billing/utilities/file_wrapper.rb +16 -0
- data/lib/advanced_billing/utilities/union_type_lookup.rb +1098 -0
- data/lib/advanced_billing.rb +670 -0
- metadata +607 -105
- data/bin/arch +0 -1
- data/bin/ash +0 -1
- data/bin/base64 +0 -1
- data/bin/bbconfig +0 -1
- data/bin/busybox +0 -0
- data/bin/cat +0 -1
- data/bin/chattr +0 -1
- data/bin/chgrp +0 -1
- data/bin/chmod +0 -1
- data/bin/chown +0 -1
- data/bin/cp +0 -1
- data/bin/date +0 -1
- data/bin/dd +0 -1
- data/bin/df +0 -1
- data/bin/dmesg +0 -1
- data/bin/dnsdomainname +0 -1
- data/bin/dumpkmap +0 -1
- data/bin/echo +0 -1
- data/bin/ed +0 -1
- data/bin/egrep +0 -1
- data/bin/false +0 -1
- data/bin/fatattr +0 -1
- data/bin/fdflush +0 -1
- data/bin/fgrep +0 -1
- data/bin/fsync +0 -1
- data/bin/getopt +0 -1
- data/bin/grep +0 -1
- data/bin/gunzip +0 -1
- data/bin/gzip +0 -1
- data/bin/hostname +0 -1
- data/bin/ionice +0 -1
- data/bin/iostat +0 -1
- data/bin/ipcalc +0 -1
- data/bin/kbd_mode +0 -1
- data/bin/kill +0 -1
- data/bin/link +0 -1
- data/bin/linux32 +0 -1
- data/bin/linux64 +0 -1
- data/bin/ln +0 -1
- data/bin/login +0 -1
- data/bin/ls +0 -1
- data/bin/lsattr +0 -1
- data/bin/lzop +0 -1
- data/bin/makemime +0 -1
- data/bin/mkdir +0 -1
- data/bin/mknod +0 -1
- data/bin/mktemp +0 -1
- data/bin/more +0 -1
- data/bin/mount +0 -1
- data/bin/mountpoint +0 -1
- data/bin/mpstat +0 -1
- data/bin/mv +0 -1
- data/bin/netstat +0 -1
- data/bin/nice +0 -1
- data/bin/pidof +0 -0
- data/bin/ping +0 -1
- data/bin/ping6 +0 -1
- data/bin/pipe_progress +0 -1
- data/bin/printenv +0 -1
- data/bin/ps +0 -0
- data/bin/pwait +0 -0
- data/bin/pwd +0 -1
- data/bin/reformime +0 -1
- data/bin/rev +0 -1
- data/bin/rm +0 -1
- data/bin/rmdir +0 -1
- data/bin/run-parts +0 -1
- data/bin/sed +0 -1
- data/bin/setpriv +0 -1
- data/bin/setserial +0 -1
- data/bin/sh +0 -1
- data/bin/slabtop +0 -0
- data/bin/sleep +0 -1
- data/bin/stat +0 -1
- data/bin/stty +0 -1
- data/bin/su +0 -1
- data/bin/sync +0 -1
- data/bin/tar +0 -1
- data/bin/tload +0 -0
- data/bin/touch +0 -1
- data/bin/true +0 -1
- data/bin/umount +0 -1
- data/bin/uname +0 -1
- data/bin/usleep +0 -1
- data/bin/vmstat +0 -0
- data/bin/w +0 -0
- data/bin/watch +0 -0
- data/bin/zcat +0 -1
- data/lib/apk/db/installed +0 -3582
- data/lib/apk/db/lock +0 -0
- data/lib/apk/db/scripts.tar +0 -0
- data/lib/apk/db/triggers +0 -2
- data/lib/ld-musl-x86_64.so.1 +0 -0
- data/lib/libapk.so.3.12.0 +0 -0
- data/lib/libc.musl-x86_64.so.1 +0 -1
- data/lib/libcrypto.so.1.1 +0 -0
- data/lib/libprocps.so.8 +0 -1
- data/lib/libprocps.so.8.0.3 +0 -0
- data/lib/libssl.so.1.1 +0 -0
- data/lib/libz.so +0 -1
- data/lib/libz.so.1 +0 -1
- data/lib/libz.so.1.2.12 +0 -0
- data/lib/sysctl.d/00-alpine.conf +0 -40
@@ -0,0 +1,1014 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'date'
|
7
|
+
module AdvancedBilling
|
8
|
+
# Subscription Model.
|
9
|
+
class Subscription < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# The subscription unique id within Chargify.
|
14
|
+
# @return [Integer]
|
15
|
+
attr_accessor :id
|
16
|
+
|
17
|
+
# The state of a subscription.
|
18
|
+
# * **Live States**
|
19
|
+
# * `active` - A normal, active subscription. It is not in a trial and
|
20
|
+
# is paid and up to date.
|
21
|
+
# * `assessing` - An internal (transient) state that indicates a
|
22
|
+
# subscription is in the middle of periodic assessment. Do not base any
|
23
|
+
# access decisions in your app on this state, as it may not always be
|
24
|
+
# exposed.
|
25
|
+
# * `pending` - An internal (transient) state that indicates a
|
26
|
+
# subscription is in the creation process. Do not base any access decisions
|
27
|
+
# in your app on this state, as it may not always be exposed.
|
28
|
+
# * `trialing` - A subscription in trialing state has a valid trial
|
29
|
+
# subscription. This type of subscription may transition to active once
|
30
|
+
# payment is received when the trial has ended. Otherwise, it may go to a
|
31
|
+
# Problem or End of Life state.
|
32
|
+
# * `paused` - An internal state that indicates that your account with
|
33
|
+
# Advanced Billing is in arrears.
|
34
|
+
# * **Problem States**
|
35
|
+
# * `past_due` - Indicates that the most recent payment has failed, and
|
36
|
+
# payment is past due for this subscription. If you have enabled our
|
37
|
+
# automated dunning, this subscription will be in the dunning process
|
38
|
+
# (additional status and callbacks from the dunning process will be
|
39
|
+
# available in the future). If you are handling dunning and payment updates
|
40
|
+
# yourself, you will want to use this state to initiate a payment update
|
41
|
+
# from your customers.
|
42
|
+
# * `soft_failure` - Indicates that normal assessment/processing of the
|
43
|
+
# subscription has failed for a reason that cannot be fixed by the Customer.
|
44
|
+
# For example, a Soft Fail may result from a timeout at the gateway or
|
45
|
+
# incorrect credentials on your part. The subscriptions should be retried
|
46
|
+
# automatically. An interface is being built for you to review problems
|
47
|
+
# resulting from these events to take manual action when needed.
|
48
|
+
# * `unpaid` - Indicates an unpaid subscription. A subscription is
|
49
|
+
# marked unpaid if the retry period expires and you have configured your
|
50
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
51
|
+
# 05) settings to have a Final Action of `mark the subscription unpaid`.
|
52
|
+
# * **End of Life States**
|
53
|
+
# * `canceled` - Indicates a canceled subscription. This may happen at
|
54
|
+
# your request (via the API or the web interface) or due to the expiration
|
55
|
+
# of the
|
56
|
+
# [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/54055051410
|
57
|
+
# 05) process without payment. See the
|
58
|
+
# [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/540455
|
59
|
+
# 9291021) documentation for info on how to restart a canceled subscription.
|
60
|
+
# While a subscription is canceled, its period will not advance, it will
|
61
|
+
# not accrue any new charges, and Advanced Billing will not attempt to
|
62
|
+
# collect the overdue balance.
|
63
|
+
# * `expired` - Indicates a subscription that has expired due to running
|
64
|
+
# its normal life cycle. Some products may be configured to have an
|
65
|
+
# expiration period. An expired subscription then is one that stayed active
|
66
|
+
# until it fulfilled its full period.
|
67
|
+
# * `failed_to_create` - Indicates that signup has failed. (You may see
|
68
|
+
# this state in a signup_failure webhook.)
|
69
|
+
# * `on_hold` - Indicates that a subscription’s billing has been
|
70
|
+
# temporarily stopped. While it is expected that the subscription will
|
71
|
+
# resume and return to active status, this is still treated as an “End of
|
72
|
+
# Life” state because the customer is not paying for services during this
|
73
|
+
# time.
|
74
|
+
# * `suspended` - Indicates that a prepaid subscription has used up all
|
75
|
+
# their prepayment balance. If a prepayment is applied, it will return to an
|
76
|
+
# active state.
|
77
|
+
# * `trial_ended` - A subscription in a trial_ended state is a
|
78
|
+
# subscription that completed a no-obligation trial and did not have a card
|
79
|
+
# on file at the expiration of the trial period. See [Product Pricing – No
|
80
|
+
# Obligation
|
81
|
+
# Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221
|
82
|
+
# ) for more details.
|
83
|
+
# See [Subscription
|
84
|
+
# States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773
|
85
|
+
# ) for more info about subscription states and state transitions.
|
86
|
+
# @return [SubscriptionState]
|
87
|
+
attr_accessor :state
|
88
|
+
|
89
|
+
# Gives the current outstanding subscription balance in the number of cents.
|
90
|
+
# @return [Integer]
|
91
|
+
attr_accessor :balance_in_cents
|
92
|
+
|
93
|
+
# Gives the total revenue from the subscription in the number of cents.
|
94
|
+
# @return [Integer]
|
95
|
+
attr_accessor :total_revenue_in_cents
|
96
|
+
|
97
|
+
# (Added Nov 5 2013) The recurring amount of the product (and
|
98
|
+
# version),currently subscribed. NOTE: this may differ from the current
|
99
|
+
# price of,the product, if you’ve changed the price of the product but
|
100
|
+
# haven’t,moved this subscription to a newer version.
|
101
|
+
# @return [Integer]
|
102
|
+
attr_accessor :product_price_in_cents
|
103
|
+
|
104
|
+
# The version of the product for the subscription. Note that this is a
|
105
|
+
# deprecated field kept for backwards-compatibility.
|
106
|
+
# @return [Integer]
|
107
|
+
attr_accessor :product_version_number
|
108
|
+
|
109
|
+
# Timestamp relating to the end of the current (recurring) period (i.e.,when
|
110
|
+
# the next regularly scheduled attempted charge will occur)
|
111
|
+
# @return [DateTime]
|
112
|
+
attr_accessor :current_period_ends_at
|
113
|
+
|
114
|
+
# Timestamp that indicates when capture of payment will be tried or,retried.
|
115
|
+
# This value will usually track the current_period_ends_at, but,will diverge
|
116
|
+
# if a renewal payment fails and must be retried. In that,case, the
|
117
|
+
# current_period_ends_at will advance to the end of the next,period (time
|
118
|
+
# doesn’t stop because a payment was missed) but the,next_assessment_at will
|
119
|
+
# be scheduled for the auto-retry time (i.e. 24,hours in the future, in some
|
120
|
+
# cases)
|
121
|
+
# @return [DateTime]
|
122
|
+
attr_accessor :next_assessment_at
|
123
|
+
|
124
|
+
# Timestamp for when the trial period (if any) began
|
125
|
+
# @return [DateTime]
|
126
|
+
attr_accessor :trial_started_at
|
127
|
+
|
128
|
+
# Timestamp for when the trial period (if any) ended
|
129
|
+
# @return [DateTime]
|
130
|
+
attr_accessor :trial_ended_at
|
131
|
+
|
132
|
+
# Timestamp for when the subscription began (i.e. when it came out of trial,
|
133
|
+
# or when it began in the case of no trial)
|
134
|
+
# @return [DateTime]
|
135
|
+
attr_accessor :activated_at
|
136
|
+
|
137
|
+
# Timestamp giving the expiration date of this subscription (if any)
|
138
|
+
# @return [DateTime]
|
139
|
+
attr_accessor :expires_at
|
140
|
+
|
141
|
+
# The creation date for this subscription
|
142
|
+
# @return [DateTime]
|
143
|
+
attr_accessor :created_at
|
144
|
+
|
145
|
+
# The date of last update for this subscription
|
146
|
+
# @return [DateTime]
|
147
|
+
attr_accessor :updated_at
|
148
|
+
|
149
|
+
# Seller-provided reason for, or note about, the cancellation.
|
150
|
+
# @return [String]
|
151
|
+
attr_accessor :cancellation_message
|
152
|
+
|
153
|
+
# The process used to cancel the subscription, if the subscription has been
|
154
|
+
# canceled. It is nil if the subscription's state is not canceled.
|
155
|
+
# @return [CancellationMethod]
|
156
|
+
attr_accessor :cancellation_method
|
157
|
+
|
158
|
+
# Whether or not the subscription will (or has) canceled at the end of the
|
159
|
+
# period.
|
160
|
+
# @return [TrueClass | FalseClass]
|
161
|
+
attr_accessor :cancel_at_end_of_period
|
162
|
+
|
163
|
+
# The timestamp of the most recent cancellation
|
164
|
+
# @return [DateTime]
|
165
|
+
attr_accessor :canceled_at
|
166
|
+
|
167
|
+
# Timestamp relating to the start of the current (recurring) period
|
168
|
+
# @return [DateTime]
|
169
|
+
attr_accessor :current_period_started_at
|
170
|
+
|
171
|
+
# Only valid for webhook payloads The previous state for webhooks that have
|
172
|
+
# indicated a change in state. For normal API calls, this will always be the
|
173
|
+
# same as the state (current state)
|
174
|
+
# @return [SubscriptionState]
|
175
|
+
attr_accessor :previous_state
|
176
|
+
|
177
|
+
# The ID of the transaction that generated the revenue
|
178
|
+
# @return [Integer]
|
179
|
+
attr_accessor :signup_payment_id
|
180
|
+
|
181
|
+
# The revenue, formatted as a string of decimal separated dollars and,cents,
|
182
|
+
# from the subscription signup ($50.00 would be formatted as,50.00)
|
183
|
+
# @return [String]
|
184
|
+
attr_accessor :signup_revenue
|
185
|
+
|
186
|
+
# Timestamp for when the subscription is currently set to cancel.
|
187
|
+
# @return [DateTime]
|
188
|
+
attr_accessor :delayed_cancel_at
|
189
|
+
|
190
|
+
# (deprecated) The coupon code of the single coupon currently applied to the
|
191
|
+
# subscription. See coupon_codes instead as subscriptions can now have more
|
192
|
+
# than one coupon.
|
193
|
+
# @return [String]
|
194
|
+
attr_accessor :coupon_code
|
195
|
+
|
196
|
+
# The day of the month that the subscription will charge according to
|
197
|
+
# calendar billing rules, if used.
|
198
|
+
# @return [String]
|
199
|
+
attr_accessor :snap_day
|
200
|
+
|
201
|
+
# The type of payment collection to be used in the subscription. For legacy
|
202
|
+
# Statements Architecture valid options are - `invoice`, `automatic`. For
|
203
|
+
# current Relationship Invoicing Architecture valid options are -
|
204
|
+
# `remittance`, `automatic`, `prepaid`.
|
205
|
+
# @return [CollectionMethod]
|
206
|
+
attr_accessor :payment_collection_method
|
207
|
+
|
208
|
+
# The type of payment collection to be used in the subscription. For legacy
|
209
|
+
# Statements Architecture valid options are - `invoice`, `automatic`. For
|
210
|
+
# current Relationship Invoicing Architecture valid options are -
|
211
|
+
# `remittance`, `automatic`, `prepaid`.
|
212
|
+
# @return [Customer]
|
213
|
+
attr_accessor :customer
|
214
|
+
|
215
|
+
# The type of payment collection to be used in the subscription. For legacy
|
216
|
+
# Statements Architecture valid options are - `invoice`, `automatic`. For
|
217
|
+
# current Relationship Invoicing Architecture valid options are -
|
218
|
+
# `remittance`, `automatic`, `prepaid`.
|
219
|
+
# @return [Product]
|
220
|
+
attr_accessor :product
|
221
|
+
|
222
|
+
# The type of payment collection to be used in the subscription. For legacy
|
223
|
+
# Statements Architecture valid options are - `invoice`, `automatic`. For
|
224
|
+
# current Relationship Invoicing Architecture valid options are -
|
225
|
+
# `remittance`, `automatic`, `prepaid`.
|
226
|
+
# @return [CreditCardPaymentProfile]
|
227
|
+
attr_accessor :credit_card
|
228
|
+
|
229
|
+
# The type of payment collection to be used in the subscription. For legacy
|
230
|
+
# Statements Architecture valid options are - `invoice`, `automatic`. For
|
231
|
+
# current Relationship Invoicing Architecture valid options are -
|
232
|
+
# `remittance`, `automatic`, `prepaid`.
|
233
|
+
# @return [NestedSubscriptionGroup]
|
234
|
+
attr_accessor :group
|
235
|
+
|
236
|
+
# The type of payment collection to be used in the subscription. For legacy
|
237
|
+
# Statements Architecture valid options are - `invoice`, `automatic`. For
|
238
|
+
# current Relationship Invoicing Architecture valid options are -
|
239
|
+
# `remittance`, `automatic`, `prepaid`.
|
240
|
+
# @return [BankAccountPaymentProfile]
|
241
|
+
attr_accessor :bank_account
|
242
|
+
|
243
|
+
# The payment profile type for the active profile on file.
|
244
|
+
# @return [String]
|
245
|
+
attr_accessor :payment_type
|
246
|
+
|
247
|
+
# The subscription's unique code that can be given to referrals.
|
248
|
+
# @return [String]
|
249
|
+
attr_accessor :referral_code
|
250
|
+
|
251
|
+
# If a delayed product change is scheduled, the ID of the product that the
|
252
|
+
# subscription will be changed to at the next renewal.
|
253
|
+
# @return [Integer]
|
254
|
+
attr_accessor :next_product_id
|
255
|
+
|
256
|
+
# If a delayed product change is scheduled, the handle of the product that
|
257
|
+
# the subscription will be changed to at the next renewal.
|
258
|
+
# @return [String]
|
259
|
+
attr_accessor :next_product_handle
|
260
|
+
|
261
|
+
# (deprecated) How many times the subscription's single coupon has been
|
262
|
+
# used. This field has no replacement for multiple coupons.
|
263
|
+
# @return [Integer]
|
264
|
+
attr_accessor :coupon_use_count
|
265
|
+
|
266
|
+
# (deprecated) How many times the subscription's single coupon may be used.
|
267
|
+
# This field has no replacement for multiple coupons.
|
268
|
+
# @return [Integer]
|
269
|
+
attr_accessor :coupon_uses_allowed
|
270
|
+
|
271
|
+
# If the subscription is canceled, this is their churn code.
|
272
|
+
# @return [String]
|
273
|
+
attr_accessor :reason_code
|
274
|
+
|
275
|
+
# The date the subscription is scheduled to automatically resume from the
|
276
|
+
# on_hold state.
|
277
|
+
# @return [DateTime]
|
278
|
+
attr_accessor :automatically_resume_at
|
279
|
+
|
280
|
+
# An array for all the coupons attached to the subscription.
|
281
|
+
# @return [Array[String]]
|
282
|
+
attr_accessor :coupon_codes
|
283
|
+
|
284
|
+
# The ID of the offer associated with the subscription.
|
285
|
+
# @return [Integer]
|
286
|
+
attr_accessor :offer_id
|
287
|
+
|
288
|
+
# On Relationship Invoicing, the ID of the individual paying for the
|
289
|
+
# subscription. Defaults to the Customer ID unless the 'Customer Hierarchies
|
290
|
+
# & WhoPays' feature is enabled.
|
291
|
+
# @return [Integer]
|
292
|
+
attr_accessor :payer_id
|
293
|
+
|
294
|
+
# The balance in cents plus the estimated renewal amount in cents.
|
295
|
+
# @return [Integer]
|
296
|
+
attr_accessor :current_billing_amount_in_cents
|
297
|
+
|
298
|
+
# The product price point currently subscribed to.
|
299
|
+
# @return [Integer]
|
300
|
+
attr_accessor :product_price_point_id
|
301
|
+
|
302
|
+
# Price point type. We expose the following types:
|
303
|
+
# 1. **default**: a price point that is marked as a default price for a
|
304
|
+
# certain product.
|
305
|
+
# 2. **custom**: a custom price point.
|
306
|
+
# 3. **catalog**: a price point that is **not** marked as a default price
|
307
|
+
# for a certain product and is **not** a custom one.
|
308
|
+
# @return [PricePointType]
|
309
|
+
attr_accessor :product_price_point_type
|
310
|
+
|
311
|
+
# If a delayed product change is scheduled, the ID of the product price
|
312
|
+
# point that the subscription will be changed to at the next renewal.
|
313
|
+
# @return [Integer]
|
314
|
+
attr_accessor :next_product_price_point_id
|
315
|
+
|
316
|
+
# On Relationship Invoicing, the number of days before a renewal invoice is
|
317
|
+
# due.
|
318
|
+
# @return [Integer]
|
319
|
+
attr_accessor :net_terms
|
320
|
+
|
321
|
+
# For European sites subject to PSD2 and using 3D Secure, this can be used
|
322
|
+
# to reference a previous transaction for the customer. This will ensure the
|
323
|
+
# card will be charged successfully at renewal.
|
324
|
+
# @return [Integer]
|
325
|
+
attr_accessor :stored_credential_transaction_id
|
326
|
+
|
327
|
+
# The reference value (provided by your app) for the subscription itelf.
|
328
|
+
# @return [String]
|
329
|
+
attr_accessor :reference
|
330
|
+
|
331
|
+
# The timestamp of the most recent on hold action.
|
332
|
+
# @return [DateTime]
|
333
|
+
attr_accessor :on_hold_at
|
334
|
+
|
335
|
+
# Boolean representing whether the subscription is prepaid and currently in
|
336
|
+
# dunning. Only returned for Relationship Invoicing sites with the feature
|
337
|
+
# enabled
|
338
|
+
# @return [TrueClass | FalseClass]
|
339
|
+
attr_accessor :prepaid_dunning
|
340
|
+
|
341
|
+
# Additional coupon data. To use this data you also have to include the
|
342
|
+
# following param in the request`include[]=coupons`.
|
343
|
+
# Only in Read Subscription Endpoint.
|
344
|
+
# @return [Array[SubscriptionIncludedCoupon]]
|
345
|
+
attr_accessor :coupons
|
346
|
+
|
347
|
+
# Enable Communication Delay feature, making sure no communication (email or
|
348
|
+
# SMS) is sent to the Customer between 9PM and 8AM in time zone set by the
|
349
|
+
# `dunning_communication_delay_time_zone` attribute.
|
350
|
+
# @return [TrueClass | FalseClass]
|
351
|
+
attr_accessor :dunning_communication_delay_enabled
|
352
|
+
|
353
|
+
# Time zone for the Dunning Communication Delay feature.
|
354
|
+
# @return [String]
|
355
|
+
attr_accessor :dunning_communication_delay_time_zone
|
356
|
+
|
357
|
+
# Time zone for the Dunning Communication Delay feature.
|
358
|
+
# @return [TrueClass | FalseClass]
|
359
|
+
attr_accessor :receives_invoice_emails
|
360
|
+
|
361
|
+
# Time zone for the Dunning Communication Delay feature.
|
362
|
+
# @return [String]
|
363
|
+
attr_accessor :locale
|
364
|
+
|
365
|
+
# Time zone for the Dunning Communication Delay feature.
|
366
|
+
# @return [String]
|
367
|
+
attr_accessor :currency
|
368
|
+
|
369
|
+
# Time zone for the Dunning Communication Delay feature.
|
370
|
+
# @return [DateTime]
|
371
|
+
attr_accessor :scheduled_cancellation_at
|
372
|
+
|
373
|
+
# Time zone for the Dunning Communication Delay feature.
|
374
|
+
# @return [Integer]
|
375
|
+
attr_accessor :credit_balance_in_cents
|
376
|
+
|
377
|
+
# Time zone for the Dunning Communication Delay feature.
|
378
|
+
# @return [Integer]
|
379
|
+
attr_accessor :prepayment_balance_in_cents
|
380
|
+
|
381
|
+
# Time zone for the Dunning Communication Delay feature.
|
382
|
+
# @return [PrepaidConfiguration]
|
383
|
+
attr_accessor :prepaid_configuration
|
384
|
+
|
385
|
+
# Returned only for list/read Subscription operation when
|
386
|
+
# `include[]=self_service_page_token` parameter is provided.
|
387
|
+
# @return [String]
|
388
|
+
attr_accessor :self_service_page_token
|
389
|
+
|
390
|
+
# A mapping from model property names to API property names.
|
391
|
+
def self.names
|
392
|
+
@_hash = {} if @_hash.nil?
|
393
|
+
@_hash['id'] = 'id'
|
394
|
+
@_hash['state'] = 'state'
|
395
|
+
@_hash['balance_in_cents'] = 'balance_in_cents'
|
396
|
+
@_hash['total_revenue_in_cents'] = 'total_revenue_in_cents'
|
397
|
+
@_hash['product_price_in_cents'] = 'product_price_in_cents'
|
398
|
+
@_hash['product_version_number'] = 'product_version_number'
|
399
|
+
@_hash['current_period_ends_at'] = 'current_period_ends_at'
|
400
|
+
@_hash['next_assessment_at'] = 'next_assessment_at'
|
401
|
+
@_hash['trial_started_at'] = 'trial_started_at'
|
402
|
+
@_hash['trial_ended_at'] = 'trial_ended_at'
|
403
|
+
@_hash['activated_at'] = 'activated_at'
|
404
|
+
@_hash['expires_at'] = 'expires_at'
|
405
|
+
@_hash['created_at'] = 'created_at'
|
406
|
+
@_hash['updated_at'] = 'updated_at'
|
407
|
+
@_hash['cancellation_message'] = 'cancellation_message'
|
408
|
+
@_hash['cancellation_method'] = 'cancellation_method'
|
409
|
+
@_hash['cancel_at_end_of_period'] = 'cancel_at_end_of_period'
|
410
|
+
@_hash['canceled_at'] = 'canceled_at'
|
411
|
+
@_hash['current_period_started_at'] = 'current_period_started_at'
|
412
|
+
@_hash['previous_state'] = 'previous_state'
|
413
|
+
@_hash['signup_payment_id'] = 'signup_payment_id'
|
414
|
+
@_hash['signup_revenue'] = 'signup_revenue'
|
415
|
+
@_hash['delayed_cancel_at'] = 'delayed_cancel_at'
|
416
|
+
@_hash['coupon_code'] = 'coupon_code'
|
417
|
+
@_hash['snap_day'] = 'snap_day'
|
418
|
+
@_hash['payment_collection_method'] = 'payment_collection_method'
|
419
|
+
@_hash['customer'] = 'customer'
|
420
|
+
@_hash['product'] = 'product'
|
421
|
+
@_hash['credit_card'] = 'credit_card'
|
422
|
+
@_hash['group'] = 'group'
|
423
|
+
@_hash['bank_account'] = 'bank_account'
|
424
|
+
@_hash['payment_type'] = 'payment_type'
|
425
|
+
@_hash['referral_code'] = 'referral_code'
|
426
|
+
@_hash['next_product_id'] = 'next_product_id'
|
427
|
+
@_hash['next_product_handle'] = 'next_product_handle'
|
428
|
+
@_hash['coupon_use_count'] = 'coupon_use_count'
|
429
|
+
@_hash['coupon_uses_allowed'] = 'coupon_uses_allowed'
|
430
|
+
@_hash['reason_code'] = 'reason_code'
|
431
|
+
@_hash['automatically_resume_at'] = 'automatically_resume_at'
|
432
|
+
@_hash['coupon_codes'] = 'coupon_codes'
|
433
|
+
@_hash['offer_id'] = 'offer_id'
|
434
|
+
@_hash['payer_id'] = 'payer_id'
|
435
|
+
@_hash['current_billing_amount_in_cents'] =
|
436
|
+
'current_billing_amount_in_cents'
|
437
|
+
@_hash['product_price_point_id'] = 'product_price_point_id'
|
438
|
+
@_hash['product_price_point_type'] = 'product_price_point_type'
|
439
|
+
@_hash['next_product_price_point_id'] = 'next_product_price_point_id'
|
440
|
+
@_hash['net_terms'] = 'net_terms'
|
441
|
+
@_hash['stored_credential_transaction_id'] =
|
442
|
+
'stored_credential_transaction_id'
|
443
|
+
@_hash['reference'] = 'reference'
|
444
|
+
@_hash['on_hold_at'] = 'on_hold_at'
|
445
|
+
@_hash['prepaid_dunning'] = 'prepaid_dunning'
|
446
|
+
@_hash['coupons'] = 'coupons'
|
447
|
+
@_hash['dunning_communication_delay_enabled'] =
|
448
|
+
'dunning_communication_delay_enabled'
|
449
|
+
@_hash['dunning_communication_delay_time_zone'] =
|
450
|
+
'dunning_communication_delay_time_zone'
|
451
|
+
@_hash['receives_invoice_emails'] = 'receives_invoice_emails'
|
452
|
+
@_hash['locale'] = 'locale'
|
453
|
+
@_hash['currency'] = 'currency'
|
454
|
+
@_hash['scheduled_cancellation_at'] = 'scheduled_cancellation_at'
|
455
|
+
@_hash['credit_balance_in_cents'] = 'credit_balance_in_cents'
|
456
|
+
@_hash['prepayment_balance_in_cents'] = 'prepayment_balance_in_cents'
|
457
|
+
@_hash['prepaid_configuration'] = 'prepaid_configuration'
|
458
|
+
@_hash['self_service_page_token'] = 'self_service_page_token'
|
459
|
+
@_hash
|
460
|
+
end
|
461
|
+
|
462
|
+
# An array for optional fields
|
463
|
+
def self.optionals
|
464
|
+
%w[
|
465
|
+
id
|
466
|
+
state
|
467
|
+
balance_in_cents
|
468
|
+
total_revenue_in_cents
|
469
|
+
product_price_in_cents
|
470
|
+
product_version_number
|
471
|
+
current_period_ends_at
|
472
|
+
next_assessment_at
|
473
|
+
trial_started_at
|
474
|
+
trial_ended_at
|
475
|
+
activated_at
|
476
|
+
expires_at
|
477
|
+
created_at
|
478
|
+
updated_at
|
479
|
+
cancellation_message
|
480
|
+
cancellation_method
|
481
|
+
cancel_at_end_of_period
|
482
|
+
canceled_at
|
483
|
+
current_period_started_at
|
484
|
+
previous_state
|
485
|
+
signup_payment_id
|
486
|
+
signup_revenue
|
487
|
+
delayed_cancel_at
|
488
|
+
coupon_code
|
489
|
+
snap_day
|
490
|
+
payment_collection_method
|
491
|
+
customer
|
492
|
+
product
|
493
|
+
credit_card
|
494
|
+
group
|
495
|
+
bank_account
|
496
|
+
payment_type
|
497
|
+
referral_code
|
498
|
+
next_product_id
|
499
|
+
next_product_handle
|
500
|
+
coupon_use_count
|
501
|
+
coupon_uses_allowed
|
502
|
+
reason_code
|
503
|
+
automatically_resume_at
|
504
|
+
coupon_codes
|
505
|
+
offer_id
|
506
|
+
payer_id
|
507
|
+
current_billing_amount_in_cents
|
508
|
+
product_price_point_id
|
509
|
+
product_price_point_type
|
510
|
+
next_product_price_point_id
|
511
|
+
net_terms
|
512
|
+
stored_credential_transaction_id
|
513
|
+
reference
|
514
|
+
on_hold_at
|
515
|
+
prepaid_dunning
|
516
|
+
coupons
|
517
|
+
dunning_communication_delay_enabled
|
518
|
+
dunning_communication_delay_time_zone
|
519
|
+
receives_invoice_emails
|
520
|
+
locale
|
521
|
+
currency
|
522
|
+
scheduled_cancellation_at
|
523
|
+
credit_balance_in_cents
|
524
|
+
prepayment_balance_in_cents
|
525
|
+
prepaid_configuration
|
526
|
+
self_service_page_token
|
527
|
+
]
|
528
|
+
end
|
529
|
+
|
530
|
+
# An array for nullable fields
|
531
|
+
def self.nullables
|
532
|
+
%w[
|
533
|
+
trial_started_at
|
534
|
+
trial_ended_at
|
535
|
+
expires_at
|
536
|
+
cancellation_message
|
537
|
+
cancellation_method
|
538
|
+
cancel_at_end_of_period
|
539
|
+
canceled_at
|
540
|
+
delayed_cancel_at
|
541
|
+
coupon_code
|
542
|
+
snap_day
|
543
|
+
group
|
544
|
+
payment_type
|
545
|
+
referral_code
|
546
|
+
next_product_id
|
547
|
+
next_product_handle
|
548
|
+
coupon_use_count
|
549
|
+
coupon_uses_allowed
|
550
|
+
reason_code
|
551
|
+
automatically_resume_at
|
552
|
+
offer_id
|
553
|
+
payer_id
|
554
|
+
next_product_price_point_id
|
555
|
+
net_terms
|
556
|
+
stored_credential_transaction_id
|
557
|
+
reference
|
558
|
+
on_hold_at
|
559
|
+
dunning_communication_delay_time_zone
|
560
|
+
receives_invoice_emails
|
561
|
+
locale
|
562
|
+
scheduled_cancellation_at
|
563
|
+
]
|
564
|
+
end
|
565
|
+
|
566
|
+
def initialize(id = SKIP,
|
567
|
+
state = SKIP,
|
568
|
+
balance_in_cents = SKIP,
|
569
|
+
total_revenue_in_cents = SKIP,
|
570
|
+
product_price_in_cents = SKIP,
|
571
|
+
product_version_number = SKIP,
|
572
|
+
current_period_ends_at = SKIP,
|
573
|
+
next_assessment_at = SKIP,
|
574
|
+
trial_started_at = SKIP,
|
575
|
+
trial_ended_at = SKIP,
|
576
|
+
activated_at = SKIP,
|
577
|
+
expires_at = SKIP,
|
578
|
+
created_at = SKIP,
|
579
|
+
updated_at = SKIP,
|
580
|
+
cancellation_message = SKIP,
|
581
|
+
cancellation_method = SKIP,
|
582
|
+
cancel_at_end_of_period = SKIP,
|
583
|
+
canceled_at = SKIP,
|
584
|
+
current_period_started_at = SKIP,
|
585
|
+
previous_state = SKIP,
|
586
|
+
signup_payment_id = SKIP,
|
587
|
+
signup_revenue = SKIP,
|
588
|
+
delayed_cancel_at = SKIP,
|
589
|
+
coupon_code = SKIP,
|
590
|
+
snap_day = SKIP,
|
591
|
+
payment_collection_method = CollectionMethod::AUTOMATIC,
|
592
|
+
customer = SKIP,
|
593
|
+
product = SKIP,
|
594
|
+
credit_card = SKIP,
|
595
|
+
group = SKIP,
|
596
|
+
bank_account = SKIP,
|
597
|
+
payment_type = SKIP,
|
598
|
+
referral_code = SKIP,
|
599
|
+
next_product_id = SKIP,
|
600
|
+
next_product_handle = SKIP,
|
601
|
+
coupon_use_count = SKIP,
|
602
|
+
coupon_uses_allowed = SKIP,
|
603
|
+
reason_code = SKIP,
|
604
|
+
automatically_resume_at = SKIP,
|
605
|
+
coupon_codes = SKIP,
|
606
|
+
offer_id = SKIP,
|
607
|
+
payer_id = SKIP,
|
608
|
+
current_billing_amount_in_cents = SKIP,
|
609
|
+
product_price_point_id = SKIP,
|
610
|
+
product_price_point_type = SKIP,
|
611
|
+
next_product_price_point_id = SKIP,
|
612
|
+
net_terms = SKIP,
|
613
|
+
stored_credential_transaction_id = SKIP,
|
614
|
+
reference = SKIP,
|
615
|
+
on_hold_at = SKIP,
|
616
|
+
prepaid_dunning = SKIP,
|
617
|
+
coupons = SKIP,
|
618
|
+
dunning_communication_delay_enabled = false,
|
619
|
+
dunning_communication_delay_time_zone = SKIP,
|
620
|
+
receives_invoice_emails = SKIP,
|
621
|
+
locale = SKIP,
|
622
|
+
currency = SKIP,
|
623
|
+
scheduled_cancellation_at = SKIP,
|
624
|
+
credit_balance_in_cents = SKIP,
|
625
|
+
prepayment_balance_in_cents = SKIP,
|
626
|
+
prepaid_configuration = SKIP,
|
627
|
+
self_service_page_token = SKIP)
|
628
|
+
@id = id unless id == SKIP
|
629
|
+
@state = state unless state == SKIP
|
630
|
+
@balance_in_cents = balance_in_cents unless balance_in_cents == SKIP
|
631
|
+
@total_revenue_in_cents = total_revenue_in_cents unless total_revenue_in_cents == SKIP
|
632
|
+
@product_price_in_cents = product_price_in_cents unless product_price_in_cents == SKIP
|
633
|
+
@product_version_number = product_version_number unless product_version_number == SKIP
|
634
|
+
@current_period_ends_at = current_period_ends_at unless current_period_ends_at == SKIP
|
635
|
+
@next_assessment_at = next_assessment_at unless next_assessment_at == SKIP
|
636
|
+
@trial_started_at = trial_started_at unless trial_started_at == SKIP
|
637
|
+
@trial_ended_at = trial_ended_at unless trial_ended_at == SKIP
|
638
|
+
@activated_at = activated_at unless activated_at == SKIP
|
639
|
+
@expires_at = expires_at unless expires_at == SKIP
|
640
|
+
@created_at = created_at unless created_at == SKIP
|
641
|
+
@updated_at = updated_at unless updated_at == SKIP
|
642
|
+
@cancellation_message = cancellation_message unless cancellation_message == SKIP
|
643
|
+
@cancellation_method = cancellation_method unless cancellation_method == SKIP
|
644
|
+
@cancel_at_end_of_period = cancel_at_end_of_period unless cancel_at_end_of_period == SKIP
|
645
|
+
@canceled_at = canceled_at unless canceled_at == SKIP
|
646
|
+
unless current_period_started_at == SKIP
|
647
|
+
@current_period_started_at =
|
648
|
+
current_period_started_at
|
649
|
+
end
|
650
|
+
@previous_state = previous_state unless previous_state == SKIP
|
651
|
+
@signup_payment_id = signup_payment_id unless signup_payment_id == SKIP
|
652
|
+
@signup_revenue = signup_revenue unless signup_revenue == SKIP
|
653
|
+
@delayed_cancel_at = delayed_cancel_at unless delayed_cancel_at == SKIP
|
654
|
+
@coupon_code = coupon_code unless coupon_code == SKIP
|
655
|
+
@snap_day = snap_day unless snap_day == SKIP
|
656
|
+
unless payment_collection_method == SKIP
|
657
|
+
@payment_collection_method =
|
658
|
+
payment_collection_method
|
659
|
+
end
|
660
|
+
@customer = customer unless customer == SKIP
|
661
|
+
@product = product unless product == SKIP
|
662
|
+
@credit_card = credit_card unless credit_card == SKIP
|
663
|
+
@group = group unless group == SKIP
|
664
|
+
@bank_account = bank_account unless bank_account == SKIP
|
665
|
+
@payment_type = payment_type unless payment_type == SKIP
|
666
|
+
@referral_code = referral_code unless referral_code == SKIP
|
667
|
+
@next_product_id = next_product_id unless next_product_id == SKIP
|
668
|
+
@next_product_handle = next_product_handle unless next_product_handle == SKIP
|
669
|
+
@coupon_use_count = coupon_use_count unless coupon_use_count == SKIP
|
670
|
+
@coupon_uses_allowed = coupon_uses_allowed unless coupon_uses_allowed == SKIP
|
671
|
+
@reason_code = reason_code unless reason_code == SKIP
|
672
|
+
@automatically_resume_at = automatically_resume_at unless automatically_resume_at == SKIP
|
673
|
+
@coupon_codes = coupon_codes unless coupon_codes == SKIP
|
674
|
+
@offer_id = offer_id unless offer_id == SKIP
|
675
|
+
@payer_id = payer_id unless payer_id == SKIP
|
676
|
+
unless current_billing_amount_in_cents == SKIP
|
677
|
+
@current_billing_amount_in_cents =
|
678
|
+
current_billing_amount_in_cents
|
679
|
+
end
|
680
|
+
@product_price_point_id = product_price_point_id unless product_price_point_id == SKIP
|
681
|
+
@product_price_point_type = product_price_point_type unless product_price_point_type == SKIP
|
682
|
+
unless next_product_price_point_id == SKIP
|
683
|
+
@next_product_price_point_id =
|
684
|
+
next_product_price_point_id
|
685
|
+
end
|
686
|
+
@net_terms = net_terms unless net_terms == SKIP
|
687
|
+
unless stored_credential_transaction_id == SKIP
|
688
|
+
@stored_credential_transaction_id =
|
689
|
+
stored_credential_transaction_id
|
690
|
+
end
|
691
|
+
@reference = reference unless reference == SKIP
|
692
|
+
@on_hold_at = on_hold_at unless on_hold_at == SKIP
|
693
|
+
@prepaid_dunning = prepaid_dunning unless prepaid_dunning == SKIP
|
694
|
+
@coupons = coupons unless coupons == SKIP
|
695
|
+
unless dunning_communication_delay_enabled == SKIP
|
696
|
+
@dunning_communication_delay_enabled =
|
697
|
+
dunning_communication_delay_enabled
|
698
|
+
end
|
699
|
+
unless dunning_communication_delay_time_zone == SKIP
|
700
|
+
@dunning_communication_delay_time_zone =
|
701
|
+
dunning_communication_delay_time_zone
|
702
|
+
end
|
703
|
+
@receives_invoice_emails = receives_invoice_emails unless receives_invoice_emails == SKIP
|
704
|
+
@locale = locale unless locale == SKIP
|
705
|
+
@currency = currency unless currency == SKIP
|
706
|
+
unless scheduled_cancellation_at == SKIP
|
707
|
+
@scheduled_cancellation_at =
|
708
|
+
scheduled_cancellation_at
|
709
|
+
end
|
710
|
+
@credit_balance_in_cents = credit_balance_in_cents unless credit_balance_in_cents == SKIP
|
711
|
+
unless prepayment_balance_in_cents == SKIP
|
712
|
+
@prepayment_balance_in_cents =
|
713
|
+
prepayment_balance_in_cents
|
714
|
+
end
|
715
|
+
@prepaid_configuration = prepaid_configuration unless prepaid_configuration == SKIP
|
716
|
+
@self_service_page_token = self_service_page_token unless self_service_page_token == SKIP
|
717
|
+
end
|
718
|
+
|
719
|
+
# Creates an instance of the object from a hash.
|
720
|
+
def self.from_hash(hash)
|
721
|
+
return nil unless hash
|
722
|
+
|
723
|
+
# Extract variables from the hash.
|
724
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
725
|
+
state = hash.key?('state') ? hash['state'] : SKIP
|
726
|
+
balance_in_cents =
|
727
|
+
hash.key?('balance_in_cents') ? hash['balance_in_cents'] : SKIP
|
728
|
+
total_revenue_in_cents =
|
729
|
+
hash.key?('total_revenue_in_cents') ? hash['total_revenue_in_cents'] : SKIP
|
730
|
+
product_price_in_cents =
|
731
|
+
hash.key?('product_price_in_cents') ? hash['product_price_in_cents'] : SKIP
|
732
|
+
product_version_number =
|
733
|
+
hash.key?('product_version_number') ? hash['product_version_number'] : SKIP
|
734
|
+
current_period_ends_at = if hash.key?('current_period_ends_at')
|
735
|
+
(DateTimeHelper.from_rfc3339(hash['current_period_ends_at']) if hash['current_period_ends_at'])
|
736
|
+
else
|
737
|
+
SKIP
|
738
|
+
end
|
739
|
+
next_assessment_at = if hash.key?('next_assessment_at')
|
740
|
+
(DateTimeHelper.from_rfc3339(hash['next_assessment_at']) if hash['next_assessment_at'])
|
741
|
+
else
|
742
|
+
SKIP
|
743
|
+
end
|
744
|
+
trial_started_at = if hash.key?('trial_started_at')
|
745
|
+
(DateTimeHelper.from_rfc3339(hash['trial_started_at']) if hash['trial_started_at'])
|
746
|
+
else
|
747
|
+
SKIP
|
748
|
+
end
|
749
|
+
trial_ended_at = if hash.key?('trial_ended_at')
|
750
|
+
(DateTimeHelper.from_rfc3339(hash['trial_ended_at']) if hash['trial_ended_at'])
|
751
|
+
else
|
752
|
+
SKIP
|
753
|
+
end
|
754
|
+
activated_at = if hash.key?('activated_at')
|
755
|
+
(DateTimeHelper.from_rfc3339(hash['activated_at']) if hash['activated_at'])
|
756
|
+
else
|
757
|
+
SKIP
|
758
|
+
end
|
759
|
+
expires_at = if hash.key?('expires_at')
|
760
|
+
(DateTimeHelper.from_rfc3339(hash['expires_at']) if hash['expires_at'])
|
761
|
+
else
|
762
|
+
SKIP
|
763
|
+
end
|
764
|
+
created_at = if hash.key?('created_at')
|
765
|
+
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
766
|
+
else
|
767
|
+
SKIP
|
768
|
+
end
|
769
|
+
updated_at = if hash.key?('updated_at')
|
770
|
+
(DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
|
771
|
+
else
|
772
|
+
SKIP
|
773
|
+
end
|
774
|
+
cancellation_message =
|
775
|
+
hash.key?('cancellation_message') ? hash['cancellation_message'] : SKIP
|
776
|
+
cancellation_method =
|
777
|
+
hash.key?('cancellation_method') ? hash['cancellation_method'] : SKIP
|
778
|
+
cancel_at_end_of_period =
|
779
|
+
hash.key?('cancel_at_end_of_period') ? hash['cancel_at_end_of_period'] : SKIP
|
780
|
+
canceled_at = if hash.key?('canceled_at')
|
781
|
+
(DateTimeHelper.from_rfc3339(hash['canceled_at']) if hash['canceled_at'])
|
782
|
+
else
|
783
|
+
SKIP
|
784
|
+
end
|
785
|
+
current_period_started_at = if hash.key?('current_period_started_at')
|
786
|
+
(DateTimeHelper.from_rfc3339(hash['current_period_started_at']) if hash['current_period_started_at'])
|
787
|
+
else
|
788
|
+
SKIP
|
789
|
+
end
|
790
|
+
previous_state =
|
791
|
+
hash.key?('previous_state') ? hash['previous_state'] : SKIP
|
792
|
+
signup_payment_id =
|
793
|
+
hash.key?('signup_payment_id') ? hash['signup_payment_id'] : SKIP
|
794
|
+
signup_revenue =
|
795
|
+
hash.key?('signup_revenue') ? hash['signup_revenue'] : SKIP
|
796
|
+
delayed_cancel_at = if hash.key?('delayed_cancel_at')
|
797
|
+
(DateTimeHelper.from_rfc3339(hash['delayed_cancel_at']) if hash['delayed_cancel_at'])
|
798
|
+
else
|
799
|
+
SKIP
|
800
|
+
end
|
801
|
+
coupon_code = hash.key?('coupon_code') ? hash['coupon_code'] : SKIP
|
802
|
+
snap_day = hash.key?('snap_day') ? hash['snap_day'] : SKIP
|
803
|
+
payment_collection_method =
|
804
|
+
hash['payment_collection_method'] ||= CollectionMethod::AUTOMATIC
|
805
|
+
customer = Customer.from_hash(hash['customer']) if hash['customer']
|
806
|
+
product = Product.from_hash(hash['product']) if hash['product']
|
807
|
+
credit_card = CreditCardPaymentProfile.from_hash(hash['credit_card']) if hash['credit_card']
|
808
|
+
group = hash.key?('group') ? APIHelper.deserialize_union_type(
|
809
|
+
UnionTypeLookUp.get(:SubscriptionGroup2), hash['group']
|
810
|
+
) : SKIP
|
811
|
+
bank_account = BankAccountPaymentProfile.from_hash(hash['bank_account']) if
|
812
|
+
hash['bank_account']
|
813
|
+
payment_type = hash.key?('payment_type') ? hash['payment_type'] : SKIP
|
814
|
+
referral_code = hash.key?('referral_code') ? hash['referral_code'] : SKIP
|
815
|
+
next_product_id =
|
816
|
+
hash.key?('next_product_id') ? hash['next_product_id'] : SKIP
|
817
|
+
next_product_handle =
|
818
|
+
hash.key?('next_product_handle') ? hash['next_product_handle'] : SKIP
|
819
|
+
coupon_use_count =
|
820
|
+
hash.key?('coupon_use_count') ? hash['coupon_use_count'] : SKIP
|
821
|
+
coupon_uses_allowed =
|
822
|
+
hash.key?('coupon_uses_allowed') ? hash['coupon_uses_allowed'] : SKIP
|
823
|
+
reason_code = hash.key?('reason_code') ? hash['reason_code'] : SKIP
|
824
|
+
automatically_resume_at = if hash.key?('automatically_resume_at')
|
825
|
+
(DateTimeHelper.from_rfc3339(hash['automatically_resume_at']) if hash['automatically_resume_at'])
|
826
|
+
else
|
827
|
+
SKIP
|
828
|
+
end
|
829
|
+
coupon_codes = hash.key?('coupon_codes') ? hash['coupon_codes'] : SKIP
|
830
|
+
offer_id = hash.key?('offer_id') ? hash['offer_id'] : SKIP
|
831
|
+
payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP
|
832
|
+
current_billing_amount_in_cents =
|
833
|
+
hash.key?('current_billing_amount_in_cents') ? hash['current_billing_amount_in_cents'] : SKIP
|
834
|
+
product_price_point_id =
|
835
|
+
hash.key?('product_price_point_id') ? hash['product_price_point_id'] : SKIP
|
836
|
+
product_price_point_type =
|
837
|
+
hash.key?('product_price_point_type') ? hash['product_price_point_type'] : SKIP
|
838
|
+
next_product_price_point_id =
|
839
|
+
hash.key?('next_product_price_point_id') ? hash['next_product_price_point_id'] : SKIP
|
840
|
+
net_terms = hash.key?('net_terms') ? hash['net_terms'] : SKIP
|
841
|
+
stored_credential_transaction_id =
|
842
|
+
hash.key?('stored_credential_transaction_id') ? hash['stored_credential_transaction_id'] : SKIP
|
843
|
+
reference = hash.key?('reference') ? hash['reference'] : SKIP
|
844
|
+
on_hold_at = if hash.key?('on_hold_at')
|
845
|
+
(DateTimeHelper.from_rfc3339(hash['on_hold_at']) if hash['on_hold_at'])
|
846
|
+
else
|
847
|
+
SKIP
|
848
|
+
end
|
849
|
+
prepaid_dunning =
|
850
|
+
hash.key?('prepaid_dunning') ? hash['prepaid_dunning'] : SKIP
|
851
|
+
# Parameter is an array, so we need to iterate through it
|
852
|
+
coupons = nil
|
853
|
+
unless hash['coupons'].nil?
|
854
|
+
coupons = []
|
855
|
+
hash['coupons'].each do |structure|
|
856
|
+
coupons << (SubscriptionIncludedCoupon.from_hash(structure) if structure)
|
857
|
+
end
|
858
|
+
end
|
859
|
+
|
860
|
+
coupons = SKIP unless hash.key?('coupons')
|
861
|
+
dunning_communication_delay_enabled =
|
862
|
+
hash['dunning_communication_delay_enabled'] ||= false
|
863
|
+
dunning_communication_delay_time_zone =
|
864
|
+
hash.key?('dunning_communication_delay_time_zone') ? hash['dunning_communication_delay_time_zone'] : SKIP
|
865
|
+
receives_invoice_emails =
|
866
|
+
hash.key?('receives_invoice_emails') ? hash['receives_invoice_emails'] : SKIP
|
867
|
+
locale = hash.key?('locale') ? hash['locale'] : SKIP
|
868
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
869
|
+
scheduled_cancellation_at = if hash.key?('scheduled_cancellation_at')
|
870
|
+
(DateTimeHelper.from_rfc3339(hash['scheduled_cancellation_at']) if hash['scheduled_cancellation_at'])
|
871
|
+
else
|
872
|
+
SKIP
|
873
|
+
end
|
874
|
+
credit_balance_in_cents =
|
875
|
+
hash.key?('credit_balance_in_cents') ? hash['credit_balance_in_cents'] : SKIP
|
876
|
+
prepayment_balance_in_cents =
|
877
|
+
hash.key?('prepayment_balance_in_cents') ? hash['prepayment_balance_in_cents'] : SKIP
|
878
|
+
prepaid_configuration = PrepaidConfiguration.from_hash(hash['prepaid_configuration']) if
|
879
|
+
hash['prepaid_configuration']
|
880
|
+
self_service_page_token =
|
881
|
+
hash.key?('self_service_page_token') ? hash['self_service_page_token'] : SKIP
|
882
|
+
|
883
|
+
# Create object from extracted values.
|
884
|
+
Subscription.new(id,
|
885
|
+
state,
|
886
|
+
balance_in_cents,
|
887
|
+
total_revenue_in_cents,
|
888
|
+
product_price_in_cents,
|
889
|
+
product_version_number,
|
890
|
+
current_period_ends_at,
|
891
|
+
next_assessment_at,
|
892
|
+
trial_started_at,
|
893
|
+
trial_ended_at,
|
894
|
+
activated_at,
|
895
|
+
expires_at,
|
896
|
+
created_at,
|
897
|
+
updated_at,
|
898
|
+
cancellation_message,
|
899
|
+
cancellation_method,
|
900
|
+
cancel_at_end_of_period,
|
901
|
+
canceled_at,
|
902
|
+
current_period_started_at,
|
903
|
+
previous_state,
|
904
|
+
signup_payment_id,
|
905
|
+
signup_revenue,
|
906
|
+
delayed_cancel_at,
|
907
|
+
coupon_code,
|
908
|
+
snap_day,
|
909
|
+
payment_collection_method,
|
910
|
+
customer,
|
911
|
+
product,
|
912
|
+
credit_card,
|
913
|
+
group,
|
914
|
+
bank_account,
|
915
|
+
payment_type,
|
916
|
+
referral_code,
|
917
|
+
next_product_id,
|
918
|
+
next_product_handle,
|
919
|
+
coupon_use_count,
|
920
|
+
coupon_uses_allowed,
|
921
|
+
reason_code,
|
922
|
+
automatically_resume_at,
|
923
|
+
coupon_codes,
|
924
|
+
offer_id,
|
925
|
+
payer_id,
|
926
|
+
current_billing_amount_in_cents,
|
927
|
+
product_price_point_id,
|
928
|
+
product_price_point_type,
|
929
|
+
next_product_price_point_id,
|
930
|
+
net_terms,
|
931
|
+
stored_credential_transaction_id,
|
932
|
+
reference,
|
933
|
+
on_hold_at,
|
934
|
+
prepaid_dunning,
|
935
|
+
coupons,
|
936
|
+
dunning_communication_delay_enabled,
|
937
|
+
dunning_communication_delay_time_zone,
|
938
|
+
receives_invoice_emails,
|
939
|
+
locale,
|
940
|
+
currency,
|
941
|
+
scheduled_cancellation_at,
|
942
|
+
credit_balance_in_cents,
|
943
|
+
prepayment_balance_in_cents,
|
944
|
+
prepaid_configuration,
|
945
|
+
self_service_page_token)
|
946
|
+
end
|
947
|
+
|
948
|
+
def to_custom_current_period_ends_at
|
949
|
+
DateTimeHelper.to_rfc3339(current_period_ends_at)
|
950
|
+
end
|
951
|
+
|
952
|
+
def to_custom_next_assessment_at
|
953
|
+
DateTimeHelper.to_rfc3339(next_assessment_at)
|
954
|
+
end
|
955
|
+
|
956
|
+
def to_custom_trial_started_at
|
957
|
+
DateTimeHelper.to_rfc3339(trial_started_at)
|
958
|
+
end
|
959
|
+
|
960
|
+
def to_custom_trial_ended_at
|
961
|
+
DateTimeHelper.to_rfc3339(trial_ended_at)
|
962
|
+
end
|
963
|
+
|
964
|
+
def to_custom_activated_at
|
965
|
+
DateTimeHelper.to_rfc3339(activated_at)
|
966
|
+
end
|
967
|
+
|
968
|
+
def to_custom_expires_at
|
969
|
+
DateTimeHelper.to_rfc3339(expires_at)
|
970
|
+
end
|
971
|
+
|
972
|
+
def to_custom_created_at
|
973
|
+
DateTimeHelper.to_rfc3339(created_at)
|
974
|
+
end
|
975
|
+
|
976
|
+
def to_custom_updated_at
|
977
|
+
DateTimeHelper.to_rfc3339(updated_at)
|
978
|
+
end
|
979
|
+
|
980
|
+
def to_custom_canceled_at
|
981
|
+
DateTimeHelper.to_rfc3339(canceled_at)
|
982
|
+
end
|
983
|
+
|
984
|
+
def to_custom_current_period_started_at
|
985
|
+
DateTimeHelper.to_rfc3339(current_period_started_at)
|
986
|
+
end
|
987
|
+
|
988
|
+
def to_custom_delayed_cancel_at
|
989
|
+
DateTimeHelper.to_rfc3339(delayed_cancel_at)
|
990
|
+
end
|
991
|
+
|
992
|
+
def to_custom_automatically_resume_at
|
993
|
+
DateTimeHelper.to_rfc3339(automatically_resume_at)
|
994
|
+
end
|
995
|
+
|
996
|
+
def to_custom_on_hold_at
|
997
|
+
DateTimeHelper.to_rfc3339(on_hold_at)
|
998
|
+
end
|
999
|
+
|
1000
|
+
def to_custom_scheduled_cancellation_at
|
1001
|
+
DateTimeHelper.to_rfc3339(scheduled_cancellation_at)
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
# Validates an instance of the object from a given value.
|
1005
|
+
# @param [Subscription | Hash] The value against the validation is performed.
|
1006
|
+
def self.validate(value)
|
1007
|
+
return true if value.instance_of? self
|
1008
|
+
|
1009
|
+
return false unless value.instance_of? Hash
|
1010
|
+
|
1011
|
+
true
|
1012
|
+
end
|
1013
|
+
end
|
1014
|
+
end
|