From 52e820da5dcc118c5c93791b5bda406d8bdd4131 Mon Sep 17 00:00:00 2001 From: maxio-sdk Date: Thu, 17 Jul 2025 10:29:52 +0000 Subject: [PATCH] Automated commit message --- README.md | 131 ++++----- .../controllers/base_controller.py | 2 +- .../controllers/coupons_controller.py | 2 +- .../controllers/custom_fields_controller.py | 2 +- .../controllers/insights_controller.py | 2 +- .../controllers/invoices_controller.py | 57 +--- .../payment_profiles_controller.py | 2 + .../product_families_controller.py | 2 +- .../controllers/reason_codes_controller.py | 4 +- ...subscription_invoice_account_controller.py | 69 +++++ .../controllers/subscriptions_controller.py | 48 +--- .../component_allocation_error_exception.py | 2 +- .../component_price_point_error_exception.py | 2 +- .../customer_error_response_exception.py | 2 +- .../error_array_map_response_exception.py | 2 +- .../error_string_map_response_exception.py | 2 +- ..._billing_list_segments_errors_exception.py | 2 +- ..._based_billing_segment_errors_exception.py | 2 +- ...ma_bad_request_error_response_exception.py | 2 +- ...epayment_base_errors_response_exception.py | 2 +- .../single_string_error_response_exception.py | 2 +- ...subscription_add_coupon_error_exception.py | 8 +- ...on_component_allocation_error_exception.py | 2 +- ...n_group_update_error_response_exception.py | 2 +- .../subscription_response_error_exception.py | 2 +- advancedbilling/models/__init__.py | 2 + advancedbilling/models/account_balance.py | 12 +- advancedbilling/models/account_balances.py | 20 +- advancedbilling/models/ach_agreement.py | 16 +- .../models/activate_event_based_component.py | 12 +- .../models/activate_subscription_request.py | 4 +- advancedbilling/models/add_coupons_request.py | 4 +- .../models/add_subscription_to_a_group.py | 4 +- .../models/agreement_acceptance.py | 24 +- advancedbilling/models/allocate_components.py | 32 +-- advancedbilling/models/allocation.py | 100 +++---- .../models/allocation_expiration_date.py | 4 +- advancedbilling/models/allocation_preview.py | 52 ++-- .../models/allocation_preview_item.py | 72 ++--- .../models/allocation_preview_line_item.py | 36 +-- advancedbilling/models/allocation_response.py | 4 +- advancedbilling/models/allocation_settings.py | 12 +- .../models/apple_pay_payment_profile.py | 84 +++--- .../models/applied_credit_note_data.py | 8 +- .../models/apply_credit_note_event_data.py | 20 +- .../models/apply_debit_note_event_data.py | 8 +- .../models/apply_payment_event_data.py | 20 +- advancedbilling/models/auto_resume.py | 4 +- .../models/bank_account_attributes.py | 48 ++-- .../models/bank_account_payment_profile.py | 104 +++++--- .../models/bank_account_verification.py | 8 +- advancedbilling/models/base_refund_error.py | 6 +- advancedbilling/models/base_string_error.py | 4 +- advancedbilling/models/batch_job.py | 20 +- advancedbilling/models/billing_manifest.py | 36 +-- .../models/billing_manifest_item.py | 56 ++-- advancedbilling/models/billing_schedule.py | 4 +- advancedbilling/models/breakouts.py | 16 +- .../bulk_components_price_point_assignment.py | 4 +- ...lk_create_product_price_points_response.py | 4 +- .../models/bulk_create_segments.py | 4 +- .../models/bulk_update_segments.py | 4 +- advancedbilling/models/calendar_billing.py | 8 +- .../cancel_grouped_subscriptions_request.py | 4 +- .../models/cancellation_options.py | 8 +- .../change_invoice_status_event_data.py | 12 +- advancedbilling/models/chargify_ebb.py | 24 +- advancedbilling/models/component.py | 147 ++++++----- .../models/component_allocation_change.py | 4 +- .../models/component_allocation_error_item.py | 16 +- advancedbilling/models/component_cost_data.py | 28 +- .../models/component_cost_data_rate_tier.py | 20 +- .../models/component_currency_price.py | 24 +- .../models/component_custom_price.py | 16 +- advancedbilling/models/component_price.py | 32 +-- .../models/component_price_point.py | 92 +++---- .../component_price_point_assignment.py | 8 +- .../component_price_point_error_item.py | 12 +- .../models/component_price_point_item.py | 24 +- .../models/component_price_points_response.py | 8 +- .../models/consolidated_invoice.py | 4 +- advancedbilling/models/count_response.py | 4 +- advancedbilling/models/coupon.py | 124 ++++----- advancedbilling/models/coupon_currency.py | 16 +- .../models/coupon_currency_response.py | 4 +- advancedbilling/models/coupon_payload.py | 56 ++-- advancedbilling/models/coupon_request.py | 22 +- advancedbilling/models/coupon_response.py | 4 +- advancedbilling/models/coupon_restriction.py | 20 +- advancedbilling/models/coupon_subcodes.py | 4 +- .../models/coupon_subcodes_response.py | 12 +- advancedbilling/models/coupon_usage.py | 28 +- advancedbilling/models/create_allocation.py | 40 +-- .../models/create_component_price_point.py | 20 +- .../models/create_currency_price.py | 12 +- advancedbilling/models/create_customer.py | 64 ++--- advancedbilling/models/create_invoice.py | 40 +-- .../models/create_invoice_address.py | 36 +-- .../models/create_invoice_coupon.py | 24 +- advancedbilling/models/create_invoice_item.py | 48 ++-- .../models/create_invoice_payment.py | 24 +- .../models/create_invoice_payment_request.py | 4 +- advancedbilling/models/create_metadata.py | 8 +- advancedbilling/models/create_metafield.py | 16 +- .../models/create_multi_invoice_payment.py | 16 +- advancedbilling/models/create_offer.py | 16 +- .../models/create_offer_component.py | 12 +- .../models/create_or_update_product.py | 44 ++-- .../models/create_or_update_segment_price.py | 8 +- .../models/create_payment_profile.py | 128 ++++----- ...ate_prepaid_usage_component_price_point.py | 24 +- advancedbilling/models/create_prepayment.py | 4 +- .../models/create_product_family.py | 8 +- .../models/create_product_price_point.py | 40 +-- advancedbilling/models/create_reason_code.py | 4 +- advancedbilling/models/create_segment.py | 20 +- advancedbilling/models/create_subscription.py | 248 ++++++++++-------- .../models/create_subscription_component.py | 28 +- .../models/create_subscription_group.py | 4 +- advancedbilling/models/create_usage.py | 16 +- advancedbilling/models/created_prepayment.py | 28 +- .../models/credit_card_attributes.py | 12 +- .../models/credit_card_payment_profile.py | 108 +++++--- advancedbilling/models/credit_note.py | 108 ++++---- .../models/credit_note_application.py | 20 +- .../models/credit_note_line_item.py | 72 ++--- advancedbilling/models/currency_price.py | 32 +-- advancedbilling/models/customer.py | 120 ++++----- advancedbilling/models/customer_attributes.py | 80 +++--- advancedbilling/models/customer_change.py | 16 +- advancedbilling/models/customer_error.py | 4 +- advancedbilling/models/debit_note.py | 92 +++---- .../models/deduct_service_credit.py | 4 +- .../models/delayed_cancellation_response.py | 4 +- .../delete_subscription_group_response.py | 8 +- advancedbilling/models/dunning_step_data.py | 12 +- advancedbilling/models/ebb_component.py | 40 +-- advancedbilling/models/ebb_event.py | 4 +- .../models/enable_webhooks_response.py | 4 +- advancedbilling/models/endpoint.py | 20 +- advancedbilling/models/endpoint_response.py | 4 +- advancedbilling/models/errors.py | 8 +- .../event_based_billing_segment_error.py | 10 +- .../models/failed_payment_event_data.py | 4 +- .../full_subscription_group_response.py | 48 ++-- .../get_one_time_token_payment_profile.py | 20 +- advancedbilling/models/group_billing.py | 12 +- advancedbilling/models/group_settings.py | 4 +- advancedbilling/models/group_target.py | 4 +- advancedbilling/models/historic_usage.py | 12 +- advancedbilling/models/invoice.py | 224 ++++++++-------- advancedbilling/models/invoice_address.py | 24 +- .../models/invoice_avatax_details.py | 20 +- .../models/invoice_balance_item.py | 12 +- advancedbilling/models/invoice_credit.py | 28 +- .../models/invoice_custom_field.py | 20 +- advancedbilling/models/invoice_customer.py | 28 +- advancedbilling/models/invoice_debit.py | 32 +-- advancedbilling/models/invoice_discount.py | 48 ++-- .../models/invoice_discount_breakout.py | 12 +- .../models/invoice_display_settings.py | 8 +- advancedbilling/models/invoice_line_item.py | 92 +++---- .../invoice_line_item_component_cost_data.py | 4 +- .../models/invoice_line_item_event_data.py | 80 +++--- .../invoice_line_item_pricing_detail.py | 8 +- advancedbilling/models/invoice_payer.py | 24 +- .../models/invoice_payer_change.py | 16 +- advancedbilling/models/invoice_payment.py | 48 ++-- .../models/invoice_payment_application.py | 12 +- .../models/invoice_payment_method.py | 32 +-- advancedbilling/models/invoice_pre_payment.py | 12 +- .../models/invoice_previous_balance.py | 8 +- advancedbilling/models/invoice_refund.py | 36 +-- advancedbilling/models/invoice_seller.py | 16 +- advancedbilling/models/invoice_tax.py | 56 ++-- .../models/invoice_tax_breakout.py | 16 +- .../models/invoice_tax_component_breakout.py | 56 ++-- .../models/issue_advance_invoice_request.py | 4 +- .../models/issue_invoice_request.py | 4 +- .../models/issue_service_credit.py | 4 +- .../models/item_price_point_data.py | 12 +- .../models/list_components_filter.py | 8 +- advancedbilling/models/list_coupons_filter.py | 32 +-- .../models/list_invoice_events_response.py | 16 +- .../models/list_metafields_response.py | 20 +- advancedbilling/models/list_mrr_filter.py | 4 +- .../models/list_mrr_response_result.py | 28 +- .../models/list_offers_response.py | 4 +- .../models/list_prepayments_filter.py | 12 +- .../models/list_price_points_filter.py | 32 +-- .../models/list_products_filter.py | 12 +- .../models/list_proforma_invoices_meta.py | 16 +- .../models/list_proforma_invoices_response.py | 8 +- .../models/list_public_keys_meta.py | 16 +- .../models/list_public_keys_response.py | 8 +- advancedbilling/models/list_sale_rep_item.py | 20 +- .../models/list_segments_filter.py | 16 +- .../models/list_segments_response.py | 4 +- .../models/list_service_credits_response.py | 86 ++++++ .../list_subcription_group_prepayment_item.py | 36 +-- .../list_subscription_components_filter.py | 8 +- ...subscription_components_for_site_filter.py | 12 +- .../models/list_subscription_groups_item.py | 44 ++-- .../models/list_subscription_groups_meta.py | 8 +- .../list_subscription_groups_response.py | 8 +- advancedbilling/models/metadata.py | 24 +- advancedbilling/models/metafield.py | 24 +- advancedbilling/models/metafield_scope.py | 28 +- advancedbilling/models/metered_component.py | 52 ++-- advancedbilling/models/movement.py | 36 +-- advancedbilling/models/movement_line_item.py | 36 +-- advancedbilling/models/mrr.py | 24 +- advancedbilling/models/mrr_movement.py | 16 +- .../models/multi_invoice_payment.py | 16 +- .../models/nested_subscription_group.py | 16 +- advancedbilling/models/net_terms.py | 20 +- advancedbilling/models/offer.py | 76 +++--- advancedbilling/models/offer_discount.py | 12 +- advancedbilling/models/offer_item.py | 40 +-- advancedbilling/models/offer_response.py | 4 +- advancedbilling/models/offer_signup_page.py | 24 +- advancedbilling/models/ok_response.py | 4 +- advancedbilling/models/on_off_component.py | 52 ++-- .../models/organization_address.py | 32 +-- advancedbilling/models/origin_invoice.py | 8 +- advancedbilling/models/overage_pricing.py | 4 +- .../models/override_subscription.py | 24 +- advancedbilling/models/paginated_metadata.py | 20 +- advancedbilling/models/paid_invoice.py | 16 +- advancedbilling/models/pause_request.py | 4 +- advancedbilling/models/payer_attributes.py | 72 ++--- advancedbilling/models/payer_error.py | 12 +- .../models/payment_for_allocation.py | 16 +- .../models/payment_method_credit_card.py | 8 +- .../models/payment_profile_attributes.py | 100 +++---- .../models/paypal_payment_profile.py | 88 ++++--- .../models/portal_management_link.py | 24 +- .../models/prepaid_configuration.py | 20 +- .../models/prepaid_usage_allocation_detail.py | 12 +- .../models/prepaid_usage_component.py | 68 ++--- advancedbilling/models/prepayment.py | 12 +- .../models/prepayments_response.py | 4 +- .../models/preview_allocations_request.py | 12 +- advancedbilling/models/price.py | 4 +- advancedbilling/models/product.py | 148 +++++------ advancedbilling/models/product_family.py | 28 +- .../models/product_family_response.py | 4 +- advancedbilling/models/product_price_point.py | 96 +++---- .../models/product_price_point_errors.py | 24 +- advancedbilling/models/proforma_error.py | 4 +- advancedbilling/models/proforma_invoice.py | 144 +++++----- .../models/proforma_invoice_credit.py | 16 +- .../models/proforma_invoice_discount.py | 32 +-- .../models/proforma_invoice_payment.py | 16 +- .../models/proforma_invoice_tax.py | 28 +- advancedbilling/models/proration.py | 4 +- advancedbilling/models/public_key.py | 12 +- advancedbilling/models/public_signup_page.py | 16 +- .../models/quantity_based_component.py | 64 ++--- .../reactivate_subscription_group_request.py | 8 +- .../reactivate_subscription_group_response.py | 36 +-- .../models/reactivate_subscription_request.py | 24 +- .../models/reactivation_billing.py | 4 +- advancedbilling/models/reason_code.py | 28 +- .../models/record_payment_response.py | 8 +- advancedbilling/models/referral_code.py | 16 +- .../models/referral_validation_response.py | 4 +- .../models/refund_consolidated_invoice.py | 12 +- advancedbilling/models/refund_invoice.py | 12 +- .../models/refund_invoice_event_data.py | 12 +- advancedbilling/models/refund_prepayment.py | 4 +- .../refund_prepayment_base_refund_error.py | 4 +- .../models/remove_payment_event_data.py | 4 +- advancedbilling/models/renewal_preview.py | 36 +-- .../models/renewal_preview_component.py | 12 +- .../models/renewal_preview_line_item.py | 56 ++-- .../models/renewal_preview_request.py | 4 +- .../models/replay_webhooks_response.py | 4 +- advancedbilling/models/resent_invitation.py | 24 +- advancedbilling/models/resume_options.py | 8 +- advancedbilling/models/revoked_invitation.py | 12 +- advancedbilling/models/sale_rep.py | 20 +- advancedbilling/models/sale_rep_item_mrr.py | 12 +- advancedbilling/models/sale_rep_settings.py | 28 +- .../models/sale_rep_subscription.py | 40 +-- advancedbilling/models/segment.py | 48 ++-- advancedbilling/models/segment_price.py | 32 +-- advancedbilling/models/segment_response.py | 4 +- .../models/send_invoice_request.py | 12 +- advancedbilling/models/service_credit.py | 20 +- advancedbilling/models/service_credit_1.py | 155 +++++++++++ .../models/signup_proforma_preview.py | 8 +- advancedbilling/models/site.py | 68 ++--- advancedbilling/models/site_statistics.py | 44 ++-- advancedbilling/models/site_summary.py | 20 +- advancedbilling/models/subscription.py | 248 +++++++++--------- .../models/subscription_component.py | 128 ++++----- ...ription_component_allocation_error_item.py | 8 +- .../models/subscription_component_response.py | 4 +- .../subscription_component_subscription.py | 8 +- .../models/subscription_custom_price.py | 40 +-- advancedbilling/models/subscription_filter.py | 24 +- advancedbilling/models/subscription_group.py | 20 +- .../models/subscription_group_balances.py | 16 +- .../models/subscription_group_bank_account.py | 64 ++--- ...bscription_group_component_custom_price.py | 12 +- .../models/subscription_group_credit_card.py | 136 +++++----- .../models/subscription_group_customer.py | 20 +- .../models/subscription_group_item.py | 40 +-- .../subscription_group_payment_profile.py | 16 +- .../subscription_group_prepayment_response.py | 20 +- .../models/subscription_group_signup.py | 28 +- .../subscription_group_signup_component.py | 20 +- .../models/subscription_group_signup_error.py | 24 +- .../subscription_group_signup_failure_data.py | 32 +-- .../models/subscription_group_signup_item.py | 52 ++-- .../subscription_group_signup_response.py | 44 ++-- .../subscription_group_subscription_error.py | 32 +-- .../models/subscription_group_update_error.py | 4 +- .../models/subscription_included_coupon.py | 28 +- .../models/subscription_migration_preview.py | 16 +- .../subscription_migration_preview_options.py | 40 +-- advancedbilling/models/subscription_mrr.py | 4 +- advancedbilling/models/subscription_note.py | 24 +- .../models/subscription_preview.py | 8 +- .../models/subscription_product_migration.py | 36 +-- .../models/subscription_response.py | 4 +- advancedbilling/models/tax_configuration.py | 12 +- .../update_allocation_expiration_date.py | 4 +- advancedbilling/models/update_component.py | 36 +-- .../models/update_component_price_point.py | 32 +-- .../update_component_price_point_request.py | 4 +- advancedbilling/models/update_customer.py | 80 +++--- advancedbilling/models/update_metadata.py | 12 +- .../models/update_metadata_request.py | 4 +- advancedbilling/models/update_metafield.py | 20 +- .../models/update_metafields_request.py | 4 +- .../models/update_payment_profile.py | 52 ++-- advancedbilling/models/update_price.py | 20 +- .../models/update_product_price_point.py | 8 +- advancedbilling/models/update_reason_code.py | 12 +- advancedbilling/models/update_segment.py | 4 +- advancedbilling/models/update_subscription.py | 131 ++++++--- .../models/update_subscription_component.py | 8 +- .../models/update_subscription_group.py | 4 +- .../models/upsert_prepaid_configuration.py | 16 +- advancedbilling/models/usage.py | 36 +-- advancedbilling/models/webhook.py | 48 ++-- advancedbilling/models/webhook_response.py | 4 +- advancedbilling/utilities/__init__.py | 1 + doc/api-helper.md | 11 + doc/client.md | 22 +- doc/controllers/advance-invoice.md | 3 + doc/controllers/api-exports.md | 21 +- doc/controllers/billing-portal.md | 4 + doc/controllers/component-price-points.md | 22 +- doc/controllers/components.md | 32 ++- doc/controllers/coupons.md | 25 +- doc/controllers/custom-fields.md | 23 +- doc/controllers/customers.md | 10 +- .../events-based-billing-segments.md | 9 +- doc/controllers/events.md | 21 +- doc/controllers/insights.md | 14 +- doc/controllers/invoices.md | 114 ++++---- doc/controllers/offers.md | 7 +- doc/controllers/payment-profiles.md | 20 +- doc/controllers/product-families.md | 8 +- doc/controllers/product-price-points.md | 19 +- doc/controllers/products.md | 10 +- doc/controllers/proforma-invoices.md | 38 +-- doc/controllers/reason-codes.md | 15 +- doc/controllers/referral-codes.md | 1 + doc/controllers/sales-commissions.md | 21 +- doc/controllers/sites.md | 8 +- doc/controllers/subscription-components.md | 26 +- .../subscription-group-invoice-account.md | 8 +- doc/controllers/subscription-group-status.md | 1 + doc/controllers/subscription-groups.md | 12 +- .../subscription-invoice-account.md | 89 ++++++- doc/controllers/subscription-notes.md | 8 +- doc/controllers/subscription-products.md | 2 + doc/controllers/subscription-status.md | 14 +- doc/controllers/subscriptions.md | 68 ++--- doc/controllers/webhooks.md | 10 +- doc/http-date-time.md | 12 + doc/http-request.md | 12 +- doc/http-response.md | 10 +- doc/models/apple-pay-payment-profile.md | 2 + doc/models/bank-account-payment-profile.md | 4 +- doc/models/base-refund-error.md | 2 +- doc/models/chargify-ebb.md | 2 +- doc/models/component.md | 1 + doc/models/coupon-request.md | 4 +- doc/models/create-component-price-point.md | 2 +- doc/models/create-or-update-product.md | 2 +- ...ate-prepaid-usage-component-price-point.md | 2 +- doc/models/create-product-price-point.md | 2 +- doc/models/create-subscription-request.md | 1 + doc/models/create-subscription.md | 12 +- doc/models/credit-card-payment-profile.md | 2 + doc/models/ebb-component.md | 2 +- .../error-array-map-response-exception.md | 2 +- .../event-based-billing-segment-error.md | 2 +- ...-based-billing-segment-errors-exception.md | 2 +- doc/models/group-billing.md | 6 +- doc/models/issue-invoice-request.md | 2 +- doc/models/list-components-filter.md | 2 +- doc/models/list-coupons-filter.md | 2 +- doc/models/list-mrr-filter.md | 2 +- doc/models/list-products-filter.md | 2 +- doc/models/list-service-credits-response.md | 36 +++ .../list-subscription-components-filter.md | 2 +- ...subscription-components-for-site-filter.md | 2 +- doc/models/metered-component.md | 2 +- doc/models/on-off-component.md | 2 +- doc/models/override-subscription.md | 2 +- doc/models/paypal-payment-profile.md | 2 + .../prepaid-product-price-point-filter.md | 2 +- doc/models/prepaid-usage-component.md | 2 +- doc/models/quantity-based-component.md | 2 +- doc/models/reactivation-billing.md | 2 +- doc/models/service-credit-1.md | 32 +++ doc/models/subscription-filter.md | 2 +- doc/models/subscription-group-credit-card.md | 15 +- .../subscription-migration-preview-options.md | 8 +- doc/models/subscription-product-migration.md | 8 +- doc/models/tax-configuration.md | 2 +- doc/models/update-subscription-request.md | 1 + doc/models/update-subscription.md | 4 + doc/rfc3339-date-time.md | 12 + doc/unix-date-time.md | 12 + doc/utility-classes.md | 21 -- pyproject.toml | 19 +- requirements.txt | 4 +- 434 files changed, 5703 insertions(+), 4936 deletions(-) create mode 100644 advancedbilling/models/list_service_credits_response.py create mode 100644 advancedbilling/models/service_credit_1.py create mode 100644 doc/api-helper.md create mode 100644 doc/http-date-time.md create mode 100644 doc/models/list-service-credits-response.md create mode 100644 doc/models/service-credit-1.md create mode 100644 doc/rfc3339-date-time.md create mode 100644 doc/unix-date-time.md delete mode 100644 doc/utility-classes.md diff --git a/README.md b/README.md index 64e8f1fc..8f0a819c 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,21 @@ ## Introduction Maxio Advanced Billing (formerly Chargify) provides an HTTP-based API that conforms to the principles of REST. -One of the many reasons to use Advanced Billing is the immense feature set and surrounding community [client libraries](page:development-tools/client-libraries). -The Maxio API returns JSON responses as the primary and recommended format, but XML is also provided as a backwards compatible option for Merchants who require it. +One of the many reasons to use Advanced Billing is the immense feature set and [client libraries](page:development-tools/client-libraries). +The Maxio API returns JSON responses as the primary and recommended format, but XML is also provided as a backwards compatible option for merchants who require it. ### Steps to make your first Maxio Advanced Billing API call 1. [Sign-up](https://app.chargify.com/signup/maxio-billing-sandbox) or [log-in](https://app.chargify.com/login.html) to your [test site](https://maxio.zendesk.com/hc/en-us/articles/24250712113165-Testing-Overview) account. -2. [Setup and configure authentication](https://maxio.zendesk.com/hc/en-us/articles/24294819360525-API-Keys) credentials. -3. Submit your API request and try it out. -4. Verify results through response. -5. Test our integrations. +2. [Setup authentication](https://maxio.zendesk.com/hc/en-us/articles/24294819360525-API-Keys) credentials. +3. [Submit an API request and verify the response](page:development-tools/client-libraries#make-your-first-maxio-advanced-billing-api-request). +4. Test the Advanced Billing [integrations](https://www.maxio.com/integrations). -We strongly suggest exploring the developer portal, our [integrations](https://www.maxio.com/integrations) and the API guide, as well as the entire set of application-based documentation to aid in your discovery of the product. +Next, you can explore [authentication methods](page:introduction/authentication), [basic concepts](page:introduction/basic-concepts/connected-sites) for interacting with Advanced Billing via the API, and the entire set of [application-based documentation](https://docs.maxio.com/hc/en-us) to aid in your discovery of the product. -#### Example +#### Request Example -The following example uses the curl command-line tool to execute API requests. +The following example uses the curl command-line tool to make an API request. **Request** @@ -31,31 +30,31 @@ The package is compatible with Python versions `3.7+`. Install the package from PyPi using the following pip command: ```bash -pip install maxio-advanced-billing-sdk==6.1.0 +pip install maxio-advanced-billing-sdk==7.0.0 ``` You can also view the package at: -https://pypi.python.org/pypi/maxio-advanced-billing-sdk/6.1.0 +https://pypi.python.org/pypi/maxio-advanced-billing-sdk/7.0.0 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/client.md) The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | -| `site` | `str` | The subdomain for your Advanced Billing site.
*Default*: `'subdomain'` | -| `environment` | `Environment` | The API environment.
**Default: `Environment.US`** | -| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests | -| `override_http_client_configuration` | `bool` | The value which determines to override properties of the passed Http Client from the sdk user | -| `http_call_back` | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint | -| `timeout` | `float` | The value to use for connection timeout.
**Default: 120** | -| `max_retries` | `int` | The number of times to retry an endpoint call if it fails.
**Default: 0** | -| `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try.
**Default: 2** | -| `retry_statuses` | `Array of int` | The http statuses on which retry is to be done.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | -| `retry_methods` | `Array of string` | The http methods on which retry is to be done.
**Default: ['GET', 'PUT']** | -| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication | +| site | `str` | The subdomain for your Advanced Billing site.
*Default*: `'subdomain'` | +| environment | `Environment` | The API environment.
**Default: `Environment.US`** | +| http_client_instance | `HttpClient` | The Http Client passed from the sdk user for making requests | +| override_http_client_configuration | `bool` | The value which determines to override properties of the passed Http Client from the sdk user | +| http_call_back | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint | +| timeout | `float` | The value to use for connection timeout.
**Default: 120** | +| max_retries | `int` | The number of times to retry an endpoint call if it fails.
**Default: 0** | +| backoff_factor | `float` | A backoff factor to apply between attempts after the second try.
**Default: 2** | +| retry_statuses | `Array of int` | The http statuses on which retry is to be done.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | +| retry_methods | `Array of string` | The http methods on which retry is to be done.
**Default: ['GET', 'PUT']** | +| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication | The API client can be initialized as follows: @@ -85,46 +84,54 @@ The SDK can be configured to use a different environment for making API calls. A This API uses the following authentication schemes. -* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/controllers/webhooks.md) - -## Classes Documentation - -* [Utility Classes](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/utility-classes.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/http-response.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-python-sdk/tree/6.1.0/doc/http-request.md) +* [API Exports](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/subscription-products.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/controllers/webhooks.md) + +## SDK Infrastructure + +### HTTP + +* [HttpResponse](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/http-response.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/http-request.md) + +### Utilities + +* [ApiHelper](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/api-helper.md) +* [HttpDateTime](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/http-date-time.md) +* [RFC3339DateTime](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/rfc3339-date-time.md) +* [UnixDateTime](https://www.github.com/maxio-com/ab-python-sdk/tree/7.0.0/doc/unix-date-time.md) diff --git a/advancedbilling/controllers/base_controller.py b/advancedbilling/controllers/base_controller.py index 620251b6..f79f8ac2 100644 --- a/advancedbilling/controllers/base_controller.py +++ b/advancedbilling/controllers/base_controller.py @@ -30,7 +30,7 @@ class BaseController(object): @staticmethod def user_agent(): - return 'AB SDK Python:6.1.0 on OS {os-info}' + return 'AB SDK Python:7.0.0 on OS {os-info}' @staticmethod def user_agent_parameters(): diff --git a/advancedbilling/controllers/coupons_controller.py b/advancedbilling/controllers/coupons_controller.py index c8927e79..6791a8eb 100644 --- a/advancedbilling/controllers/coupons_controller.py +++ b/advancedbilling/controllers/coupons_controller.py @@ -608,7 +608,7 @@ def validate_coupon(self, ResponseHandler() .deserializer(APIHelper.json_deserialize) .deserialize_into(CouponResponse.from_dictionary) - .local_error('404', 'Not Found', SingleStringErrorResponseException) + .local_error_template('404', 'Not Found: \'{$response.body}\'', SingleStringErrorResponseException) ).execute() def create_or_update_coupon_currency_prices(self, diff --git a/advancedbilling/controllers/custom_fields_controller.py b/advancedbilling/controllers/custom_fields_controller.py index 076e411c..3f49f001 100644 --- a/advancedbilling/controllers/custom_fields_controller.py +++ b/advancedbilling/controllers/custom_fields_controller.py @@ -63,7 +63,7 @@ def create_metafields(self, and another 100 for Customer. ### Metafields "On-the-Fly" It is possible to create Metafields “on the fly” when you create your - Metadata – if a non-existant name is passed when creating Metadata, a + Metadata – if a non-existent name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”. ### Metafield Scope Warning diff --git a/advancedbilling/controllers/insights_controller.py b/advancedbilling/controllers/insights_controller.py index aa7b030f..0ab82fa3 100644 --- a/advancedbilling/controllers/insights_controller.py +++ b/advancedbilling/controllers/insights_controller.py @@ -38,7 +38,7 @@ def read_site_stats(self): ## Stats Documentation There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will - reflect the summary of information provided in the Stats reposnse. + reflect the summary of information provided in the Stats response. ``` https://subdomain.chargify.com/dashboard ``` diff --git a/advancedbilling/controllers/invoices_controller.py b/advancedbilling/controllers/invoices_controller.py index e01dd6fa..39126f51 100644 --- a/advancedbilling/controllers/invoices_controller.py +++ b/advancedbilling/controllers/invoices_controller.py @@ -125,6 +125,9 @@ def list_invoices(self, subscription group you want to fetch consolidated invoices for. This will return a paginated list of consolidated invoices for the specified group. + consolidation_level -- str -- The consolidation level of + the invoice. Allowed Values: none, parent, child or + comma-separated lists of thereof, e.g. none,parent. page -- int -- Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to @@ -210,6 +213,9 @@ def list_invoices(self, .query_param(Parameter() .key('subscription_group_uid') .value(options.get('subscription_group_uid', None))) + .query_param(Parameter() + .key('consolidation_level') + .value(options.get('consolidation_level', None))) .query_param(Parameter() .key('page') .value(options.get('page', None))) @@ -446,54 +452,9 @@ def record_payment_for_invoice(self, body=None): """Does a POST request to /invoices/{uid}/payments.json. - This API call should be used when you want to record a payment of a - given type against a specific invoice. If you would like to apply a - payment across multiple invoices, you can use the Bulk Payment - endpoint. - ## Create a Payment from the existing payment profile - In order to apply a payment to an invoice using an existing payment - profile, specify `type` as `payment`, the amount less than the invoice - total, and the customer's `payment_profile_id`. The ID of a payment - profile might be retrieved via the Payment Profiles API endpoint. - ``` - { - "type": "payment", - "payment": { - "amount": 10.00, - "payment_profile_id": 123 - } - } - ``` - ## Create a Payment from the Subscription's Prepayment Account - In order apply a prepayment to an invoice, specify the `type` as - `prepayment`, and also the `amount`. - ``` - { - "type": "prepayment", - "payment": { - "amount": 10.00 - } - } - ``` - Note that the `amount` must be less than or equal to the - Subscription's Prepayment account balance. - ## Create a Payment from the Subscription's Service Credit Account - In order to apply a service credit to an invoice, specify the `type` - as `service_credit`, and also the `amount`: - ``` - { - "type": "service_credit", - "payment": { - "amount": 10.00 - } - } - ``` - Note that Advanced Billing will attempt to fully pay the invoice's - `due_amount` from the Subscription's Service Credit account. At this - time, partial payments from a Service Credit Account are only allowed - for consolidated invoices (subscription groups). Therefore, for normal - invoices the Service Credit account balance must be greater than or - equal to the invoice's `due_amount`. + Applies a payment of a given type against a specific invoice. If you + would like to apply a payment across multiple invoices, you can use + the Bulk Payment endpoint. Args: uid (str): The unique identifier for the invoice, this does not diff --git a/advancedbilling/controllers/payment_profiles_controller.py b/advancedbilling/controllers/payment_profiles_controller.py index e0af7af8..860528d2 100644 --- a/advancedbilling/controllers/payment_profiles_controller.py +++ b/advancedbilling/controllers/payment_profiles_controller.py @@ -477,6 +477,8 @@ def read_payment_profile(self, "id": 10089892, "first_name": "Chester", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", diff --git a/advancedbilling/controllers/product_families_controller.py b/advancedbilling/controllers/product_families_controller.py index 5cf95a12..a4774504 100644 --- a/advancedbilling/controllers/product_families_controller.py +++ b/advancedbilling/controllers/product_families_controller.py @@ -149,7 +149,7 @@ def list_products_for_product_family(self, ResponseHandler() .deserializer(APIHelper.json_deserialize) .deserialize_into(ProductResponse.from_dictionary) - .local_error('404', 'Not Found', APIException) + .local_error_template('404', 'Not Found:\'{$response.body}\'', APIException) ).execute() def create_product_family(self, diff --git a/advancedbilling/controllers/reason_codes_controller.py b/advancedbilling/controllers/reason_codes_controller.py index 84f0f9a1..f1d2c73d 100644 --- a/advancedbilling/controllers/reason_codes_controller.py +++ b/advancedbilling/controllers/reason_codes_controller.py @@ -33,7 +33,7 @@ def create_reason_code(self, # Reason Codes Intro ReasonCodes are a way to gain a high level view of why your customers - are cancelling the subcription to your product or service. + are cancelling the subscription to your product or service. Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. @@ -243,7 +243,7 @@ def delete_reason_code(self, This method gives a merchant the option to delete one reason code from the Churn Reason Codes. This code will be immediately removed. This - action is not reversable. + action is not reversible. Args: reason_code_id (int): The Advanced Billing id of the reason code diff --git a/advancedbilling/controllers/subscription_invoice_account_controller.py b/advancedbilling/controllers/subscription_invoice_account_controller.py index 34441932..2cb811d9 100644 --- a/advancedbilling/controllers/subscription_invoice_account_controller.py +++ b/advancedbilling/controllers/subscription_invoice_account_controller.py @@ -20,8 +20,10 @@ from advancedbilling.models.create_prepayment_response import CreatePrepaymentResponse from advancedbilling.models.prepayments_response import PrepaymentsResponse from advancedbilling.models.service_credit import ServiceCredit +from advancedbilling.models.list_service_credits_response import ListServiceCreditsResponse from advancedbilling.models.prepayment_response import PrepaymentResponse from advancedbilling.exceptions.api_exception import APIException +from advancedbilling.exceptions.error_list_response_exception import ErrorListResponseException from advancedbilling.exceptions.refund_prepayment_base_errors_response_exception import RefundPrepaymentBaseErrorsResponseException @@ -295,6 +297,73 @@ def deduct_service_credit(self, .auth(Single('BasicAuth')) ).execute() + def list_service_credits(self, + subscription_id, + page=1, + per_page=20, + direction=None): + """Does a GET request to /subscriptions/{subscription_id}/service_credits/list.json. + + This request will list a subscription's service credits. + + Args: + subscription_id (int): The Chargify id of the subscription + page (int, optional): Result records are organized in pages. By + default, the first page of results is displayed. The page + parameter specifies a page number of results to fetch. You can + start navigating through the pages to consume the results. You + do this by passing in a page parameter. Retrieve the next page + by adding ?page=2 to the query string. If there are no results + to return, then an empty result set will be returned. Use in + query `page=1`. + per_page (int, optional): This parameter indicates how many + records to fetch in each request. Default value is 20. The + maximum allowed values is 200; any per_page value over 200 + will be changed to 200. Use in query `per_page=200`. + direction (SortingDirection, optional): Controls the order in + which results are returned. Use in query `direction=asc`. + + Returns: + ListServiceCreditsResponse: Response from the API. OK + + Raises: + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. + + """ + + return super().new_api_call_builder.request( + RequestBuilder().server(Server.PRODUCTION) + .path('/subscriptions/{subscription_id}/service_credits/list.json') + .http_method(HttpMethodEnum.GET) + .template_param(Parameter() + .key('subscription_id') + .value(subscription_id) + .is_required(True) + .should_encode(True)) + .query_param(Parameter() + .key('page') + .value(page)) + .query_param(Parameter() + .key('per_page') + .value(per_page)) + .query_param(Parameter() + .key('direction') + .value(direction)) + .header_param(Parameter() + .key('accept') + .value('application/json')) + .auth(Single('BasicAuth')) + ).response( + ResponseHandler() + .deserializer(APIHelper.json_deserialize) + .deserialize_into(ListServiceCreditsResponse.from_dictionary) + .local_error_template('404', 'Not Found:\'{$response.body}\'', APIException) + .local_error_template('422', 'HTTP Response Not OK. Status code: {$statusCode}. Response: \'{$response.body}\'.', ErrorListResponseException) + ).execute() + def refund_prepayment(self, subscription_id, prepayment_id, diff --git a/advancedbilling/controllers/subscriptions_controller.py b/advancedbilling/controllers/subscriptions_controller.py index 42084f88..e2716b64 100644 --- a/advancedbilling/controllers/subscriptions_controller.py +++ b/advancedbilling/controllers/subscriptions_controller.py @@ -225,40 +225,6 @@ def create_subscription(self, } } ``` - ## Subscription with Credit Card - ```json - "subscription": { - "product_handle": "basic", - "customer_attributes": { - "first_name": "Joe", - "last_name": "Blow", - "email": "joe@example.com", - "zip": "02120", - "state": "MA", - "reference": "XYZ", - "phone": "(617) 111 - 0000", - "organization": "Acme", - "country": "US", - "city": "Boston", - "address_2": null, - "address": "123 Mass Ave." - }, - "credit_card_attributes": { - "last_name": "Smith", - "first_name": "Joe", - "full_number": "4111111111111111", - "expiration_year": "2021", - "expiration_month": "1", - "card_type": "visa", - "billing_zip": "02120", - "billing_state": "MA", - "billing_country": "US", - "billing_city": "Boston", - "billing_address_2": null, - "billing_address": "123 Mass Ave." - } - } - ``` ## Subscription with ACH as Payment Profile ```json { @@ -943,6 +909,8 @@ def list_subscriptions(self, applied to the subscription. (This can be found in the URL when editing a coupon. Note that the coupon code cannot be used.) + coupon_code -- str -- The coupon code currently applied to + the subscription date_field -- SubscriptionDateField -- The type of filter you'd like to apply to your search. Allowed Values: , current_period_ends_at, current_period_starts_at, @@ -1019,6 +987,9 @@ def list_subscriptions(self, .query_param(Parameter() .key('coupon') .value(options.get('coupon', None))) + .query_param(Parameter() + .key('coupon_code') + .value(options.get('coupon_code', None))) .query_param(Parameter() .key('date_field') .value(options.get('date_field', None))) @@ -1454,13 +1425,12 @@ def preview_subscription(self, The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for a subscription creation. The "Next Billing" amount and "Next Billing" date are represented in - each Subscriber's Summary. For more information, please see our - documentation + each Subscriber's Summary. + A subscription will not be created by utilizing this endpoint; it is + meant to serve as a prediction. + For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subsc riber-Interface-Overview). - ## Side effects - A subscription will not be created by sending a POST to this endpoint. - It is meant to serve as a prediction. ## Taxable Subscriptions This endpoint will preview taxes applicable to a purchase. In order for taxes to be previewed, the following conditions must be met: diff --git a/advancedbilling/exceptions/component_allocation_error_exception.py b/advancedbilling/exceptions/component_allocation_error_exception.py index ce2c3dc8..9303586d 100644 --- a/advancedbilling/exceptions/component_allocation_error_exception.py +++ b/advancedbilling/exceptions/component_allocation_error_exception.py @@ -46,4 +46,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/component_price_point_error_exception.py b/advancedbilling/exceptions/component_price_point_error_exception.py index b7dea78c..07c004b9 100644 --- a/advancedbilling/exceptions/component_price_point_error_exception.py +++ b/advancedbilling/exceptions/component_price_point_error_exception.py @@ -46,4 +46,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/customer_error_response_exception.py b/advancedbilling/exceptions/customer_error_response_exception.py index f912fc0d..a86904ef 100644 --- a/advancedbilling/exceptions/customer_error_response_exception.py +++ b/advancedbilling/exceptions/customer_error_response_exception.py @@ -42,4 +42,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/error_array_map_response_exception.py b/advancedbilling/exceptions/error_array_map_response_exception.py index 95718fb1..fbdd7319 100644 --- a/advancedbilling/exceptions/error_array_map_response_exception.py +++ b/advancedbilling/exceptions/error_array_map_response_exception.py @@ -41,4 +41,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/error_string_map_response_exception.py b/advancedbilling/exceptions/error_string_map_response_exception.py index 65ec4472..ecdbf417 100644 --- a/advancedbilling/exceptions/error_string_map_response_exception.py +++ b/advancedbilling/exceptions/error_string_map_response_exception.py @@ -41,4 +41,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/event_based_billing_list_segments_errors_exception.py b/advancedbilling/exceptions/event_based_billing_list_segments_errors_exception.py index ca261531..6f641797 100644 --- a/advancedbilling/exceptions/event_based_billing_list_segments_errors_exception.py +++ b/advancedbilling/exceptions/event_based_billing_list_segments_errors_exception.py @@ -42,4 +42,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/event_based_billing_segment_errors_exception.py b/advancedbilling/exceptions/event_based_billing_segment_errors_exception.py index a28da47d..9c3e3970 100644 --- a/advancedbilling/exceptions/event_based_billing_segment_errors_exception.py +++ b/advancedbilling/exceptions/event_based_billing_segment_errors_exception.py @@ -41,4 +41,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/proforma_bad_request_error_response_exception.py b/advancedbilling/exceptions/proforma_bad_request_error_response_exception.py index 5cc84bfa..def1c866 100644 --- a/advancedbilling/exceptions/proforma_bad_request_error_response_exception.py +++ b/advancedbilling/exceptions/proforma_bad_request_error_response_exception.py @@ -42,4 +42,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/refund_prepayment_base_errors_response_exception.py b/advancedbilling/exceptions/refund_prepayment_base_errors_response_exception.py index 2dc2c984..bff054b1 100644 --- a/advancedbilling/exceptions/refund_prepayment_base_errors_response_exception.py +++ b/advancedbilling/exceptions/refund_prepayment_base_errors_response_exception.py @@ -42,4 +42,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/single_string_error_response_exception.py b/advancedbilling/exceptions/single_string_error_response_exception.py index b3229152..8d15e27f 100644 --- a/advancedbilling/exceptions/single_string_error_response_exception.py +++ b/advancedbilling/exceptions/single_string_error_response_exception.py @@ -41,4 +41,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/subscription_add_coupon_error_exception.py b/advancedbilling/exceptions/subscription_add_coupon_error_exception.py index f50b0c1b..41c9fad6 100644 --- a/advancedbilling/exceptions/subscription_add_coupon_error_exception.py +++ b/advancedbilling/exceptions/subscription_add_coupon_error_exception.py @@ -44,7 +44,7 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'codes={self.codes!s}, ' - f'coupon_code={self.coupon_code!s}, ' - f'coupon_codes={self.coupon_codes!s}, ' - f'subscription={self.subscription!s})') + f'codes={(self.codes if hasattr(self, "codes") else None)!s}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!s}, ' + f'coupon_codes={(self.coupon_codes if hasattr(self, "coupon_codes") else None)!s}, ' + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!s})') diff --git a/advancedbilling/exceptions/subscription_component_allocation_error_exception.py b/advancedbilling/exceptions/subscription_component_allocation_error_exception.py index 29cde71e..5d452e0f 100644 --- a/advancedbilling/exceptions/subscription_component_allocation_error_exception.py +++ b/advancedbilling/exceptions/subscription_component_allocation_error_exception.py @@ -46,4 +46,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/subscription_group_update_error_response_exception.py b/advancedbilling/exceptions/subscription_group_update_error_response_exception.py index 5766ddc5..f188c661 100644 --- a/advancedbilling/exceptions/subscription_group_update_error_response_exception.py +++ b/advancedbilling/exceptions/subscription_group_update_error_response_exception.py @@ -42,4 +42,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'errors={self.errors!s})') + f'errors={(self.errors if hasattr(self, "errors") else None)!s})') diff --git a/advancedbilling/exceptions/subscription_response_error_exception.py b/advancedbilling/exceptions/subscription_response_error_exception.py index 8936afea..e571009e 100644 --- a/advancedbilling/exceptions/subscription_response_error_exception.py +++ b/advancedbilling/exceptions/subscription_response_error_exception.py @@ -42,4 +42,4 @@ def __str__(self): base_str = super().__str__() return (f'{self.__class__.__name__}(' f'{base_str[base_str.find("(") + 1:-1]}, ' - f'subscription={self.subscription!s})') + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!s})') diff --git a/advancedbilling/models/__init__.py b/advancedbilling/models/__init__.py index 90c12941..81e1e816 100644 --- a/advancedbilling/models/__init__.py +++ b/advancedbilling/models/__init__.py @@ -264,6 +264,7 @@ 'list_sale_rep_item', 'list_segments_filter', 'list_segments_response', + 'list_service_credits_response', 'list_subcription_group_prepayment_item', 'list_subscription_components_filter', 'list_subscription_components_for_site_filter', @@ -381,6 +382,7 @@ 'send_invoice_request', 'service_credit', 'service_credit_response', + 'service_credit_1', 'signup_proforma_preview', 'signup_proforma_preview_response', 'site', diff --git a/advancedbilling/models/account_balance.py b/advancedbilling/models/account_balance.py index 42c3a99e..a6d0a72f 100644 --- a/advancedbilling/models/account_balance.py +++ b/advancedbilling/models/account_balance.py @@ -92,14 +92,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'balance_in_cents={self.balance_in_cents!r}, ' - f'automatic_balance_in_cents={self.automatic_balance_in_cents!r}, ' - f'remittance_balance_in_cents={self.remittance_balance_in_cents!r}, ' + f'balance_in_cents={(self.balance_in_cents if hasattr(self, "balance_in_cents") else None)!r}, ' + f'automatic_balance_in_cents={(self.automatic_balance_in_cents if hasattr(self, "automatic_balance_in_cents") else None)!r}, ' + f'remittance_balance_in_cents={(self.remittance_balance_in_cents if hasattr(self, "remittance_balance_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'balance_in_cents={self.balance_in_cents!s}, ' - f'automatic_balance_in_cents={self.automatic_balance_in_cents!s}, ' - f'remittance_balance_in_cents={self.remittance_balance_in_cents!s}, ' + f'balance_in_cents={(self.balance_in_cents if hasattr(self, "balance_in_cents") else None)!s}, ' + f'automatic_balance_in_cents={(self.automatic_balance_in_cents if hasattr(self, "automatic_balance_in_cents") else None)!s}, ' + f'remittance_balance_in_cents={(self.remittance_balance_in_cents if hasattr(self, "remittance_balance_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/account_balances.py b/advancedbilling/models/account_balances.py index 31134e54..ee635130 100644 --- a/advancedbilling/models/account_balances.py +++ b/advancedbilling/models/account_balances.py @@ -109,18 +109,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'open_invoices={self.open_invoices!r}, ' - f'pending_invoices={self.pending_invoices!r}, ' - f'pending_discounts={self.pending_discounts!r}, ' - f'service_credits={self.service_credits!r}, ' - f'prepayments={self.prepayments!r}, ' + f'open_invoices={(self.open_invoices if hasattr(self, "open_invoices") else None)!r}, ' + f'pending_invoices={(self.pending_invoices if hasattr(self, "pending_invoices") else None)!r}, ' + f'pending_discounts={(self.pending_discounts if hasattr(self, "pending_discounts") else None)!r}, ' + f'service_credits={(self.service_credits if hasattr(self, "service_credits") else None)!r}, ' + f'prepayments={(self.prepayments if hasattr(self, "prepayments") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'open_invoices={self.open_invoices!s}, ' - f'pending_invoices={self.pending_invoices!s}, ' - f'pending_discounts={self.pending_discounts!s}, ' - f'service_credits={self.service_credits!s}, ' - f'prepayments={self.prepayments!s}, ' + f'open_invoices={(self.open_invoices if hasattr(self, "open_invoices") else None)!s}, ' + f'pending_invoices={(self.pending_invoices if hasattr(self, "pending_invoices") else None)!s}, ' + f'pending_discounts={(self.pending_discounts if hasattr(self, "pending_discounts") else None)!s}, ' + f'service_credits={(self.service_credits if hasattr(self, "service_credits") else None)!s}, ' + f'prepayments={(self.prepayments if hasattr(self, "prepayments") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/ach_agreement.py b/advancedbilling/models/ach_agreement.py index 63814151..5eb6da54 100644 --- a/advancedbilling/models/ach_agreement.py +++ b/advancedbilling/models/ach_agreement.py @@ -124,16 +124,16 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'agreement_terms={self.agreement_terms!r}, ' - f'authorizer_first_name={self.authorizer_first_name!r}, ' - f'authorizer_last_name={self.authorizer_last_name!r}, ' - f'ip_address={self.ip_address!r}, ' + f'agreement_terms={(self.agreement_terms if hasattr(self, "agreement_terms") else None)!r}, ' + f'authorizer_first_name={(self.authorizer_first_name if hasattr(self, "authorizer_first_name") else None)!r}, ' + f'authorizer_last_name={(self.authorizer_last_name if hasattr(self, "authorizer_last_name") else None)!r}, ' + f'ip_address={(self.ip_address if hasattr(self, "ip_address") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'agreement_terms={self.agreement_terms!s}, ' - f'authorizer_first_name={self.authorizer_first_name!s}, ' - f'authorizer_last_name={self.authorizer_last_name!s}, ' - f'ip_address={self.ip_address!s}, ' + f'agreement_terms={(self.agreement_terms if hasattr(self, "agreement_terms") else None)!s}, ' + f'authorizer_first_name={(self.authorizer_first_name if hasattr(self, "authorizer_first_name") else None)!s}, ' + f'authorizer_last_name={(self.authorizer_last_name if hasattr(self, "authorizer_last_name") else None)!s}, ' + f'ip_address={(self.ip_address if hasattr(self, "ip_address") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/activate_event_based_component.py b/advancedbilling/models/activate_event_based_component.py index 2ab30751..ed5b34fe 100644 --- a/advancedbilling/models/activate_event_based_component.py +++ b/advancedbilling/models/activate_event_based_component.py @@ -93,14 +93,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'price_point_id={self.price_point_id!r}, ' - f'billing_schedule={self.billing_schedule!r}, ' - f'custom_price={self.custom_price!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'billing_schedule={(self.billing_schedule if hasattr(self, "billing_schedule") else None)!r}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'price_point_id={self.price_point_id!s}, ' - f'billing_schedule={self.billing_schedule!s}, ' - f'custom_price={self.custom_price!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'billing_schedule={(self.billing_schedule if hasattr(self, "billing_schedule") else None)!s}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/activate_subscription_request.py b/advancedbilling/models/activate_subscription_request.py index 50862e7a..ae2f2606 100644 --- a/advancedbilling/models/activate_subscription_request.py +++ b/advancedbilling/models/activate_subscription_request.py @@ -80,10 +80,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'revert_on_failure={self.revert_on_failure!r}, ' + f'revert_on_failure={(self.revert_on_failure if hasattr(self, "revert_on_failure") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'revert_on_failure={self.revert_on_failure!s}, ' + f'revert_on_failure={(self.revert_on_failure if hasattr(self, "revert_on_failure") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/add_coupons_request.py b/advancedbilling/models/add_coupons_request.py index 59d17e01..4b2cdd99 100644 --- a/advancedbilling/models/add_coupons_request.py +++ b/advancedbilling/models/add_coupons_request.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'codes={self.codes!r}, ' + f'codes={(self.codes if hasattr(self, "codes") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'codes={self.codes!s}, ' + f'codes={(self.codes if hasattr(self, "codes") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/add_subscription_to_a_group.py b/advancedbilling/models/add_subscription_to_a_group.py index 77635e98..4a236e00 100644 --- a/advancedbilling/models/add_subscription_to_a_group.py +++ b/advancedbilling/models/add_subscription_to_a_group.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'group={self.group!r}, ' + f'group={(self.group if hasattr(self, "group") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'group={self.group!s}, ' + f'group={(self.group if hasattr(self, "group") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/agreement_acceptance.py b/advancedbilling/models/agreement_acceptance.py index f178a448..2a7d4fa7 100644 --- a/advancedbilling/models/agreement_acceptance.py +++ b/advancedbilling/models/agreement_acceptance.py @@ -137,20 +137,20 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'ip_address={self.ip_address!r}, ' - f'terms_url={self.terms_url!r}, ' - f'privacy_policy_url={self.privacy_policy_url!r}, ' - f'return_refund_policy_url={self.return_refund_policy_url!r}, ' - f'delivery_policy_url={self.delivery_policy_url!r}, ' - f'secure_checkout_policy_url={self.secure_checkout_policy_url!r}, ' + f'ip_address={(self.ip_address if hasattr(self, "ip_address") else None)!r}, ' + f'terms_url={(self.terms_url if hasattr(self, "terms_url") else None)!r}, ' + f'privacy_policy_url={(self.privacy_policy_url if hasattr(self, "privacy_policy_url") else None)!r}, ' + f'return_refund_policy_url={(self.return_refund_policy_url if hasattr(self, "return_refund_policy_url") else None)!r}, ' + f'delivery_policy_url={(self.delivery_policy_url if hasattr(self, "delivery_policy_url") else None)!r}, ' + f'secure_checkout_policy_url={(self.secure_checkout_policy_url if hasattr(self, "secure_checkout_policy_url") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'ip_address={self.ip_address!s}, ' - f'terms_url={self.terms_url!s}, ' - f'privacy_policy_url={self.privacy_policy_url!s}, ' - f'return_refund_policy_url={self.return_refund_policy_url!s}, ' - f'delivery_policy_url={self.delivery_policy_url!s}, ' - f'secure_checkout_policy_url={self.secure_checkout_policy_url!s}, ' + f'ip_address={(self.ip_address if hasattr(self, "ip_address") else None)!s}, ' + f'terms_url={(self.terms_url if hasattr(self, "terms_url") else None)!s}, ' + f'privacy_policy_url={(self.privacy_policy_url if hasattr(self, "privacy_policy_url") else None)!s}, ' + f'return_refund_policy_url={(self.return_refund_policy_url if hasattr(self, "return_refund_policy_url") else None)!s}, ' + f'delivery_policy_url={(self.delivery_policy_url if hasattr(self, "delivery_policy_url") else None)!s}, ' + f'secure_checkout_policy_url={(self.secure_checkout_policy_url if hasattr(self, "secure_checkout_policy_url") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/allocate_components.py b/advancedbilling/models/allocate_components.py index a5ecaa17..5382d445 100644 --- a/advancedbilling/models/allocate_components.py +++ b/advancedbilling/models/allocate_components.py @@ -148,24 +148,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'proration_upgrade_scheme={self.proration_upgrade_scheme!r}, ' - f'proration_downgrade_scheme={self.proration_downgrade_scheme!r}, ' - f'allocations={self.allocations!r}, ' - f'accrue_charge={self.accrue_charge!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'payment_collection_method={self.payment_collection_method!r}, ' - f'initiate_dunning={self.initiate_dunning!r}, ' + f'proration_upgrade_scheme={(self.proration_upgrade_scheme if hasattr(self, "proration_upgrade_scheme") else None)!r}, ' + f'proration_downgrade_scheme={(self.proration_downgrade_scheme if hasattr(self, "proration_downgrade_scheme") else None)!r}, ' + f'allocations={(self.allocations if hasattr(self, "allocations") else None)!r}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!r}, ' + f'initiate_dunning={(self.initiate_dunning if hasattr(self, "initiate_dunning") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'proration_upgrade_scheme={self.proration_upgrade_scheme!s}, ' - f'proration_downgrade_scheme={self.proration_downgrade_scheme!s}, ' - f'allocations={self.allocations!s}, ' - f'accrue_charge={self.accrue_charge!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'payment_collection_method={self.payment_collection_method!s}, ' - f'initiate_dunning={self.initiate_dunning!s}, ' + f'proration_upgrade_scheme={(self.proration_upgrade_scheme if hasattr(self, "proration_upgrade_scheme") else None)!s}, ' + f'proration_downgrade_scheme={(self.proration_downgrade_scheme if hasattr(self, "proration_downgrade_scheme") else None)!s}, ' + f'allocations={(self.allocations if hasattr(self, "allocations") else None)!s}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!s}, ' + f'initiate_dunning={(self.initiate_dunning if hasattr(self, "initiate_dunning") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/allocation.py b/advancedbilling/models/allocation.py index abcdb8f1..18799bf1 100644 --- a/advancedbilling/models/allocation.py +++ b/advancedbilling/models/allocation.py @@ -306,58 +306,58 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'allocation_id={self.allocation_id!r}, ' - f'component_id={self.component_id!r}, ' - f'component_handle={self.component_handle!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'quantity={self.quantity!r}, ' - f'previous_quantity={self.previous_quantity!r}, ' - f'memo={self.memo!r}, ' - f'timestamp={self.timestamp!r}, ' - f'created_at={self.created_at!r}, ' - f'proration_upgrade_scheme={self.proration_upgrade_scheme!r}, ' - f'proration_downgrade_scheme={self.proration_downgrade_scheme!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'price_point_name={self.price_point_name!r}, ' - f'price_point_handle={self.price_point_handle!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' - f'previous_price_point_id={self.previous_price_point_id!r}, ' - f'accrue_charge={self.accrue_charge!r}, ' - f'initiate_dunning={self.initiate_dunning!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'payment={self.payment!r}, ' - f'expires_at={self.expires_at!r}, ' - f'used_quantity={self.used_quantity!r}, ' - f'charge_id={self.charge_id!r}, ' + f'allocation_id={(self.allocation_id if hasattr(self, "allocation_id") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'previous_quantity={(self.previous_quantity if hasattr(self, "previous_quantity") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'timestamp={(self.timestamp if hasattr(self, "timestamp") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'proration_upgrade_scheme={(self.proration_upgrade_scheme if hasattr(self, "proration_upgrade_scheme") else None)!r}, ' + f'proration_downgrade_scheme={(self.proration_downgrade_scheme if hasattr(self, "proration_downgrade_scheme") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'price_point_name={(self.price_point_name if hasattr(self, "price_point_name") else None)!r}, ' + f'price_point_handle={(self.price_point_handle if hasattr(self, "price_point_handle") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' + f'previous_price_point_id={(self.previous_price_point_id if hasattr(self, "previous_price_point_id") else None)!r}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!r}, ' + f'initiate_dunning={(self.initiate_dunning if hasattr(self, "initiate_dunning") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'payment={(self.payment if hasattr(self, "payment") else None)!r}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!r}, ' + f'used_quantity={(self.used_quantity if hasattr(self, "used_quantity") else None)!r}, ' + f'charge_id={(self.charge_id if hasattr(self, "charge_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'allocation_id={self.allocation_id!s}, ' - f'component_id={self.component_id!s}, ' - f'component_handle={self.component_handle!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'quantity={self.quantity!s}, ' - f'previous_quantity={self.previous_quantity!s}, ' - f'memo={self.memo!s}, ' - f'timestamp={self.timestamp!s}, ' - f'created_at={self.created_at!s}, ' - f'proration_upgrade_scheme={self.proration_upgrade_scheme!s}, ' - f'proration_downgrade_scheme={self.proration_downgrade_scheme!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'price_point_name={self.price_point_name!s}, ' - f'price_point_handle={self.price_point_handle!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' - f'previous_price_point_id={self.previous_price_point_id!s}, ' - f'accrue_charge={self.accrue_charge!s}, ' - f'initiate_dunning={self.initiate_dunning!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'payment={self.payment!s}, ' - f'expires_at={self.expires_at!s}, ' - f'used_quantity={self.used_quantity!s}, ' - f'charge_id={self.charge_id!s}, ' + f'allocation_id={(self.allocation_id if hasattr(self, "allocation_id") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'previous_quantity={(self.previous_quantity if hasattr(self, "previous_quantity") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'timestamp={(self.timestamp if hasattr(self, "timestamp") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'proration_upgrade_scheme={(self.proration_upgrade_scheme if hasattr(self, "proration_upgrade_scheme") else None)!s}, ' + f'proration_downgrade_scheme={(self.proration_downgrade_scheme if hasattr(self, "proration_downgrade_scheme") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'price_point_name={(self.price_point_name if hasattr(self, "price_point_name") else None)!s}, ' + f'price_point_handle={(self.price_point_handle if hasattr(self, "price_point_handle") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' + f'previous_price_point_id={(self.previous_price_point_id if hasattr(self, "previous_price_point_id") else None)!s}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!s}, ' + f'initiate_dunning={(self.initiate_dunning if hasattr(self, "initiate_dunning") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'payment={(self.payment if hasattr(self, "payment") else None)!s}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!s}, ' + f'used_quantity={(self.used_quantity if hasattr(self, "used_quantity") else None)!s}, ' + f'charge_id={(self.charge_id if hasattr(self, "charge_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/allocation_expiration_date.py b/advancedbilling/models/allocation_expiration_date.py index d0a5825b..2fae784a 100644 --- a/advancedbilling/models/allocation_expiration_date.py +++ b/advancedbilling/models/allocation_expiration_date.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'expires_at={self.expires_at!r}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'expires_at={self.expires_at!s}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/allocation_preview.py b/advancedbilling/models/allocation_preview.py index eea5cc4b..9dd73d29 100644 --- a/advancedbilling/models/allocation_preview.py +++ b/advancedbilling/models/allocation_preview.py @@ -181,34 +181,34 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'start_date={self.start_date!r}, ' - f'end_date={self.end_date!r}, ' - f'subtotal_in_cents={self.subtotal_in_cents!r}, ' - f'total_tax_in_cents={self.total_tax_in_cents!r}, ' - f'total_discount_in_cents={self.total_discount_in_cents!r}, ' - f'total_in_cents={self.total_in_cents!r}, ' - f'direction={self.direction!r}, ' - f'proration_scheme={self.proration_scheme!r}, ' - f'line_items={self.line_items!r}, ' - f'accrue_charge={self.accrue_charge!r}, ' - f'allocations={self.allocations!r}, ' - f'period_type={self.period_type!r}, ' - f'existing_balance_in_cents={self.existing_balance_in_cents!r}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!r}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!r}, ' + f'subtotal_in_cents={(self.subtotal_in_cents if hasattr(self, "subtotal_in_cents") else None)!r}, ' + f'total_tax_in_cents={(self.total_tax_in_cents if hasattr(self, "total_tax_in_cents") else None)!r}, ' + f'total_discount_in_cents={(self.total_discount_in_cents if hasattr(self, "total_discount_in_cents") else None)!r}, ' + f'total_in_cents={(self.total_in_cents if hasattr(self, "total_in_cents") else None)!r}, ' + f'direction={(self.direction if hasattr(self, "direction") else None)!r}, ' + f'proration_scheme={(self.proration_scheme if hasattr(self, "proration_scheme") else None)!r}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!r}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!r}, ' + f'allocations={(self.allocations if hasattr(self, "allocations") else None)!r}, ' + f'period_type={(self.period_type if hasattr(self, "period_type") else None)!r}, ' + f'existing_balance_in_cents={(self.existing_balance_in_cents if hasattr(self, "existing_balance_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'start_date={self.start_date!s}, ' - f'end_date={self.end_date!s}, ' - f'subtotal_in_cents={self.subtotal_in_cents!s}, ' - f'total_tax_in_cents={self.total_tax_in_cents!s}, ' - f'total_discount_in_cents={self.total_discount_in_cents!s}, ' - f'total_in_cents={self.total_in_cents!s}, ' - f'direction={self.direction!s}, ' - f'proration_scheme={self.proration_scheme!s}, ' - f'line_items={self.line_items!s}, ' - f'accrue_charge={self.accrue_charge!s}, ' - f'allocations={self.allocations!s}, ' - f'period_type={self.period_type!s}, ' - f'existing_balance_in_cents={self.existing_balance_in_cents!s}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!s}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!s}, ' + f'subtotal_in_cents={(self.subtotal_in_cents if hasattr(self, "subtotal_in_cents") else None)!s}, ' + f'total_tax_in_cents={(self.total_tax_in_cents if hasattr(self, "total_tax_in_cents") else None)!s}, ' + f'total_discount_in_cents={(self.total_discount_in_cents if hasattr(self, "total_discount_in_cents") else None)!s}, ' + f'total_in_cents={(self.total_in_cents if hasattr(self, "total_in_cents") else None)!s}, ' + f'direction={(self.direction if hasattr(self, "direction") else None)!s}, ' + f'proration_scheme={(self.proration_scheme if hasattr(self, "proration_scheme") else None)!s}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!s}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!s}, ' + f'allocations={(self.allocations if hasattr(self, "allocations") else None)!s}, ' + f'period_type={(self.period_type if hasattr(self, "period_type") else None)!s}, ' + f'existing_balance_in_cents={(self.existing_balance_in_cents if hasattr(self, "existing_balance_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/allocation_preview_item.py b/advancedbilling/models/allocation_preview_item.py index b6b74097..77b0a8cd 100644 --- a/advancedbilling/models/allocation_preview_item.py +++ b/advancedbilling/models/allocation_preview_item.py @@ -230,44 +230,44 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'quantity={self.quantity!r}, ' - f'previous_quantity={self.previous_quantity!r}, ' - f'memo={self.memo!r}, ' - f'timestamp={self.timestamp!r}, ' - f'proration_upgrade_scheme={self.proration_upgrade_scheme!r}, ' - f'proration_downgrade_scheme={self.proration_downgrade_scheme!r}, ' - f'accrue_charge={self.accrue_charge!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' - f'previous_price_point_id={self.previous_price_point_id!r}, ' - f'price_point_handle={self.price_point_handle!r}, ' - f'price_point_name={self.price_point_name!r}, ' - f'component_handle={self.component_handle!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'previous_quantity={(self.previous_quantity if hasattr(self, "previous_quantity") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'timestamp={(self.timestamp if hasattr(self, "timestamp") else None)!r}, ' + f'proration_upgrade_scheme={(self.proration_upgrade_scheme if hasattr(self, "proration_upgrade_scheme") else None)!r}, ' + f'proration_downgrade_scheme={(self.proration_downgrade_scheme if hasattr(self, "proration_downgrade_scheme") else None)!r}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' + f'previous_price_point_id={(self.previous_price_point_id if hasattr(self, "previous_price_point_id") else None)!r}, ' + f'price_point_handle={(self.price_point_handle if hasattr(self, "price_point_handle") else None)!r}, ' + f'price_point_name={(self.price_point_name if hasattr(self, "price_point_name") else None)!r}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'quantity={self.quantity!s}, ' - f'previous_quantity={self.previous_quantity!s}, ' - f'memo={self.memo!s}, ' - f'timestamp={self.timestamp!s}, ' - f'proration_upgrade_scheme={self.proration_upgrade_scheme!s}, ' - f'proration_downgrade_scheme={self.proration_downgrade_scheme!s}, ' - f'accrue_charge={self.accrue_charge!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' - f'previous_price_point_id={self.previous_price_point_id!s}, ' - f'price_point_handle={self.price_point_handle!s}, ' - f'price_point_name={self.price_point_name!s}, ' - f'component_handle={self.component_handle!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'previous_quantity={(self.previous_quantity if hasattr(self, "previous_quantity") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'timestamp={(self.timestamp if hasattr(self, "timestamp") else None)!s}, ' + f'proration_upgrade_scheme={(self.proration_upgrade_scheme if hasattr(self, "proration_upgrade_scheme") else None)!s}, ' + f'proration_downgrade_scheme={(self.proration_downgrade_scheme if hasattr(self, "proration_downgrade_scheme") else None)!s}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' + f'previous_price_point_id={(self.previous_price_point_id if hasattr(self, "previous_price_point_id") else None)!s}, ' + f'price_point_handle={(self.price_point_handle if hasattr(self, "price_point_handle") else None)!s}, ' + f'price_point_name={(self.price_point_name if hasattr(self, "price_point_name") else None)!s}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/allocation_preview_line_item.py b/advancedbilling/models/allocation_preview_line_item.py index dff6202e..5651cb75 100644 --- a/advancedbilling/models/allocation_preview_line_item.py +++ b/advancedbilling/models/allocation_preview_line_item.py @@ -138,26 +138,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'transaction_type={self.transaction_type!r}, ' - f'kind={self.kind!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'memo={self.memo!r}, ' - f'discount_amount_in_cents={self.discount_amount_in_cents!r}, ' - f'taxable_amount_in_cents={self.taxable_amount_in_cents!r}, ' - f'component_id={self.component_id!r}, ' - f'component_handle={self.component_handle!r}, ' - f'direction={self.direction!r}, ' + f'transaction_type={(self.transaction_type if hasattr(self, "transaction_type") else None)!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'discount_amount_in_cents={(self.discount_amount_in_cents if hasattr(self, "discount_amount_in_cents") else None)!r}, ' + f'taxable_amount_in_cents={(self.taxable_amount_in_cents if hasattr(self, "taxable_amount_in_cents") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!r}, ' + f'direction={(self.direction if hasattr(self, "direction") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'transaction_type={self.transaction_type!s}, ' - f'kind={self.kind!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'memo={self.memo!s}, ' - f'discount_amount_in_cents={self.discount_amount_in_cents!s}, ' - f'taxable_amount_in_cents={self.taxable_amount_in_cents!s}, ' - f'component_id={self.component_id!s}, ' - f'component_handle={self.component_handle!s}, ' - f'direction={self.direction!s}, ' + f'transaction_type={(self.transaction_type if hasattr(self, "transaction_type") else None)!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'discount_amount_in_cents={(self.discount_amount_in_cents if hasattr(self, "discount_amount_in_cents") else None)!s}, ' + f'taxable_amount_in_cents={(self.taxable_amount_in_cents if hasattr(self, "taxable_amount_in_cents") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!s}, ' + f'direction={(self.direction if hasattr(self, "direction") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/allocation_response.py b/advancedbilling/models/allocation_response.py index 20d65056..ed1718b8 100644 --- a/advancedbilling/models/allocation_response.py +++ b/advancedbilling/models/allocation_response.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'allocation={self.allocation!r}, ' + f'allocation={(self.allocation if hasattr(self, "allocation") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'allocation={self.allocation!s}, ' + f'allocation={(self.allocation if hasattr(self, "allocation") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/allocation_settings.py b/advancedbilling/models/allocation_settings.py index fb632d3f..1cc6e61f 100644 --- a/advancedbilling/models/allocation_settings.py +++ b/advancedbilling/models/allocation_settings.py @@ -98,14 +98,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'accrue_charge={self.accrue_charge!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'accrue_charge={self.accrue_charge!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/apple_pay_payment_profile.py b/advancedbilling/models/apple_pay_payment_profile.py index 08b7711a..8321968d 100644 --- a/advancedbilling/models/apple_pay_payment_profile.py +++ b/advancedbilling/models/apple_pay_payment_profile.py @@ -40,6 +40,10 @@ class ApplePayPaymentProfile(object): payment_type (PaymentType): The model property of type PaymentType. site_gateway_setting_id (int): The model property of type int. gateway_handle (str): The model property of type str. + created_at (datetime): A timestamp indicating when this payment + profile was created + updated_at (datetime): A timestamp indicating when this payment + profile was last updated additional_properties (Dict[str, object]): The additional properties for the model. @@ -62,7 +66,9 @@ class ApplePayPaymentProfile(object): "customer_vault_token": 'customer_vault_token', "billing_address_2": 'billing_address_2', "site_gateway_setting_id": 'site_gateway_setting_id', - "gateway_handle": 'gateway_handle' + "gateway_handle": 'gateway_handle', + "created_at": 'created_at', + "updated_at": 'updated_at' } _optionals = [ @@ -81,6 +87,8 @@ class ApplePayPaymentProfile(object): 'billing_address_2', 'site_gateway_setting_id', 'gateway_handle', + 'created_at', + 'updated_at', ] _nullables = [ @@ -112,6 +120,8 @@ def __init__(self, billing_address_2=APIHelper.SKIP, site_gateway_setting_id=APIHelper.SKIP, gateway_handle=APIHelper.SKIP, + created_at=APIHelper.SKIP, + updated_at=APIHelper.SKIP, additional_properties=None): """Constructor for the ApplePayPaymentProfile class""" @@ -147,6 +157,10 @@ def __init__(self, self.site_gateway_setting_id = site_gateway_setting_id if gateway_handle is not APIHelper.SKIP: self.gateway_handle = gateway_handle + if created_at is not APIHelper.SKIP: + self.created_at = APIHelper.apply_datetime_converter(created_at, APIHelper.RFC3339DateTime) if created_at else None + if updated_at is not APIHelper.SKIP: + self.updated_at = APIHelper.apply_datetime_converter(updated_at, APIHelper.RFC3339DateTime) if updated_at else None # Add additional model properties to the instance if additional_properties is None: @@ -188,6 +202,8 @@ def from_dictionary(cls, billing_address_2 = dictionary.get("billing_address_2") if "billing_address_2" in dictionary.keys() else APIHelper.SKIP site_gateway_setting_id = dictionary.get("site_gateway_setting_id") if "site_gateway_setting_id" in dictionary.keys() else APIHelper.SKIP gateway_handle = dictionary.get("gateway_handle") if "gateway_handle" in dictionary.keys() else APIHelper.SKIP + created_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("created_at")).datetime if dictionary.get("created_at") else APIHelper.SKIP + updated_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("updated_at")).datetime if dictionary.get("updated_at") else APIHelper.SKIP # Clean out expected properties from dictionary additional_properties = {k: v for k, v in dictionary.items() if k not in cls._names.values()} # Return an object of this model @@ -207,6 +223,8 @@ def from_dictionary(cls, billing_address_2, site_gateway_setting_id, gateway_handle, + created_at, + updated_at, additional_properties) @classmethod @@ -235,40 +253,44 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'customer_id={self.customer_id!r}, ' - f'current_vault={self.current_vault!r}, ' - f'vault_token={self.vault_token!r}, ' - f'billing_address={self.billing_address!r}, ' - f'billing_city={self.billing_city!r}, ' - f'billing_state={self.billing_state!r}, ' - f'billing_zip={self.billing_zip!r}, ' - f'billing_country={self.billing_country!r}, ' - f'customer_vault_token={self.customer_vault_token!r}, ' - f'billing_address_2={self.billing_address_2!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!r}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!r}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!r}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!r}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!r}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!r}, ' f'payment_type={self.payment_type!r}, ' - f'site_gateway_setting_id={self.site_gateway_setting_id!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' + f'site_gateway_setting_id={(self.site_gateway_setting_id if hasattr(self, "site_gateway_setting_id") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'customer_id={self.customer_id!s}, ' - f'current_vault={self.current_vault!s}, ' - f'vault_token={self.vault_token!s}, ' - f'billing_address={self.billing_address!s}, ' - f'billing_city={self.billing_city!s}, ' - f'billing_state={self.billing_state!s}, ' - f'billing_zip={self.billing_zip!s}, ' - f'billing_country={self.billing_country!s}, ' - f'customer_vault_token={self.customer_vault_token!s}, ' - f'billing_address_2={self.billing_address_2!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!s}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!s}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!s}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!s}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!s}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!s}, ' f'payment_type={self.payment_type!s}, ' - f'site_gateway_setting_id={self.site_gateway_setting_id!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' + f'site_gateway_setting_id={(self.site_gateway_setting_id if hasattr(self, "site_gateway_setting_id") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/applied_credit_note_data.py b/advancedbilling/models/applied_credit_note_data.py index cc3eda55..17883900 100644 --- a/advancedbilling/models/applied_credit_note_data.py +++ b/advancedbilling/models/applied_credit_note_data.py @@ -101,12 +101,12 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'number={self.number!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'number={(self.number if hasattr(self, "number") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'number={self.number!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'number={(self.number if hasattr(self, "number") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/apply_credit_note_event_data.py b/advancedbilling/models/apply_credit_note_event_data.py index 3b3720f1..81e4c2e2 100644 --- a/advancedbilling/models/apply_credit_note_event_data.py +++ b/advancedbilling/models/apply_credit_note_event_data.py @@ -197,11 +197,11 @@ def __repr__(self): f'credit_note_uid={self.credit_note_uid!r}, ' f'original_amount={self.original_amount!r}, ' f'applied_amount={self.applied_amount!r}, ' - f'transaction_time={self.transaction_time!r}, ' - f'memo={self.memo!r}, ' - f'role={self.role!r}, ' - f'consolidated_invoice={self.consolidated_invoice!r}, ' - f'applied_credit_notes={self.applied_credit_notes!r}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'role={(self.role if hasattr(self, "role") else None)!r}, ' + f'consolidated_invoice={(self.consolidated_invoice if hasattr(self, "consolidated_invoice") else None)!r}, ' + f'applied_credit_notes={(self.applied_credit_notes if hasattr(self, "applied_credit_notes") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): @@ -211,9 +211,9 @@ def __str__(self): f'credit_note_uid={self.credit_note_uid!s}, ' f'original_amount={self.original_amount!s}, ' f'applied_amount={self.applied_amount!s}, ' - f'transaction_time={self.transaction_time!s}, ' - f'memo={self.memo!s}, ' - f'role={self.role!s}, ' - f'consolidated_invoice={self.consolidated_invoice!s}, ' - f'applied_credit_notes={self.applied_credit_notes!s}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'role={(self.role if hasattr(self, "role") else None)!s}, ' + f'consolidated_invoice={(self.consolidated_invoice if hasattr(self, "consolidated_invoice") else None)!s}, ' + f'applied_credit_notes={(self.applied_credit_notes if hasattr(self, "applied_credit_notes") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/apply_debit_note_event_data.py b/advancedbilling/models/apply_debit_note_event_data.py index ac915562..aa390cda 100644 --- a/advancedbilling/models/apply_debit_note_event_data.py +++ b/advancedbilling/models/apply_debit_note_event_data.py @@ -157,8 +157,8 @@ def __repr__(self): f'debit_note_uid={self.debit_note_uid!r}, ' f'original_amount={self.original_amount!r}, ' f'applied_amount={self.applied_amount!r}, ' - f'memo={self.memo!r}, ' - f'transaction_time={self.transaction_time!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): @@ -167,6 +167,6 @@ def __str__(self): f'debit_note_uid={self.debit_note_uid!s}, ' f'original_amount={self.original_amount!s}, ' f'applied_amount={self.applied_amount!s}, ' - f'memo={self.memo!s}, ' - f'transaction_time={self.transaction_time!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/apply_payment_event_data.py b/advancedbilling/models/apply_payment_event_data.py index 1d3ccc9c..cb96eefe 100644 --- a/advancedbilling/models/apply_payment_event_data.py +++ b/advancedbilling/models/apply_payment_event_data.py @@ -212,11 +212,11 @@ def __repr__(self): f'applied_amount={self.applied_amount!r}, ' f'transaction_time={self.transaction_time!r}, ' f'payment_method={self.payment_method!r}, ' - f'transaction_id={self.transaction_id!r}, ' - f'parent_invoice_number={self.parent_invoice_number!r}, ' - f'remaining_prepayment_amount={self.remaining_prepayment_amount!r}, ' - f'prepayment={self.prepayment!r}, ' - f'external={self.external!r}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!r}, ' + f'parent_invoice_number={(self.parent_invoice_number if hasattr(self, "parent_invoice_number") else None)!r}, ' + f'remaining_prepayment_amount={(self.remaining_prepayment_amount if hasattr(self, "remaining_prepayment_amount") else None)!r}, ' + f'prepayment={(self.prepayment if hasattr(self, "prepayment") else None)!r}, ' + f'external={(self.external if hasattr(self, "external") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): @@ -227,9 +227,9 @@ def __str__(self): f'applied_amount={self.applied_amount!s}, ' f'transaction_time={self.transaction_time!s}, ' f'payment_method={self.payment_method!s}, ' - f'transaction_id={self.transaction_id!s}, ' - f'parent_invoice_number={self.parent_invoice_number!s}, ' - f'remaining_prepayment_amount={self.remaining_prepayment_amount!s}, ' - f'prepayment={self.prepayment!s}, ' - f'external={self.external!s}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!s}, ' + f'parent_invoice_number={(self.parent_invoice_number if hasattr(self, "parent_invoice_number") else None)!s}, ' + f'remaining_prepayment_amount={(self.remaining_prepayment_amount if hasattr(self, "remaining_prepayment_amount") else None)!s}, ' + f'prepayment={(self.prepayment if hasattr(self, "prepayment") else None)!s}, ' + f'external={(self.external if hasattr(self, "external") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/auto_resume.py b/advancedbilling/models/auto_resume.py index c13e8eaa..e8822aa5 100644 --- a/advancedbilling/models/auto_resume.py +++ b/advancedbilling/models/auto_resume.py @@ -79,10 +79,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'automatically_resume_at={self.automatically_resume_at!r}, ' + f'automatically_resume_at={(self.automatically_resume_at if hasattr(self, "automatically_resume_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'automatically_resume_at={self.automatically_resume_at!s}, ' + f'automatically_resume_at={(self.automatically_resume_at if hasattr(self, "automatically_resume_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/bank_account_attributes.py b/advancedbilling/models/bank_account_attributes.py index 5cfa8ec2..15fbddc3 100644 --- a/advancedbilling/models/bank_account_attributes.py +++ b/advancedbilling/models/bank_account_attributes.py @@ -194,32 +194,32 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'chargify_token={self.chargify_token!r}, ' - f'bank_name={self.bank_name!r}, ' - f'bank_routing_number={self.bank_routing_number!r}, ' - f'bank_account_number={self.bank_account_number!r}, ' - f'bank_account_type={self.bank_account_type!r}, ' - f'bank_branch_code={self.bank_branch_code!r}, ' - f'bank_iban={self.bank_iban!r}, ' - f'bank_account_holder_type={self.bank_account_holder_type!r}, ' - f'payment_type={self.payment_type!r}, ' - f'current_vault={self.current_vault!r}, ' - f'vault_token={self.vault_token!r}, ' - f'customer_vault_token={self.customer_vault_token!r}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!r}, ' + f'bank_name={(self.bank_name if hasattr(self, "bank_name") else None)!r}, ' + f'bank_routing_number={(self.bank_routing_number if hasattr(self, "bank_routing_number") else None)!r}, ' + f'bank_account_number={(self.bank_account_number if hasattr(self, "bank_account_number") else None)!r}, ' + f'bank_account_type={(self.bank_account_type if hasattr(self, "bank_account_type") else None)!r}, ' + f'bank_branch_code={(self.bank_branch_code if hasattr(self, "bank_branch_code") else None)!r}, ' + f'bank_iban={(self.bank_iban if hasattr(self, "bank_iban") else None)!r}, ' + f'bank_account_holder_type={(self.bank_account_holder_type if hasattr(self, "bank_account_holder_type") else None)!r}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!r}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'chargify_token={self.chargify_token!s}, ' - f'bank_name={self.bank_name!s}, ' - f'bank_routing_number={self.bank_routing_number!s}, ' - f'bank_account_number={self.bank_account_number!s}, ' - f'bank_account_type={self.bank_account_type!s}, ' - f'bank_branch_code={self.bank_branch_code!s}, ' - f'bank_iban={self.bank_iban!s}, ' - f'bank_account_holder_type={self.bank_account_holder_type!s}, ' - f'payment_type={self.payment_type!s}, ' - f'current_vault={self.current_vault!s}, ' - f'vault_token={self.vault_token!s}, ' - f'customer_vault_token={self.customer_vault_token!s}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!s}, ' + f'bank_name={(self.bank_name if hasattr(self, "bank_name") else None)!s}, ' + f'bank_routing_number={(self.bank_routing_number if hasattr(self, "bank_routing_number") else None)!s}, ' + f'bank_account_number={(self.bank_account_number if hasattr(self, "bank_account_number") else None)!s}, ' + f'bank_account_type={(self.bank_account_type if hasattr(self, "bank_account_type") else None)!s}, ' + f'bank_branch_code={(self.bank_branch_code if hasattr(self, "bank_branch_code") else None)!s}, ' + f'bank_iban={(self.bank_iban if hasattr(self, "bank_iban") else None)!s}, ' + f'bank_account_holder_type={(self.bank_account_holder_type if hasattr(self, "bank_account_holder_type") else None)!s}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!s}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/bank_account_payment_profile.py b/advancedbilling/models/bank_account_payment_profile.py index c12c972a..6d67c4b8 100644 --- a/advancedbilling/models/bank_account_payment_profile.py +++ b/advancedbilling/models/bank_account_payment_profile.py @@ -56,6 +56,10 @@ class BankAccountPaymentProfile(object): providing the amounts of two small deposits made into the account site_gateway_setting_id (int): The model property of type int. gateway_handle (str): The model property of type str. + created_at (datetime): A timestamp indicating when this payment + profile was created + updated_at (datetime): A timestamp indicating when this payment + profile was last updated additional_properties (Dict[str, object]): The additional properties for the model. @@ -84,7 +88,9 @@ class BankAccountPaymentProfile(object): "bank_account_holder_type": 'bank_account_holder_type', "verified": 'verified', "site_gateway_setting_id": 'site_gateway_setting_id', - "gateway_handle": 'gateway_handle' + "gateway_handle": 'gateway_handle', + "created_at": 'created_at', + "updated_at": 'updated_at' } _optionals = [ @@ -108,6 +114,8 @@ class BankAccountPaymentProfile(object): 'verified', 'site_gateway_setting_id', 'gateway_handle', + 'created_at', + 'updated_at', ] _nullables = [ @@ -145,6 +153,8 @@ def __init__(self, verified=False, site_gateway_setting_id=APIHelper.SKIP, gateway_handle=APIHelper.SKIP, + created_at=APIHelper.SKIP, + updated_at=APIHelper.SKIP, additional_properties=None): """Constructor for the BankAccountPaymentProfile class""" @@ -190,6 +200,10 @@ def __init__(self, self.site_gateway_setting_id = site_gateway_setting_id if gateway_handle is not APIHelper.SKIP: self.gateway_handle = gateway_handle + if created_at is not APIHelper.SKIP: + self.created_at = APIHelper.apply_datetime_converter(created_at, APIHelper.RFC3339DateTime) if created_at else None + if updated_at is not APIHelper.SKIP: + self.updated_at = APIHelper.apply_datetime_converter(updated_at, APIHelper.RFC3339DateTime) if updated_at else None # Add additional model properties to the instance if additional_properties is None: @@ -237,6 +251,8 @@ def from_dictionary(cls, verified = dictionary.get("verified") if dictionary.get("verified") else False site_gateway_setting_id = dictionary.get("site_gateway_setting_id") if "site_gateway_setting_id" in dictionary.keys() else APIHelper.SKIP gateway_handle = dictionary.get("gateway_handle") if "gateway_handle" in dictionary.keys() else APIHelper.SKIP + created_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("created_at")).datetime if dictionary.get("created_at") else APIHelper.SKIP + updated_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("updated_at")).datetime if dictionary.get("updated_at") else APIHelper.SKIP # Clean out expected properties from dictionary additional_properties = {k: v for k, v in dictionary.items() if k not in cls._names.values()} # Return an object of this model @@ -262,6 +278,8 @@ def from_dictionary(cls, verified, site_gateway_setting_id, gateway_handle, + created_at, + updated_at, additional_properties) @classmethod @@ -294,52 +312,56 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'customer_id={self.customer_id!r}, ' - f'current_vault={self.current_vault!r}, ' - f'vault_token={self.vault_token!r}, ' - f'billing_address={self.billing_address!r}, ' - f'billing_city={self.billing_city!r}, ' - f'billing_state={self.billing_state!r}, ' - f'billing_zip={self.billing_zip!r}, ' - f'billing_country={self.billing_country!r}, ' - f'customer_vault_token={self.customer_vault_token!r}, ' - f'billing_address_2={self.billing_address_2!r}, ' - f'bank_name={self.bank_name!r}, ' - f'masked_bank_routing_number={self.masked_bank_routing_number!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!r}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!r}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!r}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!r}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!r}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!r}, ' + f'bank_name={(self.bank_name if hasattr(self, "bank_name") else None)!r}, ' + f'masked_bank_routing_number={(self.masked_bank_routing_number if hasattr(self, "masked_bank_routing_number") else None)!r}, ' f'masked_bank_account_number={self.masked_bank_account_number!r}, ' - f'bank_account_type={self.bank_account_type!r}, ' - f'bank_account_holder_type={self.bank_account_holder_type!r}, ' + f'bank_account_type={(self.bank_account_type if hasattr(self, "bank_account_type") else None)!r}, ' + f'bank_account_holder_type={(self.bank_account_holder_type if hasattr(self, "bank_account_holder_type") else None)!r}, ' f'payment_type={self.payment_type!r}, ' - f'verified={self.verified!r}, ' - f'site_gateway_setting_id={self.site_gateway_setting_id!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' + f'verified={(self.verified if hasattr(self, "verified") else None)!r}, ' + f'site_gateway_setting_id={(self.site_gateway_setting_id if hasattr(self, "site_gateway_setting_id") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'customer_id={self.customer_id!s}, ' - f'current_vault={self.current_vault!s}, ' - f'vault_token={self.vault_token!s}, ' - f'billing_address={self.billing_address!s}, ' - f'billing_city={self.billing_city!s}, ' - f'billing_state={self.billing_state!s}, ' - f'billing_zip={self.billing_zip!s}, ' - f'billing_country={self.billing_country!s}, ' - f'customer_vault_token={self.customer_vault_token!s}, ' - f'billing_address_2={self.billing_address_2!s}, ' - f'bank_name={self.bank_name!s}, ' - f'masked_bank_routing_number={self.masked_bank_routing_number!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!s}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!s}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!s}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!s}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!s}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!s}, ' + f'bank_name={(self.bank_name if hasattr(self, "bank_name") else None)!s}, ' + f'masked_bank_routing_number={(self.masked_bank_routing_number if hasattr(self, "masked_bank_routing_number") else None)!s}, ' f'masked_bank_account_number={self.masked_bank_account_number!s}, ' - f'bank_account_type={self.bank_account_type!s}, ' - f'bank_account_holder_type={self.bank_account_holder_type!s}, ' + f'bank_account_type={(self.bank_account_type if hasattr(self, "bank_account_type") else None)!s}, ' + f'bank_account_holder_type={(self.bank_account_holder_type if hasattr(self, "bank_account_holder_type") else None)!s}, ' f'payment_type={self.payment_type!s}, ' - f'verified={self.verified!s}, ' - f'site_gateway_setting_id={self.site_gateway_setting_id!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' + f'verified={(self.verified if hasattr(self, "verified") else None)!s}, ' + f'site_gateway_setting_id={(self.site_gateway_setting_id if hasattr(self, "site_gateway_setting_id") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/bank_account_verification.py b/advancedbilling/models/bank_account_verification.py index 819b471e..c6f0a01f 100644 --- a/advancedbilling/models/bank_account_verification.py +++ b/advancedbilling/models/bank_account_verification.py @@ -79,12 +79,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'deposit_1_in_cents={self.deposit_1_in_cents!r}, ' - f'deposit_2_in_cents={self.deposit_2_in_cents!r}, ' + f'deposit_1_in_cents={(self.deposit_1_in_cents if hasattr(self, "deposit_1_in_cents") else None)!r}, ' + f'deposit_2_in_cents={(self.deposit_2_in_cents if hasattr(self, "deposit_2_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'deposit_1_in_cents={self.deposit_1_in_cents!s}, ' - f'deposit_2_in_cents={self.deposit_2_in_cents!s}, ' + f'deposit_1_in_cents={(self.deposit_1_in_cents if hasattr(self, "deposit_1_in_cents") else None)!s}, ' + f'deposit_2_in_cents={(self.deposit_2_in_cents if hasattr(self, "deposit_2_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/base_refund_error.py b/advancedbilling/models/base_refund_error.py index 5c95638c..61a5f456 100644 --- a/advancedbilling/models/base_refund_error.py +++ b/advancedbilling/models/base_refund_error.py @@ -14,7 +14,7 @@ class BaseRefundError(object): """Implementation of the 'Base Refund Error' model. Attributes: - base (List[object]): The model property of type List[object]. + base (List[Any]): The model property of type List[Any]. additional_properties (Dict[str, object]): The additional properties for the model. @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'base={self.base!r}, ' + f'base={(self.base if hasattr(self, "base") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'base={self.base!s}, ' + f'base={(self.base if hasattr(self, "base") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/base_string_error.py b/advancedbilling/models/base_string_error.py index deb99114..17a730b3 100644 --- a/advancedbilling/models/base_string_error.py +++ b/advancedbilling/models/base_string_error.py @@ -73,10 +73,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'base={self.base!r}, ' + f'base={(self.base if hasattr(self, "base") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'base={self.base!s}, ' + f'base={(self.base if hasattr(self, "base") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/batch_job.py b/advancedbilling/models/batch_job.py index 82e09dbd..0571a8dc 100644 --- a/advancedbilling/models/batch_job.py +++ b/advancedbilling/models/batch_job.py @@ -115,18 +115,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'finished_at={self.finished_at!r}, ' - f'row_count={self.row_count!r}, ' - f'created_at={self.created_at!r}, ' - f'completed={self.completed!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'finished_at={(self.finished_at if hasattr(self, "finished_at") else None)!r}, ' + f'row_count={(self.row_count if hasattr(self, "row_count") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'completed={(self.completed if hasattr(self, "completed") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'finished_at={self.finished_at!s}, ' - f'row_count={self.row_count!s}, ' - f'created_at={self.created_at!s}, ' - f'completed={self.completed!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'finished_at={(self.finished_at if hasattr(self, "finished_at") else None)!s}, ' + f'row_count={(self.row_count if hasattr(self, "row_count") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'completed={(self.completed if hasattr(self, "completed") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/billing_manifest.py b/advancedbilling/models/billing_manifest.py index 5343447f..3d6e79d8 100644 --- a/advancedbilling/models/billing_manifest.py +++ b/advancedbilling/models/billing_manifest.py @@ -153,26 +153,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'line_items={self.line_items!r}, ' - f'total_in_cents={self.total_in_cents!r}, ' - f'total_discount_in_cents={self.total_discount_in_cents!r}, ' - f'total_tax_in_cents={self.total_tax_in_cents!r}, ' - f'subtotal_in_cents={self.subtotal_in_cents!r}, ' - f'start_date={self.start_date!r}, ' - f'end_date={self.end_date!r}, ' - f'period_type={self.period_type!r}, ' - f'existing_balance_in_cents={self.existing_balance_in_cents!r}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!r}, ' + f'total_in_cents={(self.total_in_cents if hasattr(self, "total_in_cents") else None)!r}, ' + f'total_discount_in_cents={(self.total_discount_in_cents if hasattr(self, "total_discount_in_cents") else None)!r}, ' + f'total_tax_in_cents={(self.total_tax_in_cents if hasattr(self, "total_tax_in_cents") else None)!r}, ' + f'subtotal_in_cents={(self.subtotal_in_cents if hasattr(self, "subtotal_in_cents") else None)!r}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!r}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!r}, ' + f'period_type={(self.period_type if hasattr(self, "period_type") else None)!r}, ' + f'existing_balance_in_cents={(self.existing_balance_in_cents if hasattr(self, "existing_balance_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'line_items={self.line_items!s}, ' - f'total_in_cents={self.total_in_cents!s}, ' - f'total_discount_in_cents={self.total_discount_in_cents!s}, ' - f'total_tax_in_cents={self.total_tax_in_cents!s}, ' - f'subtotal_in_cents={self.subtotal_in_cents!s}, ' - f'start_date={self.start_date!s}, ' - f'end_date={self.end_date!s}, ' - f'period_type={self.period_type!s}, ' - f'existing_balance_in_cents={self.existing_balance_in_cents!s}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!s}, ' + f'total_in_cents={(self.total_in_cents if hasattr(self, "total_in_cents") else None)!s}, ' + f'total_discount_in_cents={(self.total_discount_in_cents if hasattr(self, "total_discount_in_cents") else None)!s}, ' + f'total_tax_in_cents={(self.total_tax_in_cents if hasattr(self, "total_tax_in_cents") else None)!s}, ' + f'subtotal_in_cents={(self.subtotal_in_cents if hasattr(self, "subtotal_in_cents") else None)!s}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!s}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!s}, ' + f'period_type={(self.period_type if hasattr(self, "period_type") else None)!s}, ' + f'existing_balance_in_cents={(self.existing_balance_in_cents if hasattr(self, "existing_balance_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/billing_manifest_item.py b/advancedbilling/models/billing_manifest_item.py index 3f6f4cec..8e40a02e 100644 --- a/advancedbilling/models/billing_manifest_item.py +++ b/advancedbilling/models/billing_manifest_item.py @@ -177,36 +177,36 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'transaction_type={self.transaction_type!r}, ' - f'kind={self.kind!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'memo={self.memo!r}, ' - f'discount_amount_in_cents={self.discount_amount_in_cents!r}, ' - f'taxable_amount_in_cents={self.taxable_amount_in_cents!r}, ' - f'component_id={self.component_id!r}, ' - f'component_handle={self.component_handle!r}, ' - f'component_name={self.component_name!r}, ' - f'product_id={self.product_id!r}, ' - f'product_handle={self.product_handle!r}, ' - f'product_name={self.product_name!r}, ' - f'period_range_start={self.period_range_start!r}, ' - f'period_range_end={self.period_range_end!r}, ' + f'transaction_type={(self.transaction_type if hasattr(self, "transaction_type") else None)!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'discount_amount_in_cents={(self.discount_amount_in_cents if hasattr(self, "discount_amount_in_cents") else None)!r}, ' + f'taxable_amount_in_cents={(self.taxable_amount_in_cents if hasattr(self, "taxable_amount_in_cents") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!r}, ' + f'component_name={(self.component_name if hasattr(self, "component_name") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!r}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!r}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!r}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'transaction_type={self.transaction_type!s}, ' - f'kind={self.kind!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'memo={self.memo!s}, ' - f'discount_amount_in_cents={self.discount_amount_in_cents!s}, ' - f'taxable_amount_in_cents={self.taxable_amount_in_cents!s}, ' - f'component_id={self.component_id!s}, ' - f'component_handle={self.component_handle!s}, ' - f'component_name={self.component_name!s}, ' - f'product_id={self.product_id!s}, ' - f'product_handle={self.product_handle!s}, ' - f'product_name={self.product_name!s}, ' - f'period_range_start={self.period_range_start!s}, ' - f'period_range_end={self.period_range_end!s}, ' + f'transaction_type={(self.transaction_type if hasattr(self, "transaction_type") else None)!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'discount_amount_in_cents={(self.discount_amount_in_cents if hasattr(self, "discount_amount_in_cents") else None)!s}, ' + f'taxable_amount_in_cents={(self.taxable_amount_in_cents if hasattr(self, "taxable_amount_in_cents") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!s}, ' + f'component_name={(self.component_name if hasattr(self, "component_name") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!s}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!s}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!s}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/billing_schedule.py b/advancedbilling/models/billing_schedule.py index ce142d8f..d9479f84 100644 --- a/advancedbilling/models/billing_schedule.py +++ b/advancedbilling/models/billing_schedule.py @@ -103,10 +103,10 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'initial_billing_at={self.initial_billing_at!r}, ' + f'initial_billing_at={(self.initial_billing_at if hasattr(self, "initial_billing_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'initial_billing_at={self.initial_billing_at!s}, ' + f'initial_billing_at={(self.initial_billing_at if hasattr(self, "initial_billing_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/breakouts.py b/advancedbilling/models/breakouts.py index 084134f8..c417d81e 100644 --- a/advancedbilling/models/breakouts.py +++ b/advancedbilling/models/breakouts.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'plan_amount_in_cents={self.plan_amount_in_cents!r}, ' - f'plan_amount_formatted={self.plan_amount_formatted!r}, ' - f'usage_amount_in_cents={self.usage_amount_in_cents!r}, ' - f'usage_amount_formatted={self.usage_amount_formatted!r}, ' + f'plan_amount_in_cents={(self.plan_amount_in_cents if hasattr(self, "plan_amount_in_cents") else None)!r}, ' + f'plan_amount_formatted={(self.plan_amount_formatted if hasattr(self, "plan_amount_formatted") else None)!r}, ' + f'usage_amount_in_cents={(self.usage_amount_in_cents if hasattr(self, "usage_amount_in_cents") else None)!r}, ' + f'usage_amount_formatted={(self.usage_amount_formatted if hasattr(self, "usage_amount_formatted") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'plan_amount_in_cents={self.plan_amount_in_cents!s}, ' - f'plan_amount_formatted={self.plan_amount_formatted!s}, ' - f'usage_amount_in_cents={self.usage_amount_in_cents!s}, ' - f'usage_amount_formatted={self.usage_amount_formatted!s}, ' + f'plan_amount_in_cents={(self.plan_amount_in_cents if hasattr(self, "plan_amount_in_cents") else None)!s}, ' + f'plan_amount_formatted={(self.plan_amount_formatted if hasattr(self, "plan_amount_formatted") else None)!s}, ' + f'usage_amount_in_cents={(self.usage_amount_in_cents if hasattr(self, "usage_amount_in_cents") else None)!s}, ' + f'usage_amount_formatted={(self.usage_amount_formatted if hasattr(self, "usage_amount_formatted") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/bulk_components_price_point_assignment.py b/advancedbilling/models/bulk_components_price_point_assignment.py index e34aa26c..6600d1ab 100644 --- a/advancedbilling/models/bulk_components_price_point_assignment.py +++ b/advancedbilling/models/bulk_components_price_point_assignment.py @@ -77,10 +77,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'components={self.components!r}, ' + f'components={(self.components if hasattr(self, "components") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'components={self.components!s}, ' + f'components={(self.components if hasattr(self, "components") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/bulk_create_product_price_points_response.py b/advancedbilling/models/bulk_create_product_price_points_response.py index e5fe6021..5f567c33 100644 --- a/advancedbilling/models/bulk_create_product_price_points_response.py +++ b/advancedbilling/models/bulk_create_product_price_points_response.py @@ -77,10 +77,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'price_points={self.price_points!r}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'price_points={self.price_points!s}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/bulk_create_segments.py b/advancedbilling/models/bulk_create_segments.py index 8972dd5d..ea1479eb 100644 --- a/advancedbilling/models/bulk_create_segments.py +++ b/advancedbilling/models/bulk_create_segments.py @@ -77,10 +77,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'segments={self.segments!r}, ' + f'segments={(self.segments if hasattr(self, "segments") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'segments={self.segments!s}, ' + f'segments={(self.segments if hasattr(self, "segments") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/bulk_update_segments.py b/advancedbilling/models/bulk_update_segments.py index 427103a0..565040d8 100644 --- a/advancedbilling/models/bulk_update_segments.py +++ b/advancedbilling/models/bulk_update_segments.py @@ -77,10 +77,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'segments={self.segments!r}, ' + f'segments={(self.segments if hasattr(self, "segments") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'segments={self.segments!s}, ' + f'segments={(self.segments if hasattr(self, "segments") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/calendar_billing.py b/advancedbilling/models/calendar_billing.py index dfbfb6f1..01933a82 100644 --- a/advancedbilling/models/calendar_billing.py +++ b/advancedbilling/models/calendar_billing.py @@ -106,12 +106,12 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'snap_day={self.snap_day!r}, ' - f'calendar_billing_first_charge={self.calendar_billing_first_charge!r}, ' + f'snap_day={(self.snap_day if hasattr(self, "snap_day") else None)!r}, ' + f'calendar_billing_first_charge={(self.calendar_billing_first_charge if hasattr(self, "calendar_billing_first_charge") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'snap_day={self.snap_day!s}, ' - f'calendar_billing_first_charge={self.calendar_billing_first_charge!s}, ' + f'snap_day={(self.snap_day if hasattr(self, "snap_day") else None)!s}, ' + f'calendar_billing_first_charge={(self.calendar_billing_first_charge if hasattr(self, "calendar_billing_first_charge") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/cancel_grouped_subscriptions_request.py b/advancedbilling/models/cancel_grouped_subscriptions_request.py index c76a2280..55b292f0 100644 --- a/advancedbilling/models/cancel_grouped_subscriptions_request.py +++ b/advancedbilling/models/cancel_grouped_subscriptions_request.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'charge_unbilled_usage={self.charge_unbilled_usage!r}, ' + f'charge_unbilled_usage={(self.charge_unbilled_usage if hasattr(self, "charge_unbilled_usage") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'charge_unbilled_usage={self.charge_unbilled_usage!s}, ' + f'charge_unbilled_usage={(self.charge_unbilled_usage if hasattr(self, "charge_unbilled_usage") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/cancellation_options.py b/advancedbilling/models/cancellation_options.py index d25ac02b..8b391ddc 100644 --- a/advancedbilling/models/cancellation_options.py +++ b/advancedbilling/models/cancellation_options.py @@ -81,12 +81,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'cancellation_message={self.cancellation_message!r}, ' - f'reason_code={self.reason_code!r}, ' + f'cancellation_message={(self.cancellation_message if hasattr(self, "cancellation_message") else None)!r}, ' + f'reason_code={(self.reason_code if hasattr(self, "reason_code") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'cancellation_message={self.cancellation_message!s}, ' - f'reason_code={self.reason_code!s}, ' + f'cancellation_message={(self.cancellation_message if hasattr(self, "cancellation_message") else None)!s}, ' + f'reason_code={(self.reason_code if hasattr(self, "reason_code") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/change_invoice_status_event_data.py b/advancedbilling/models/change_invoice_status_event_data.py index 9b84ba51..b405103d 100644 --- a/advancedbilling/models/change_invoice_status_event_data.py +++ b/advancedbilling/models/change_invoice_status_event_data.py @@ -139,18 +139,18 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'gateway_trans_id={self.gateway_trans_id!r}, ' - f'amount={self.amount!r}, ' + f'gateway_trans_id={(self.gateway_trans_id if hasattr(self, "gateway_trans_id") else None)!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' f'from_status={self.from_status!r}, ' f'to_status={self.to_status!r}, ' - f'consolidation_level={self.consolidation_level!r}, ' + f'consolidation_level={(self.consolidation_level if hasattr(self, "consolidation_level") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'gateway_trans_id={self.gateway_trans_id!s}, ' - f'amount={self.amount!s}, ' + f'gateway_trans_id={(self.gateway_trans_id if hasattr(self, "gateway_trans_id") else None)!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' f'from_status={self.from_status!s}, ' f'to_status={self.to_status!s}, ' - f'consolidation_level={self.consolidation_level!s}, ' + f'consolidation_level={(self.consolidation_level if hasattr(self, "consolidation_level") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/chargify_ebb.py b/advancedbilling/models/chargify_ebb.py index 965693b5..8019a74b 100644 --- a/advancedbilling/models/chargify_ebb.py +++ b/advancedbilling/models/chargify_ebb.py @@ -128,20 +128,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'timestamp={self.timestamp!r}, ' - f'id={self.id!r}, ' - f'created_at={self.created_at!r}, ' - f'uniqueness_token={self.uniqueness_token!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'subscription_reference={self.subscription_reference!r}, ' + f'timestamp={(self.timestamp if hasattr(self, "timestamp") else None)!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'uniqueness_token={(self.uniqueness_token if hasattr(self, "uniqueness_token") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'subscription_reference={(self.subscription_reference if hasattr(self, "subscription_reference") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'timestamp={self.timestamp!s}, ' - f'id={self.id!s}, ' - f'created_at={self.created_at!s}, ' - f'uniqueness_token={self.uniqueness_token!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'subscription_reference={self.subscription_reference!s}, ' + f'timestamp={(self.timestamp if hasattr(self, "timestamp") else None)!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'uniqueness_token={(self.uniqueness_token if hasattr(self, "uniqueness_token") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'subscription_reference={(self.subscription_reference if hasattr(self, "subscription_reference") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component.py b/advancedbilling/models/component.py index 31bfa700..8b9ff202 100644 --- a/advancedbilling/models/component.py +++ b/advancedbilling/models/component.py @@ -31,6 +31,8 @@ class Component(object): Component belongs product_family_name (str): The name of the Product Family to which the Component belongs + product_family_handle (str): The handle of the Product Family to which + the Component belongs price_per_unit_in_cents (int): deprecated - use unit_price instead kind (ComponentKind): A handle for the component type archived (bool): Boolean flag describing whether a component is @@ -102,6 +104,7 @@ class Component(object): "unit_price": 'unit_price', "product_family_id": 'product_family_id', "product_family_name": 'product_family_name', + "product_family_handle": 'product_family_handle', "price_per_unit_in_cents": 'price_per_unit_in_cents', "kind": 'kind', "archived": 'archived', @@ -139,6 +142,7 @@ class Component(object): 'unit_price', 'product_family_id', 'product_family_name', + 'product_family_handle', 'price_per_unit_in_cents', 'kind', 'archived', @@ -196,6 +200,7 @@ def __init__(self, unit_price=APIHelper.SKIP, product_family_id=APIHelper.SKIP, product_family_name=APIHelper.SKIP, + product_family_handle=APIHelper.SKIP, price_per_unit_in_cents=APIHelper.SKIP, kind=APIHelper.SKIP, archived=APIHelper.SKIP, @@ -242,6 +247,8 @@ def __init__(self, self.product_family_id = product_family_id if product_family_name is not APIHelper.SKIP: self.product_family_name = product_family_name + if product_family_handle is not APIHelper.SKIP: + self.product_family_handle = product_family_handle if price_per_unit_in_cents is not APIHelper.SKIP: self.price_per_unit_in_cents = price_per_unit_in_cents if kind is not APIHelper.SKIP: @@ -327,6 +334,7 @@ def from_dictionary(cls, unit_price = dictionary.get("unit_price") if "unit_price" in dictionary.keys() else APIHelper.SKIP product_family_id = dictionary.get("product_family_id") if dictionary.get("product_family_id") else APIHelper.SKIP product_family_name = dictionary.get("product_family_name") if dictionary.get("product_family_name") else APIHelper.SKIP + product_family_handle = dictionary.get("product_family_handle") if dictionary.get("product_family_handle") else APIHelper.SKIP price_per_unit_in_cents = dictionary.get("price_per_unit_in_cents") if "price_per_unit_in_cents" in dictionary.keys() else APIHelper.SKIP kind = dictionary.get("kind") if dictionary.get("kind") else APIHelper.SKIP archived = dictionary.get("archived") if "archived" in dictionary.keys() else APIHelper.SKIP @@ -373,6 +381,7 @@ def from_dictionary(cls, unit_price, product_family_id, product_family_name, + product_family_handle, price_per_unit_in_cents, kind, archived, @@ -403,76 +412,78 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'name={self.name!r}, ' - f'handle={self.handle!r}, ' - f'pricing_scheme={self.pricing_scheme!r}, ' - f'unit_name={self.unit_name!r}, ' - f'unit_price={self.unit_price!r}, ' - f'product_family_id={self.product_family_id!r}, ' - f'product_family_name={self.product_family_name!r}, ' - f'price_per_unit_in_cents={self.price_per_unit_in_cents!r}, ' - f'kind={self.kind!r}, ' - f'archived={self.archived!r}, ' - f'taxable={self.taxable!r}, ' - f'description={self.description!r}, ' - f'default_price_point_id={self.default_price_point_id!r}, ' - f'overage_prices={self.overage_prices!r}, ' - f'prices={self.prices!r}, ' - f'price_point_count={self.price_point_count!r}, ' - f'price_points_url={self.price_points_url!r}, ' - f'default_price_point_name={self.default_price_point_name!r}, ' - f'tax_code={self.tax_code!r}, ' - f'recurring={self.recurring!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'archived_at={self.archived_at!r}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!r}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!r}, ' - f'item_category={self.item_category!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'accounting_code={self.accounting_code!r}, ' - f'event_based_billing_metric_id={self.event_based_billing_metric_id!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!r}, ' + f'unit_name={(self.unit_name if hasattr(self, "unit_name") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!r}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!r}, ' + f'product_family_handle={(self.product_family_handle if hasattr(self, "product_family_handle") else None)!r}, ' + f'price_per_unit_in_cents={(self.price_per_unit_in_cents if hasattr(self, "price_per_unit_in_cents") else None)!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' + f'archived={(self.archived if hasattr(self, "archived") else None)!r}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'default_price_point_id={(self.default_price_point_id if hasattr(self, "default_price_point_id") else None)!r}, ' + f'overage_prices={(self.overage_prices if hasattr(self, "overage_prices") else None)!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' + f'price_point_count={(self.price_point_count if hasattr(self, "price_point_count") else None)!r}, ' + f'price_points_url={(self.price_points_url if hasattr(self, "price_points_url") else None)!r}, ' + f'default_price_point_name={(self.default_price_point_name if hasattr(self, "default_price_point_name") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!r}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!r}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!r}, ' + f'item_category={(self.item_category if hasattr(self, "item_category") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!r}, ' + f'event_based_billing_metric_id={(self.event_based_billing_metric_id if hasattr(self, "event_based_billing_metric_id") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'name={self.name!s}, ' - f'handle={self.handle!s}, ' - f'pricing_scheme={self.pricing_scheme!s}, ' - f'unit_name={self.unit_name!s}, ' - f'unit_price={self.unit_price!s}, ' - f'product_family_id={self.product_family_id!s}, ' - f'product_family_name={self.product_family_name!s}, ' - f'price_per_unit_in_cents={self.price_per_unit_in_cents!s}, ' - f'kind={self.kind!s}, ' - f'archived={self.archived!s}, ' - f'taxable={self.taxable!s}, ' - f'description={self.description!s}, ' - f'default_price_point_id={self.default_price_point_id!s}, ' - f'overage_prices={self.overage_prices!s}, ' - f'prices={self.prices!s}, ' - f'price_point_count={self.price_point_count!s}, ' - f'price_points_url={self.price_points_url!s}, ' - f'default_price_point_name={self.default_price_point_name!s}, ' - f'tax_code={self.tax_code!s}, ' - f'recurring={self.recurring!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'archived_at={self.archived_at!s}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!s}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!s}, ' - f'item_category={self.item_category!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'accounting_code={self.accounting_code!s}, ' - f'event_based_billing_metric_id={self.event_based_billing_metric_id!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!s}, ' + f'unit_name={(self.unit_name if hasattr(self, "unit_name") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!s}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!s}, ' + f'product_family_handle={(self.product_family_handle if hasattr(self, "product_family_handle") else None)!s}, ' + f'price_per_unit_in_cents={(self.price_per_unit_in_cents if hasattr(self, "price_per_unit_in_cents") else None)!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' + f'archived={(self.archived if hasattr(self, "archived") else None)!s}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'default_price_point_id={(self.default_price_point_id if hasattr(self, "default_price_point_id") else None)!s}, ' + f'overage_prices={(self.overage_prices if hasattr(self, "overage_prices") else None)!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' + f'price_point_count={(self.price_point_count if hasattr(self, "price_point_count") else None)!s}, ' + f'price_points_url={(self.price_points_url if hasattr(self, "price_points_url") else None)!s}, ' + f'default_price_point_name={(self.default_price_point_name if hasattr(self, "default_price_point_name") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!s}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!s}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!s}, ' + f'item_category={(self.item_category if hasattr(self, "item_category") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!s}, ' + f'event_based_billing_metric_id={(self.event_based_billing_metric_id if hasattr(self, "event_based_billing_metric_id") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_allocation_change.py b/advancedbilling/models/component_allocation_change.py index a5618540..7a546eed 100644 --- a/advancedbilling/models/component_allocation_change.py +++ b/advancedbilling/models/component_allocation_change.py @@ -159,7 +159,7 @@ def __repr__(self): f'component_handle={self.component_handle!r}, ' f'memo={self.memo!r}, ' f'allocation_id={self.allocation_id!r}, ' - f'allocated_quantity={self.allocated_quantity!r}, ' + f'allocated_quantity={(self.allocated_quantity if hasattr(self, "allocated_quantity") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): @@ -170,5 +170,5 @@ def __str__(self): f'component_handle={self.component_handle!s}, ' f'memo={self.memo!s}, ' f'allocation_id={self.allocation_id!s}, ' - f'allocated_quantity={self.allocated_quantity!s}, ' + f'allocated_quantity={(self.allocated_quantity if hasattr(self, "allocated_quantity") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_allocation_error_item.py b/advancedbilling/models/component_allocation_error_item.py index 85d86053..6e44fd35 100644 --- a/advancedbilling/models/component_allocation_error_item.py +++ b/advancedbilling/models/component_allocation_error_item.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'message={self.message!r}, ' - f'kind={self.kind!r}, ' - f'on={self.on!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'message={(self.message if hasattr(self, "message") else None)!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' + f'on={(self.on if hasattr(self, "on") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'message={self.message!s}, ' - f'kind={self.kind!s}, ' - f'on={self.on!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'message={(self.message if hasattr(self, "message") else None)!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' + f'on={(self.on if hasattr(self, "on") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_cost_data.py b/advancedbilling/models/component_cost_data.py index a7943104..71e7d5cb 100644 --- a/advancedbilling/models/component_cost_data.py +++ b/advancedbilling/models/component_cost_data.py @@ -154,22 +154,22 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_code_id={self.component_code_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'product_id={self.product_id!r}, ' - f'quantity={self.quantity!r}, ' - f'amount={self.amount!r}, ' - f'pricing_scheme={self.pricing_scheme!r}, ' - f'tiers={self.tiers!r}, ' + f'component_code_id={(self.component_code_id if hasattr(self, "component_code_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!r}, ' + f'tiers={(self.tiers if hasattr(self, "tiers") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_code_id={self.component_code_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'product_id={self.product_id!s}, ' - f'quantity={self.quantity!s}, ' - f'amount={self.amount!s}, ' - f'pricing_scheme={self.pricing_scheme!s}, ' - f'tiers={self.tiers!s}, ' + f'component_code_id={(self.component_code_id if hasattr(self, "component_code_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!s}, ' + f'tiers={(self.tiers if hasattr(self, "tiers") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_cost_data_rate_tier.py b/advancedbilling/models/component_cost_data_rate_tier.py index 5fa0518d..dc3b518c 100644 --- a/advancedbilling/models/component_cost_data_rate_tier.py +++ b/advancedbilling/models/component_cost_data_rate_tier.py @@ -129,18 +129,18 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'starting_quantity={self.starting_quantity!r}, ' - f'ending_quantity={self.ending_quantity!r}, ' - f'quantity={self.quantity!r}, ' - f'unit_price={self.unit_price!r}, ' - f'amount={self.amount!r}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!r}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'starting_quantity={self.starting_quantity!s}, ' - f'ending_quantity={self.ending_quantity!s}, ' - f'quantity={self.quantity!s}, ' - f'unit_price={self.unit_price!s}, ' - f'amount={self.amount!s}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!s}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_currency_price.py b/advancedbilling/models/component_currency_price.py index 33cb658b..9f85386e 100644 --- a/advancedbilling/models/component_currency_price.py +++ b/advancedbilling/models/component_currency_price.py @@ -111,20 +111,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'currency={self.currency!r}, ' - f'price={self.price!r}, ' - f'formatted_price={self.formatted_price!r}, ' - f'price_id={self.price_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'price={(self.price if hasattr(self, "price") else None)!r}, ' + f'formatted_price={(self.formatted_price if hasattr(self, "formatted_price") else None)!r}, ' + f'price_id={(self.price_id if hasattr(self, "price_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'currency={self.currency!s}, ' - f'price={self.price!s}, ' - f'formatted_price={self.formatted_price!s}, ' - f'price_id={self.price_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'price={(self.price if hasattr(self, "price") else None)!s}, ' + f'formatted_price={(self.formatted_price if hasattr(self, "formatted_price") else None)!s}, ' + f'price_id={(self.price_id if hasattr(self, "price_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_custom_price.py b/advancedbilling/models/component_custom_price.py index d7225b61..868d1808 100644 --- a/advancedbilling/models/component_custom_price.py +++ b/advancedbilling/models/component_custom_price.py @@ -145,18 +145,18 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'tax_included={self.tax_included!r}, ' - f'pricing_scheme={self.pricing_scheme!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!r}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' f'prices={self.prices!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'tax_included={self.tax_included!s}, ' - f'pricing_scheme={self.pricing_scheme!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!s}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' f'prices={self.prices!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_price.py b/advancedbilling/models/component_price.py index 05af58de..4933dffa 100644 --- a/advancedbilling/models/component_price.py +++ b/advancedbilling/models/component_price.py @@ -132,24 +132,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'component_id={self.component_id!r}, ' - f'starting_quantity={self.starting_quantity!r}, ' - f'ending_quantity={self.ending_quantity!r}, ' - f'unit_price={self.unit_price!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'formatted_unit_price={self.formatted_unit_price!r}, ' - f'segment_id={self.segment_id!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!r}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'formatted_unit_price={(self.formatted_unit_price if hasattr(self, "formatted_unit_price") else None)!r}, ' + f'segment_id={(self.segment_id if hasattr(self, "segment_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'component_id={self.component_id!s}, ' - f'starting_quantity={self.starting_quantity!s}, ' - f'ending_quantity={self.ending_quantity!s}, ' - f'unit_price={self.unit_price!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'formatted_unit_price={self.formatted_unit_price!s}, ' - f'segment_id={self.segment_id!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!s}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'formatted_unit_price={(self.formatted_unit_price if hasattr(self, "formatted_unit_price") else None)!s}, ' + f'segment_id={(self.segment_id if hasattr(self, "segment_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_price_point.py b/advancedbilling/models/component_price_point.py index 5ca4f7f8..f042ae36 100644 --- a/advancedbilling/models/component_price_point.py +++ b/advancedbilling/models/component_price_point.py @@ -308,54 +308,54 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'mtype={self.mtype!r}, ' - f'default={self.default!r}, ' - f'name={self.name!r}, ' - f'pricing_scheme={self.pricing_scheme!r}, ' - f'component_id={self.component_id!r}, ' - f'handle={self.handle!r}, ' - f'archived_at={self.archived_at!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'prices={self.prices!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'tax_included={self.tax_included!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' - f'currency_prices={self.currency_prices!r}, ' - f'overage_prices={self.overage_prices!r}, ' - f'overage_pricing_scheme={self.overage_pricing_scheme!r}, ' - f'renew_prepaid_allocation={self.renew_prepaid_allocation!r}, ' - f'rollover_prepaid_remainder={self.rollover_prepaid_remainder!r}, ' - f'expiration_interval={self.expiration_interval!r}, ' - f'expiration_interval_unit={self.expiration_interval_unit!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!r}, ' + f'default={(self.default if hasattr(self, "default") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!r}, ' + f'overage_prices={(self.overage_prices if hasattr(self, "overage_prices") else None)!r}, ' + f'overage_pricing_scheme={(self.overage_pricing_scheme if hasattr(self, "overage_pricing_scheme") else None)!r}, ' + f'renew_prepaid_allocation={(self.renew_prepaid_allocation if hasattr(self, "renew_prepaid_allocation") else None)!r}, ' + f'rollover_prepaid_remainder={(self.rollover_prepaid_remainder if hasattr(self, "rollover_prepaid_remainder") else None)!r}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!r}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'mtype={self.mtype!s}, ' - f'default={self.default!s}, ' - f'name={self.name!s}, ' - f'pricing_scheme={self.pricing_scheme!s}, ' - f'component_id={self.component_id!s}, ' - f'handle={self.handle!s}, ' - f'archived_at={self.archived_at!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'prices={self.prices!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'tax_included={self.tax_included!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' - f'currency_prices={self.currency_prices!s}, ' - f'overage_prices={self.overage_prices!s}, ' - f'overage_pricing_scheme={self.overage_pricing_scheme!s}, ' - f'renew_prepaid_allocation={self.renew_prepaid_allocation!s}, ' - f'rollover_prepaid_remainder={self.rollover_prepaid_remainder!s}, ' - f'expiration_interval={self.expiration_interval!s}, ' - f'expiration_interval_unit={self.expiration_interval_unit!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!s}, ' + f'default={(self.default if hasattr(self, "default") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!s}, ' + f'overage_prices={(self.overage_prices if hasattr(self, "overage_prices") else None)!s}, ' + f'overage_pricing_scheme={(self.overage_pricing_scheme if hasattr(self, "overage_pricing_scheme") else None)!s}, ' + f'renew_prepaid_allocation={(self.renew_prepaid_allocation if hasattr(self, "renew_prepaid_allocation") else None)!s}, ' + f'rollover_prepaid_remainder={(self.rollover_prepaid_remainder if hasattr(self, "rollover_prepaid_remainder") else None)!s}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!s}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_price_point_assignment.py b/advancedbilling/models/component_price_point_assignment.py index 239bfdfb..c6b3e275 100644 --- a/advancedbilling/models/component_price_point_assignment.py +++ b/advancedbilling/models/component_price_point_assignment.py @@ -81,12 +81,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'price_point={self.price_point!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'price_point={self.price_point!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_price_point_error_item.py b/advancedbilling/models/component_price_point_error_item.py index 38256f2e..eca48a87 100644 --- a/advancedbilling/models/component_price_point_error_item.py +++ b/advancedbilling/models/component_price_point_error_item.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'message={self.message!r}, ' - f'price_point={self.price_point!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'message={(self.message if hasattr(self, "message") else None)!r}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'message={self.message!s}, ' - f'price_point={self.price_point!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'message={(self.message if hasattr(self, "message") else None)!s}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_price_point_item.py b/advancedbilling/models/component_price_point_item.py index c3b54a34..416294ce 100644 --- a/advancedbilling/models/component_price_point_item.py +++ b/advancedbilling/models/component_price_point_item.py @@ -150,20 +150,20 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!r}, ' - f'handle={self.handle!r}, ' - f'pricing_scheme={self.pricing_scheme!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' - f'prices={self.prices!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!s}, ' - f'handle={self.handle!s}, ' - f'pricing_scheme={self.pricing_scheme!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' - f'prices={self.prices!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/component_price_points_response.py b/advancedbilling/models/component_price_points_response.py index b0f4a68b..19f7b9ce 100644 --- a/advancedbilling/models/component_price_points_response.py +++ b/advancedbilling/models/component_price_points_response.py @@ -87,12 +87,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'price_points={self.price_points!r}, ' - f'meta={self.meta!r}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!r}, ' + f'meta={(self.meta if hasattr(self, "meta") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'price_points={self.price_points!s}, ' - f'meta={self.meta!s}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!s}, ' + f'meta={(self.meta if hasattr(self, "meta") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/consolidated_invoice.py b/advancedbilling/models/consolidated_invoice.py index 6160bae4..e39f5494 100644 --- a/advancedbilling/models/consolidated_invoice.py +++ b/advancedbilling/models/consolidated_invoice.py @@ -76,10 +76,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'invoices={self.invoices!r}, ' + f'invoices={(self.invoices if hasattr(self, "invoices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'invoices={self.invoices!s}, ' + f'invoices={(self.invoices if hasattr(self, "invoices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/count_response.py b/advancedbilling/models/count_response.py index 425b5fed..217dac99 100644 --- a/advancedbilling/models/count_response.py +++ b/advancedbilling/models/count_response.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'count={self.count!r}, ' + f'count={(self.count if hasattr(self, "count") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'count={self.count!s}, ' + f'count={(self.count if hasattr(self, "count") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon.py b/advancedbilling/models/coupon.py index 1ae67ad3..67b83785 100644 --- a/advancedbilling/models/coupon.py +++ b/advancedbilling/models/coupon.py @@ -356,70 +356,70 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'name={self.name!r}, ' - f'code={self.code!r}, ' - f'description={self.description!r}, ' - f'amount={self.amount!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'product_family_id={self.product_family_id!r}, ' - f'product_family_name={self.product_family_name!r}, ' - f'start_date={self.start_date!r}, ' - f'end_date={self.end_date!r}, ' - f'percentage={self.percentage!r}, ' - f'recurring={self.recurring!r}, ' - f'recurring_scheme={self.recurring_scheme!r}, ' - f'duration_period_count={self.duration_period_count!r}, ' - f'duration_interval={self.duration_interval!r}, ' - f'duration_interval_unit={self.duration_interval_unit!r}, ' - f'duration_interval_span={self.duration_interval_span!r}, ' - f'allow_negative_balance={self.allow_negative_balance!r}, ' - f'archived_at={self.archived_at!r}, ' - f'conversion_limit={self.conversion_limit!r}, ' - f'stackable={self.stackable!r}, ' - f'compounding_strategy={self.compounding_strategy!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'discount_type={self.discount_type!r}, ' - f'exclude_mid_period_allocations={self.exclude_mid_period_allocations!r}, ' - f'apply_on_cancel_at_end_of_period={self.apply_on_cancel_at_end_of_period!r}, ' - f'apply_on_subscription_expiration={self.apply_on_subscription_expiration!r}, ' - f'coupon_restrictions={self.coupon_restrictions!r}, ' - f'currency_prices={self.currency_prices!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'code={(self.code if hasattr(self, "code") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!r}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!r}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!r}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!r}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!r}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!r}, ' + f'recurring_scheme={(self.recurring_scheme if hasattr(self, "recurring_scheme") else None)!r}, ' + f'duration_period_count={(self.duration_period_count if hasattr(self, "duration_period_count") else None)!r}, ' + f'duration_interval={(self.duration_interval if hasattr(self, "duration_interval") else None)!r}, ' + f'duration_interval_unit={(self.duration_interval_unit if hasattr(self, "duration_interval_unit") else None)!r}, ' + f'duration_interval_span={(self.duration_interval_span if hasattr(self, "duration_interval_span") else None)!r}, ' + f'allow_negative_balance={(self.allow_negative_balance if hasattr(self, "allow_negative_balance") else None)!r}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!r}, ' + f'conversion_limit={(self.conversion_limit if hasattr(self, "conversion_limit") else None)!r}, ' + f'stackable={(self.stackable if hasattr(self, "stackable") else None)!r}, ' + f'compounding_strategy={(self.compounding_strategy if hasattr(self, "compounding_strategy") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'discount_type={(self.discount_type if hasattr(self, "discount_type") else None)!r}, ' + f'exclude_mid_period_allocations={(self.exclude_mid_period_allocations if hasattr(self, "exclude_mid_period_allocations") else None)!r}, ' + f'apply_on_cancel_at_end_of_period={(self.apply_on_cancel_at_end_of_period if hasattr(self, "apply_on_cancel_at_end_of_period") else None)!r}, ' + f'apply_on_subscription_expiration={(self.apply_on_subscription_expiration if hasattr(self, "apply_on_subscription_expiration") else None)!r}, ' + f'coupon_restrictions={(self.coupon_restrictions if hasattr(self, "coupon_restrictions") else None)!r}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'name={self.name!s}, ' - f'code={self.code!s}, ' - f'description={self.description!s}, ' - f'amount={self.amount!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'product_family_id={self.product_family_id!s}, ' - f'product_family_name={self.product_family_name!s}, ' - f'start_date={self.start_date!s}, ' - f'end_date={self.end_date!s}, ' - f'percentage={self.percentage!s}, ' - f'recurring={self.recurring!s}, ' - f'recurring_scheme={self.recurring_scheme!s}, ' - f'duration_period_count={self.duration_period_count!s}, ' - f'duration_interval={self.duration_interval!s}, ' - f'duration_interval_unit={self.duration_interval_unit!s}, ' - f'duration_interval_span={self.duration_interval_span!s}, ' - f'allow_negative_balance={self.allow_negative_balance!s}, ' - f'archived_at={self.archived_at!s}, ' - f'conversion_limit={self.conversion_limit!s}, ' - f'stackable={self.stackable!s}, ' - f'compounding_strategy={self.compounding_strategy!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'discount_type={self.discount_type!s}, ' - f'exclude_mid_period_allocations={self.exclude_mid_period_allocations!s}, ' - f'apply_on_cancel_at_end_of_period={self.apply_on_cancel_at_end_of_period!s}, ' - f'apply_on_subscription_expiration={self.apply_on_subscription_expiration!s}, ' - f'coupon_restrictions={self.coupon_restrictions!s}, ' - f'currency_prices={self.currency_prices!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'code={(self.code if hasattr(self, "code") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!s}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!s}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!s}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!s}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!s}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!s}, ' + f'recurring_scheme={(self.recurring_scheme if hasattr(self, "recurring_scheme") else None)!s}, ' + f'duration_period_count={(self.duration_period_count if hasattr(self, "duration_period_count") else None)!s}, ' + f'duration_interval={(self.duration_interval if hasattr(self, "duration_interval") else None)!s}, ' + f'duration_interval_unit={(self.duration_interval_unit if hasattr(self, "duration_interval_unit") else None)!s}, ' + f'duration_interval_span={(self.duration_interval_span if hasattr(self, "duration_interval_span") else None)!s}, ' + f'allow_negative_balance={(self.allow_negative_balance if hasattr(self, "allow_negative_balance") else None)!s}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!s}, ' + f'conversion_limit={(self.conversion_limit if hasattr(self, "conversion_limit") else None)!s}, ' + f'stackable={(self.stackable if hasattr(self, "stackable") else None)!s}, ' + f'compounding_strategy={(self.compounding_strategy if hasattr(self, "compounding_strategy") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'discount_type={(self.discount_type if hasattr(self, "discount_type") else None)!s}, ' + f'exclude_mid_period_allocations={(self.exclude_mid_period_allocations if hasattr(self, "exclude_mid_period_allocations") else None)!s}, ' + f'apply_on_cancel_at_end_of_period={(self.apply_on_cancel_at_end_of_period if hasattr(self, "apply_on_cancel_at_end_of_period") else None)!s}, ' + f'apply_on_subscription_expiration={(self.apply_on_subscription_expiration if hasattr(self, "apply_on_subscription_expiration") else None)!s}, ' + f'coupon_restrictions={(self.coupon_restrictions if hasattr(self, "coupon_restrictions") else None)!s}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon_currency.py b/advancedbilling/models/coupon_currency.py index d29e59d2..d956b423 100644 --- a/advancedbilling/models/coupon_currency.py +++ b/advancedbilling/models/coupon_currency.py @@ -100,16 +100,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'currency={self.currency!r}, ' - f'price={self.price!r}, ' - f'coupon_id={self.coupon_id!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'price={(self.price if hasattr(self, "price") else None)!r}, ' + f'coupon_id={(self.coupon_id if hasattr(self, "coupon_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'currency={self.currency!s}, ' - f'price={self.price!s}, ' - f'coupon_id={self.coupon_id!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'price={(self.price if hasattr(self, "price") else None)!s}, ' + f'coupon_id={(self.coupon_id if hasattr(self, "coupon_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon_currency_response.py b/advancedbilling/models/coupon_currency_response.py index 50e5b2af..cb8d354e 100644 --- a/advancedbilling/models/coupon_currency_response.py +++ b/advancedbilling/models/coupon_currency_response.py @@ -77,10 +77,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'currency_prices={self.currency_prices!r}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'currency_prices={self.currency_prices!s}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon_payload.py b/advancedbilling/models/coupon_payload.py index 0c9a9ca5..6d7c03c4 100644 --- a/advancedbilling/models/coupon_payload.py +++ b/advancedbilling/models/coupon_payload.py @@ -199,36 +199,36 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!r}, ' - f'code={self.code!r}, ' - f'description={self.description!r}, ' - f'percentage={self.percentage!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'allow_negative_balance={self.allow_negative_balance!r}, ' - f'recurring={self.recurring!r}, ' - f'end_date={self.end_date!r}, ' - f'product_family_id={self.product_family_id!r}, ' - f'stackable={self.stackable!r}, ' - f'compounding_strategy={self.compounding_strategy!r}, ' - f'exclude_mid_period_allocations={self.exclude_mid_period_allocations!r}, ' - f'apply_on_cancel_at_end_of_period={self.apply_on_cancel_at_end_of_period!r}, ' - f'apply_on_subscription_expiration={self.apply_on_subscription_expiration!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'code={(self.code if hasattr(self, "code") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'allow_negative_balance={(self.allow_negative_balance if hasattr(self, "allow_negative_balance") else None)!r}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!r}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!r}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!r}, ' + f'stackable={(self.stackable if hasattr(self, "stackable") else None)!r}, ' + f'compounding_strategy={(self.compounding_strategy if hasattr(self, "compounding_strategy") else None)!r}, ' + f'exclude_mid_period_allocations={(self.exclude_mid_period_allocations if hasattr(self, "exclude_mid_period_allocations") else None)!r}, ' + f'apply_on_cancel_at_end_of_period={(self.apply_on_cancel_at_end_of_period if hasattr(self, "apply_on_cancel_at_end_of_period") else None)!r}, ' + f'apply_on_subscription_expiration={(self.apply_on_subscription_expiration if hasattr(self, "apply_on_subscription_expiration") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!s}, ' - f'code={self.code!s}, ' - f'description={self.description!s}, ' - f'percentage={self.percentage!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'allow_negative_balance={self.allow_negative_balance!s}, ' - f'recurring={self.recurring!s}, ' - f'end_date={self.end_date!s}, ' - f'product_family_id={self.product_family_id!s}, ' - f'stackable={self.stackable!s}, ' - f'compounding_strategy={self.compounding_strategy!s}, ' - f'exclude_mid_period_allocations={self.exclude_mid_period_allocations!s}, ' - f'apply_on_cancel_at_end_of_period={self.apply_on_cancel_at_end_of_period!s}, ' - f'apply_on_subscription_expiration={self.apply_on_subscription_expiration!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'code={(self.code if hasattr(self, "code") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'allow_negative_balance={(self.allow_negative_balance if hasattr(self, "allow_negative_balance") else None)!s}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!s}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!s}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!s}, ' + f'stackable={(self.stackable if hasattr(self, "stackable") else None)!s}, ' + f'compounding_strategy={(self.compounding_strategy if hasattr(self, "compounding_strategy") else None)!s}, ' + f'exclude_mid_period_allocations={(self.exclude_mid_period_allocations if hasattr(self, "exclude_mid_period_allocations") else None)!s}, ' + f'apply_on_cancel_at_end_of_period={(self.apply_on_cancel_at_end_of_period if hasattr(self, "apply_on_cancel_at_end_of_period") else None)!s}, ' + f'apply_on_subscription_expiration={(self.apply_on_subscription_expiration if hasattr(self, "apply_on_subscription_expiration") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon_request.py b/advancedbilling/models/coupon_request.py index bf514d10..ecbc7739 100644 --- a/advancedbilling/models/coupon_request.py +++ b/advancedbilling/models/coupon_request.py @@ -17,11 +17,13 @@ class CouponRequest(object): Attributes: coupon (CouponPayload): The model property of type CouponPayload. restricted_products (Dict[str, bool]): An object where the keys are - product_ids and the values are booleans indicating if the coupon - should be applicable to the product + product IDs or handles (prefixed with 'handle:'), and the values + are booleans indicating if the coupon should be applicable to the + product restricted_components (Dict[str, bool]): An object where the keys are - component_ids and the values are booleans indicating if the coupon - should be applicable to the component + component IDs or handles (prefixed with 'handle:'), and the values + are booleans indicating if the coupon should be applicable to the + component additional_properties (Dict[str, object]): The additional properties for the model. @@ -92,14 +94,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'coupon={self.coupon!r}, ' - f'restricted_products={self.restricted_products!r}, ' - f'restricted_components={self.restricted_components!r}, ' + f'coupon={(self.coupon if hasattr(self, "coupon") else None)!r}, ' + f'restricted_products={(self.restricted_products if hasattr(self, "restricted_products") else None)!r}, ' + f'restricted_components={(self.restricted_components if hasattr(self, "restricted_components") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'coupon={self.coupon!s}, ' - f'restricted_products={self.restricted_products!s}, ' - f'restricted_components={self.restricted_components!s}, ' + f'coupon={(self.coupon if hasattr(self, "coupon") else None)!s}, ' + f'restricted_products={(self.restricted_products if hasattr(self, "restricted_products") else None)!s}, ' + f'restricted_components={(self.restricted_components if hasattr(self, "restricted_components") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon_response.py b/advancedbilling/models/coupon_response.py index 8800796b..13fa4a31 100644 --- a/advancedbilling/models/coupon_response.py +++ b/advancedbilling/models/coupon_response.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'coupon={self.coupon!r}, ' + f'coupon={(self.coupon if hasattr(self, "coupon") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'coupon={self.coupon!s}, ' + f'coupon={(self.coupon if hasattr(self, "coupon") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon_restriction.py b/advancedbilling/models/coupon_restriction.py index 3975c155..7251f3af 100644 --- a/advancedbilling/models/coupon_restriction.py +++ b/advancedbilling/models/coupon_restriction.py @@ -108,18 +108,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'item_type={self.item_type!r}, ' - f'item_id={self.item_id!r}, ' - f'name={self.name!r}, ' - f'handle={self.handle!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'item_type={(self.item_type if hasattr(self, "item_type") else None)!r}, ' + f'item_id={(self.item_id if hasattr(self, "item_id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'item_type={self.item_type!s}, ' - f'item_id={self.item_id!s}, ' - f'name={self.name!s}, ' - f'handle={self.handle!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'item_type={(self.item_type if hasattr(self, "item_type") else None)!s}, ' + f'item_id={(self.item_id if hasattr(self, "item_id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon_subcodes.py b/advancedbilling/models/coupon_subcodes.py index ac572530..c57489b9 100644 --- a/advancedbilling/models/coupon_subcodes.py +++ b/advancedbilling/models/coupon_subcodes.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'codes={self.codes!r}, ' + f'codes={(self.codes if hasattr(self, "codes") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'codes={self.codes!s}, ' + f'codes={(self.codes if hasattr(self, "codes") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon_subcodes_response.py b/advancedbilling/models/coupon_subcodes_response.py index 9eea8817..eea6332f 100644 --- a/advancedbilling/models/coupon_subcodes_response.py +++ b/advancedbilling/models/coupon_subcodes_response.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'created_codes={self.created_codes!r}, ' - f'duplicate_codes={self.duplicate_codes!r}, ' - f'invalid_codes={self.invalid_codes!r}, ' + f'created_codes={(self.created_codes if hasattr(self, "created_codes") else None)!r}, ' + f'duplicate_codes={(self.duplicate_codes if hasattr(self, "duplicate_codes") else None)!r}, ' + f'invalid_codes={(self.invalid_codes if hasattr(self, "invalid_codes") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'created_codes={self.created_codes!s}, ' - f'duplicate_codes={self.duplicate_codes!s}, ' - f'invalid_codes={self.invalid_codes!s}, ' + f'created_codes={(self.created_codes if hasattr(self, "created_codes") else None)!s}, ' + f'duplicate_codes={(self.duplicate_codes if hasattr(self, "duplicate_codes") else None)!s}, ' + f'invalid_codes={(self.invalid_codes if hasattr(self, "invalid_codes") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/coupon_usage.py b/advancedbilling/models/coupon_usage.py index 5dfdb9b0..f59103fc 100644 --- a/advancedbilling/models/coupon_usage.py +++ b/advancedbilling/models/coupon_usage.py @@ -129,22 +129,22 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'name={self.name!r}, ' - f'signups={self.signups!r}, ' - f'savings={self.savings!r}, ' - f'savings_in_cents={self.savings_in_cents!r}, ' - f'revenue={self.revenue!r}, ' - f'revenue_in_cents={self.revenue_in_cents!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'signups={(self.signups if hasattr(self, "signups") else None)!r}, ' + f'savings={(self.savings if hasattr(self, "savings") else None)!r}, ' + f'savings_in_cents={(self.savings_in_cents if hasattr(self, "savings_in_cents") else None)!r}, ' + f'revenue={(self.revenue if hasattr(self, "revenue") else None)!r}, ' + f'revenue_in_cents={(self.revenue_in_cents if hasattr(self, "revenue_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'name={self.name!s}, ' - f'signups={self.signups!s}, ' - f'savings={self.savings!s}, ' - f'savings_in_cents={self.savings_in_cents!s}, ' - f'revenue={self.revenue!s}, ' - f'revenue_in_cents={self.revenue_in_cents!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'signups={(self.signups if hasattr(self, "signups") else None)!s}, ' + f'savings={(self.savings if hasattr(self, "savings") else None)!s}, ' + f'savings_in_cents={(self.savings_in_cents if hasattr(self, "savings_in_cents") else None)!s}, ' + f'revenue={(self.revenue if hasattr(self, "revenue") else None)!s}, ' + f'revenue_in_cents={(self.revenue_in_cents if hasattr(self, "revenue_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_allocation.py b/advancedbilling/models/create_allocation.py index d1c52a0b..ba93e11c 100644 --- a/advancedbilling/models/create_allocation.py +++ b/advancedbilling/models/create_allocation.py @@ -186,29 +186,29 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' f'quantity={self.quantity!r}, ' - f'component_id={self.component_id!r}, ' - f'memo={self.memo!r}, ' - f'proration_downgrade_scheme={self.proration_downgrade_scheme!r}, ' - f'proration_upgrade_scheme={self.proration_upgrade_scheme!r}, ' - f'accrue_charge={self.accrue_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'initiate_dunning={self.initiate_dunning!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'billing_schedule={self.billing_schedule!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'proration_downgrade_scheme={(self.proration_downgrade_scheme if hasattr(self, "proration_downgrade_scheme") else None)!r}, ' + f'proration_upgrade_scheme={(self.proration_upgrade_scheme if hasattr(self, "proration_upgrade_scheme") else None)!r}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'initiate_dunning={(self.initiate_dunning if hasattr(self, "initiate_dunning") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'billing_schedule={(self.billing_schedule if hasattr(self, "billing_schedule") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'quantity={self.quantity!s}, ' - f'component_id={self.component_id!s}, ' - f'memo={self.memo!s}, ' - f'proration_downgrade_scheme={self.proration_downgrade_scheme!s}, ' - f'proration_upgrade_scheme={self.proration_upgrade_scheme!s}, ' - f'accrue_charge={self.accrue_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'initiate_dunning={self.initiate_dunning!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'billing_schedule={self.billing_schedule!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'proration_downgrade_scheme={(self.proration_downgrade_scheme if hasattr(self, "proration_downgrade_scheme") else None)!s}, ' + f'proration_upgrade_scheme={(self.proration_upgrade_scheme if hasattr(self, "proration_upgrade_scheme") else None)!s}, ' + f'accrue_charge={(self.accrue_charge if hasattr(self, "accrue_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'initiate_dunning={(self.initiate_dunning if hasattr(self, "initiate_dunning") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'billing_schedule={(self.billing_schedule if hasattr(self, "billing_schedule") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_component_price_point.py b/advancedbilling/models/create_component_price_point.py index 234cbca5..115c2b0a 100644 --- a/advancedbilling/models/create_component_price_point.py +++ b/advancedbilling/models/create_component_price_point.py @@ -177,23 +177,23 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' - f'handle={self.handle!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' f'pricing_scheme={self.pricing_scheme!r}, ' f'prices={self.prices!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'tax_included={self.tax_included!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' - f'handle={self.handle!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' f'pricing_scheme={self.pricing_scheme!s}, ' f'prices={self.prices!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'tax_included={self.tax_included!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_currency_price.py b/advancedbilling/models/create_currency_price.py index caf761ce..35c63015 100644 --- a/advancedbilling/models/create_currency_price.py +++ b/advancedbilling/models/create_currency_price.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'currency={self.currency!r}, ' - f'price={self.price!r}, ' - f'price_id={self.price_id!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'price={(self.price if hasattr(self, "price") else None)!r}, ' + f'price_id={(self.price_id if hasattr(self, "price_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'currency={self.currency!s}, ' - f'price={self.price!s}, ' - f'price_id={self.price_id!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'price={(self.price if hasattr(self, "price") else None)!s}, ' + f'price_id={(self.price_id if hasattr(self, "price_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_customer.py b/advancedbilling/models/create_customer.py index 35097402..f4ac65ae 100644 --- a/advancedbilling/models/create_customer.py +++ b/advancedbilling/models/create_customer.py @@ -218,22 +218,22 @@ def __repr__(self): f'first_name={self.first_name!r}, ' f'last_name={self.last_name!r}, ' f'email={self.email!r}, ' - f'cc_emails={self.cc_emails!r}, ' - f'organization={self.organization!r}, ' - f'reference={self.reference!r}, ' - f'address={self.address!r}, ' - f'address_2={self.address_2!r}, ' - f'city={self.city!r}, ' - f'state={self.state!r}, ' - f'zip={self.zip!r}, ' - f'country={self.country!r}, ' - f'phone={self.phone!r}, ' - f'locale={self.locale!r}, ' - f'vat_number={self.vat_number!r}, ' - f'tax_exempt={self.tax_exempt!r}, ' - f'tax_exempt_reason={self.tax_exempt_reason!r}, ' - f'parent_id={self.parent_id!r}, ' - f'salesforce_id={self.salesforce_id!r}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!r}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'address={(self.address if hasattr(self, "address") else None)!r}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!r}, ' + f'city={(self.city if hasattr(self, "city") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!r}, ' + f'country={(self.country if hasattr(self, "country") else None)!r}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!r}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!r}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!r}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!r}, ' + f'tax_exempt_reason={(self.tax_exempt_reason if hasattr(self, "tax_exempt_reason") else None)!r}, ' + f'parent_id={(self.parent_id if hasattr(self, "parent_id") else None)!r}, ' + f'salesforce_id={(self.salesforce_id if hasattr(self, "salesforce_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): @@ -241,20 +241,20 @@ def __str__(self): f'first_name={self.first_name!s}, ' f'last_name={self.last_name!s}, ' f'email={self.email!s}, ' - f'cc_emails={self.cc_emails!s}, ' - f'organization={self.organization!s}, ' - f'reference={self.reference!s}, ' - f'address={self.address!s}, ' - f'address_2={self.address_2!s}, ' - f'city={self.city!s}, ' - f'state={self.state!s}, ' - f'zip={self.zip!s}, ' - f'country={self.country!s}, ' - f'phone={self.phone!s}, ' - f'locale={self.locale!s}, ' - f'vat_number={self.vat_number!s}, ' - f'tax_exempt={self.tax_exempt!s}, ' - f'tax_exempt_reason={self.tax_exempt_reason!s}, ' - f'parent_id={self.parent_id!s}, ' - f'salesforce_id={self.salesforce_id!s}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!s}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'address={(self.address if hasattr(self, "address") else None)!s}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!s}, ' + f'city={(self.city if hasattr(self, "city") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!s}, ' + f'country={(self.country if hasattr(self, "country") else None)!s}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!s}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!s}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!s}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!s}, ' + f'tax_exempt_reason={(self.tax_exempt_reason if hasattr(self, "tax_exempt_reason") else None)!s}, ' + f'parent_id={(self.parent_id if hasattr(self, "parent_id") else None)!s}, ' + f'salesforce_id={(self.salesforce_id if hasattr(self, "salesforce_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_invoice.py b/advancedbilling/models/create_invoice.py index db96ecc6..acc61660 100644 --- a/advancedbilling/models/create_invoice.py +++ b/advancedbilling/models/create_invoice.py @@ -164,28 +164,28 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'line_items={self.line_items!r}, ' - f'issue_date={self.issue_date!r}, ' - f'net_terms={self.net_terms!r}, ' - f'payment_instructions={self.payment_instructions!r}, ' - f'memo={self.memo!r}, ' - f'seller_address={self.seller_address!r}, ' - f'billing_address={self.billing_address!r}, ' - f'shipping_address={self.shipping_address!r}, ' - f'coupons={self.coupons!r}, ' - f'status={self.status!r}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!r}, ' + f'issue_date={(self.issue_date if hasattr(self, "issue_date") else None)!r}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!r}, ' + f'payment_instructions={(self.payment_instructions if hasattr(self, "payment_instructions") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'seller_address={(self.seller_address if hasattr(self, "seller_address") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!r}, ' + f'coupons={(self.coupons if hasattr(self, "coupons") else None)!r}, ' + f'status={(self.status if hasattr(self, "status") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'line_items={self.line_items!s}, ' - f'issue_date={self.issue_date!s}, ' - f'net_terms={self.net_terms!s}, ' - f'payment_instructions={self.payment_instructions!s}, ' - f'memo={self.memo!s}, ' - f'seller_address={self.seller_address!s}, ' - f'billing_address={self.billing_address!s}, ' - f'shipping_address={self.shipping_address!s}, ' - f'coupons={self.coupons!s}, ' - f'status={self.status!s}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!s}, ' + f'issue_date={(self.issue_date if hasattr(self, "issue_date") else None)!s}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!s}, ' + f'payment_instructions={(self.payment_instructions if hasattr(self, "payment_instructions") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'seller_address={(self.seller_address if hasattr(self, "seller_address") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!s}, ' + f'coupons={(self.coupons if hasattr(self, "coupons") else None)!s}, ' + f'status={(self.status if hasattr(self, "status") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_invoice_address.py b/advancedbilling/models/create_invoice_address.py index 94896cba..89f4e68d 100644 --- a/advancedbilling/models/create_invoice_address.py +++ b/advancedbilling/models/create_invoice_address.py @@ -137,26 +137,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'phone={self.phone!r}, ' - f'address={self.address!r}, ' - f'address_2={self.address_2!r}, ' - f'city={self.city!r}, ' - f'state={self.state!r}, ' - f'zip={self.zip!r}, ' - f'country={self.country!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!r}, ' + f'address={(self.address if hasattr(self, "address") else None)!r}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!r}, ' + f'city={(self.city if hasattr(self, "city") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!r}, ' + f'country={(self.country if hasattr(self, "country") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'phone={self.phone!s}, ' - f'address={self.address!s}, ' - f'address_2={self.address_2!s}, ' - f'city={self.city!s}, ' - f'state={self.state!s}, ' - f'zip={self.zip!s}, ' - f'country={self.country!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!s}, ' + f'address={(self.address if hasattr(self, "address") else None)!s}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!s}, ' + f'city={(self.city if hasattr(self, "city") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!s}, ' + f'country={(self.country if hasattr(self, "country") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_invoice_coupon.py b/advancedbilling/models/create_invoice_coupon.py index 9e203cf8..02add895 100644 --- a/advancedbilling/models/create_invoice_coupon.py +++ b/advancedbilling/models/create_invoice_coupon.py @@ -120,20 +120,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'code={self.code!r}, ' - f'percentage={self.percentage!r}, ' - f'amount={self.amount!r}, ' - f'description={self.description!r}, ' - f'product_family_id={self.product_family_id!r}, ' - f'compounding_strategy={self.compounding_strategy!r}, ' + f'code={(self.code if hasattr(self, "code") else None)!r}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!r}, ' + f'compounding_strategy={(self.compounding_strategy if hasattr(self, "compounding_strategy") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'code={self.code!s}, ' - f'percentage={self.percentage!s}, ' - f'amount={self.amount!s}, ' - f'description={self.description!s}, ' - f'product_family_id={self.product_family_id!s}, ' - f'compounding_strategy={self.compounding_strategy!s}, ' + f'code={(self.code if hasattr(self, "code") else None)!s}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!s}, ' + f'compounding_strategy={(self.compounding_strategy if hasattr(self, "compounding_strategy") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_invoice_item.py b/advancedbilling/models/create_invoice_item.py index bd4152fa..89fef6b0 100644 --- a/advancedbilling/models/create_invoice_item.py +++ b/advancedbilling/models/create_invoice_item.py @@ -170,32 +170,32 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'title={self.title!r}, ' - f'quantity={self.quantity!r}, ' - f'unit_price={self.unit_price!r}, ' - f'taxable={self.taxable!r}, ' - f'tax_code={self.tax_code!r}, ' - f'period_range_start={self.period_range_start!r}, ' - f'period_range_end={self.period_range_end!r}, ' - f'product_id={self.product_id!r}, ' - f'component_id={self.component_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'description={self.description!r}, ' + f'title={(self.title if hasattr(self, "title") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!r}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'title={self.title!s}, ' - f'quantity={self.quantity!s}, ' - f'unit_price={self.unit_price!s}, ' - f'taxable={self.taxable!s}, ' - f'tax_code={self.tax_code!s}, ' - f'period_range_start={self.period_range_start!s}, ' - f'period_range_end={self.period_range_end!s}, ' - f'product_id={self.product_id!s}, ' - f'component_id={self.component_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'description={self.description!s}, ' + f'title={(self.title if hasattr(self, "title") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!s}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_invoice_payment.py b/advancedbilling/models/create_invoice_payment.py index 9f3943d4..a670d08e 100644 --- a/advancedbilling/models/create_invoice_payment.py +++ b/advancedbilling/models/create_invoice_payment.py @@ -121,20 +121,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'amount={self.amount!r}, ' - f'memo={self.memo!r}, ' - f'method={self.method!r}, ' - f'details={self.details!r}, ' - f'payment_profile_id={self.payment_profile_id!r}, ' - f'received_on={self.received_on!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'method={(self.method if hasattr(self, "method") else None)!r}, ' + f'details={(self.details if hasattr(self, "details") else None)!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' + f'received_on={(self.received_on if hasattr(self, "received_on") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'amount={self.amount!s}, ' - f'memo={self.memo!s}, ' - f'method={self.method!s}, ' - f'details={self.details!s}, ' - f'payment_profile_id={self.payment_profile_id!s}, ' - f'received_on={self.received_on!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'method={(self.method if hasattr(self, "method") else None)!s}, ' + f'details={(self.details if hasattr(self, "details") else None)!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' + f'received_on={(self.received_on if hasattr(self, "received_on") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_invoice_payment_request.py b/advancedbilling/models/create_invoice_payment_request.py index 3fc25c07..74bb1574 100644 --- a/advancedbilling/models/create_invoice_payment_request.py +++ b/advancedbilling/models/create_invoice_payment_request.py @@ -81,11 +81,11 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' f'payment={self.payment!r}, ' - f'mtype={self.mtype!r}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'payment={self.payment!s}, ' - f'mtype={self.mtype!s}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_metadata.py b/advancedbilling/models/create_metadata.py index 87e41385..a0051a1a 100644 --- a/advancedbilling/models/create_metadata.py +++ b/advancedbilling/models/create_metadata.py @@ -79,12 +79,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!r}, ' - f'value={self.value!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'value={(self.value if hasattr(self, "value") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!s}, ' - f'value={self.value!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'value={(self.value if hasattr(self, "value") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_metafield.py b/advancedbilling/models/create_metafield.py index 6d859c8d..005544ef 100644 --- a/advancedbilling/models/create_metafield.py +++ b/advancedbilling/models/create_metafield.py @@ -126,16 +126,16 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!r}, ' - f'scope={self.scope!r}, ' - f'input_type={self.input_type!r}, ' - f'enum={self.enum!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'scope={(self.scope if hasattr(self, "scope") else None)!r}, ' + f'input_type={(self.input_type if hasattr(self, "input_type") else None)!r}, ' + f'enum={(self.enum if hasattr(self, "enum") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!s}, ' - f'scope={self.scope!s}, ' - f'input_type={self.input_type!s}, ' - f'enum={self.enum!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'scope={(self.scope if hasattr(self, "scope") else None)!s}, ' + f'input_type={(self.input_type if hasattr(self, "input_type") else None)!s}, ' + f'enum={(self.enum if hasattr(self, "enum") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_multi_invoice_payment.py b/advancedbilling/models/create_multi_invoice_payment.py index 3e348f26..4b217db9 100644 --- a/advancedbilling/models/create_multi_invoice_payment.py +++ b/advancedbilling/models/create_multi_invoice_payment.py @@ -147,20 +147,20 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'memo={self.memo!r}, ' - f'details={self.details!r}, ' - f'method={self.method!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'details={(self.details if hasattr(self, "details") else None)!r}, ' + f'method={(self.method if hasattr(self, "method") else None)!r}, ' f'amount={self.amount!r}, ' - f'received_on={self.received_on!r}, ' + f'received_on={(self.received_on if hasattr(self, "received_on") else None)!r}, ' f'applications={self.applications!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'memo={self.memo!s}, ' - f'details={self.details!s}, ' - f'method={self.method!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'details={(self.details if hasattr(self, "details") else None)!s}, ' + f'method={(self.method if hasattr(self, "method") else None)!s}, ' f'amount={self.amount!s}, ' - f'received_on={self.received_on!s}, ' + f'received_on={(self.received_on if hasattr(self, "received_on") else None)!s}, ' f'applications={self.applications!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_offer.py b/advancedbilling/models/create_offer.py index e349eaaf..1dc38710 100644 --- a/advancedbilling/models/create_offer.py +++ b/advancedbilling/models/create_offer.py @@ -121,20 +121,20 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' f'handle={self.handle!r}, ' - f'description={self.description!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' f'product_id={self.product_id!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'components={self.components!r}, ' - f'coupons={self.coupons!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'components={(self.components if hasattr(self, "components") else None)!r}, ' + f'coupons={(self.coupons if hasattr(self, "coupons") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' f'handle={self.handle!s}, ' - f'description={self.description!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' f'product_id={self.product_id!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'components={self.components!s}, ' - f'coupons={self.coupons!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'components={(self.components if hasattr(self, "components") else None)!s}, ' + f'coupons={(self.coupons if hasattr(self, "coupons") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_offer_component.py b/advancedbilling/models/create_offer_component.py index ed64f3f1..fe57c57b 100644 --- a/advancedbilling/models/create_offer_component.py +++ b/advancedbilling/models/create_offer_component.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'starting_quantity={self.starting_quantity!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'starting_quantity={self.starting_quantity!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_or_update_product.py b/advancedbilling/models/create_or_update_product.py index b6f3b81f..a11f8d94 100644 --- a/advancedbilling/models/create_or_update_product.py +++ b/advancedbilling/models/create_or_update_product.py @@ -203,39 +203,39 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' - f'handle={self.handle!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' f'description={self.description!r}, ' - f'accounting_code={self.accounting_code!r}, ' - f'require_credit_card={self.require_credit_card!r}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!r}, ' + f'require_credit_card={(self.require_credit_card if hasattr(self, "require_credit_card") else None)!r}, ' f'price_in_cents={self.price_in_cents!r}, ' f'interval={self.interval!r}, ' f'interval_unit={self.interval_unit!r}, ' - f'trial_price_in_cents={self.trial_price_in_cents!r}, ' - f'trial_interval={self.trial_interval!r}, ' - f'trial_interval_unit={self.trial_interval_unit!r}, ' - f'trial_type={self.trial_type!r}, ' - f'expiration_interval={self.expiration_interval!r}, ' - f'expiration_interval_unit={self.expiration_interval_unit!r}, ' - f'auto_create_signup_page={self.auto_create_signup_page!r}, ' - f'tax_code={self.tax_code!r}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!r}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!r}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!r}, ' + f'trial_type={(self.trial_type if hasattr(self, "trial_type") else None)!r}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!r}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!r}, ' + f'auto_create_signup_page={(self.auto_create_signup_page if hasattr(self, "auto_create_signup_page") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' - f'handle={self.handle!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' f'description={self.description!s}, ' - f'accounting_code={self.accounting_code!s}, ' - f'require_credit_card={self.require_credit_card!s}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!s}, ' + f'require_credit_card={(self.require_credit_card if hasattr(self, "require_credit_card") else None)!s}, ' f'price_in_cents={self.price_in_cents!s}, ' f'interval={self.interval!s}, ' f'interval_unit={self.interval_unit!s}, ' - f'trial_price_in_cents={self.trial_price_in_cents!s}, ' - f'trial_interval={self.trial_interval!s}, ' - f'trial_interval_unit={self.trial_interval_unit!s}, ' - f'trial_type={self.trial_type!s}, ' - f'expiration_interval={self.expiration_interval!s}, ' - f'expiration_interval_unit={self.expiration_interval_unit!s}, ' - f'auto_create_signup_page={self.auto_create_signup_page!s}, ' - f'tax_code={self.tax_code!s}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!s}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!s}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!s}, ' + f'trial_type={(self.trial_type if hasattr(self, "trial_type") else None)!s}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!s}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!s}, ' + f'auto_create_signup_page={(self.auto_create_signup_page if hasattr(self, "auto_create_signup_page") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_or_update_segment_price.py b/advancedbilling/models/create_or_update_segment_price.py index 1767bd99..cafdf045 100644 --- a/advancedbilling/models/create_or_update_segment_price.py +++ b/advancedbilling/models/create_or_update_segment_price.py @@ -110,14 +110,14 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'starting_quantity={self.starting_quantity!r}, ' - f'ending_quantity={self.ending_quantity!r}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!r}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!r}, ' f'unit_price={self.unit_price!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'starting_quantity={self.starting_quantity!s}, ' - f'ending_quantity={self.ending_quantity!s}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!s}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!s}, ' f'unit_price={self.unit_price!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_payment_profile.py b/advancedbilling/models/create_payment_profile.py index 2fe5c722..947d9f7c 100644 --- a/advancedbilling/models/create_payment_profile.py +++ b/advancedbilling/models/create_payment_profile.py @@ -379,72 +379,72 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'chargify_token={self.chargify_token!r}, ' - f'id={self.id!r}, ' - f'payment_type={self.payment_type!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'masked_card_number={self.masked_card_number!r}, ' - f'full_number={self.full_number!r}, ' - f'card_type={self.card_type!r}, ' - f'expiration_month={self.expiration_month!r}, ' - f'expiration_year={self.expiration_year!r}, ' - f'billing_address={self.billing_address!r}, ' - f'billing_address_2={self.billing_address_2!r}, ' - f'billing_city={self.billing_city!r}, ' - f'billing_state={self.billing_state!r}, ' - f'billing_country={self.billing_country!r}, ' - f'billing_zip={self.billing_zip!r}, ' - f'current_vault={self.current_vault!r}, ' - f'vault_token={self.vault_token!r}, ' - f'customer_vault_token={self.customer_vault_token!r}, ' - f'customer_id={self.customer_id!r}, ' - f'paypal_email={self.paypal_email!r}, ' - f'payment_method_nonce={self.payment_method_nonce!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' - f'cvv={self.cvv!r}, ' - f'bank_name={self.bank_name!r}, ' - f'bank_iban={self.bank_iban!r}, ' - f'bank_routing_number={self.bank_routing_number!r}, ' - f'bank_account_number={self.bank_account_number!r}, ' - f'bank_branch_code={self.bank_branch_code!r}, ' - f'bank_account_type={self.bank_account_type!r}, ' - f'bank_account_holder_type={self.bank_account_holder_type!r}, ' - f'last_four={self.last_four!r}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!r}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!r}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!r}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!r}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!r}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!r}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!r}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!r}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!r}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'paypal_email={(self.paypal_email if hasattr(self, "paypal_email") else None)!r}, ' + f'payment_method_nonce={(self.payment_method_nonce if hasattr(self, "payment_method_nonce") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' + f'cvv={(self.cvv if hasattr(self, "cvv") else None)!r}, ' + f'bank_name={(self.bank_name if hasattr(self, "bank_name") else None)!r}, ' + f'bank_iban={(self.bank_iban if hasattr(self, "bank_iban") else None)!r}, ' + f'bank_routing_number={(self.bank_routing_number if hasattr(self, "bank_routing_number") else None)!r}, ' + f'bank_account_number={(self.bank_account_number if hasattr(self, "bank_account_number") else None)!r}, ' + f'bank_branch_code={(self.bank_branch_code if hasattr(self, "bank_branch_code") else None)!r}, ' + f'bank_account_type={(self.bank_account_type if hasattr(self, "bank_account_type") else None)!r}, ' + f'bank_account_holder_type={(self.bank_account_holder_type if hasattr(self, "bank_account_holder_type") else None)!r}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'chargify_token={self.chargify_token!s}, ' - f'id={self.id!s}, ' - f'payment_type={self.payment_type!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'masked_card_number={self.masked_card_number!s}, ' - f'full_number={self.full_number!s}, ' - f'card_type={self.card_type!s}, ' - f'expiration_month={self.expiration_month!s}, ' - f'expiration_year={self.expiration_year!s}, ' - f'billing_address={self.billing_address!s}, ' - f'billing_address_2={self.billing_address_2!s}, ' - f'billing_city={self.billing_city!s}, ' - f'billing_state={self.billing_state!s}, ' - f'billing_country={self.billing_country!s}, ' - f'billing_zip={self.billing_zip!s}, ' - f'current_vault={self.current_vault!s}, ' - f'vault_token={self.vault_token!s}, ' - f'customer_vault_token={self.customer_vault_token!s}, ' - f'customer_id={self.customer_id!s}, ' - f'paypal_email={self.paypal_email!s}, ' - f'payment_method_nonce={self.payment_method_nonce!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' - f'cvv={self.cvv!s}, ' - f'bank_name={self.bank_name!s}, ' - f'bank_iban={self.bank_iban!s}, ' - f'bank_routing_number={self.bank_routing_number!s}, ' - f'bank_account_number={self.bank_account_number!s}, ' - f'bank_branch_code={self.bank_branch_code!s}, ' - f'bank_account_type={self.bank_account_type!s}, ' - f'bank_account_holder_type={self.bank_account_holder_type!s}, ' - f'last_four={self.last_four!s}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!s}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!s}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!s}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!s}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!s}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!s}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!s}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!s}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!s}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'paypal_email={(self.paypal_email if hasattr(self, "paypal_email") else None)!s}, ' + f'payment_method_nonce={(self.payment_method_nonce if hasattr(self, "payment_method_nonce") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' + f'cvv={(self.cvv if hasattr(self, "cvv") else None)!s}, ' + f'bank_name={(self.bank_name if hasattr(self, "bank_name") else None)!s}, ' + f'bank_iban={(self.bank_iban if hasattr(self, "bank_iban") else None)!s}, ' + f'bank_routing_number={(self.bank_routing_number if hasattr(self, "bank_routing_number") else None)!s}, ' + f'bank_account_number={(self.bank_account_number if hasattr(self, "bank_account_number") else None)!s}, ' + f'bank_branch_code={(self.bank_branch_code if hasattr(self, "bank_branch_code") else None)!s}, ' + f'bank_account_type={(self.bank_account_type if hasattr(self, "bank_account_type") else None)!s}, ' + f'bank_account_holder_type={(self.bank_account_holder_type if hasattr(self, "bank_account_holder_type") else None)!s}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_prepaid_usage_component_price_point.py b/advancedbilling/models/create_prepaid_usage_component_price_point.py index 89c41af5..4bbc1e37 100644 --- a/advancedbilling/models/create_prepaid_usage_component_price_point.py +++ b/advancedbilling/models/create_prepaid_usage_component_price_point.py @@ -202,27 +202,27 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' - f'handle={self.handle!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' f'pricing_scheme={self.pricing_scheme!r}, ' f'prices={self.prices!r}, ' f'overage_pricing={self.overage_pricing!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'rollover_prepaid_remainder={self.rollover_prepaid_remainder!r}, ' - f'renew_prepaid_allocation={self.renew_prepaid_allocation!r}, ' - f'expiration_interval={self.expiration_interval!r}, ' - f'expiration_interval_unit={self.expiration_interval_unit!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'rollover_prepaid_remainder={(self.rollover_prepaid_remainder if hasattr(self, "rollover_prepaid_remainder") else None)!r}, ' + f'renew_prepaid_allocation={(self.renew_prepaid_allocation if hasattr(self, "renew_prepaid_allocation") else None)!r}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!r}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' - f'handle={self.handle!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' f'pricing_scheme={self.pricing_scheme!s}, ' f'prices={self.prices!s}, ' f'overage_pricing={self.overage_pricing!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'rollover_prepaid_remainder={self.rollover_prepaid_remainder!s}, ' - f'renew_prepaid_allocation={self.renew_prepaid_allocation!s}, ' - f'expiration_interval={self.expiration_interval!s}, ' - f'expiration_interval_unit={self.expiration_interval_unit!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'rollover_prepaid_remainder={(self.rollover_prepaid_remainder if hasattr(self, "rollover_prepaid_remainder") else None)!s}, ' + f'renew_prepaid_allocation={(self.renew_prepaid_allocation if hasattr(self, "renew_prepaid_allocation") else None)!s}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!s}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_prepayment.py b/advancedbilling/models/create_prepayment.py index 9a5f6f29..13ec2a73 100644 --- a/advancedbilling/models/create_prepayment.py +++ b/advancedbilling/models/create_prepayment.py @@ -103,7 +103,7 @@ def __repr__(self): f'details={self.details!r}, ' f'memo={self.memo!r}, ' f'method={self.method!r}, ' - f'payment_profile_id={self.payment_profile_id!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): @@ -112,5 +112,5 @@ def __str__(self): f'details={self.details!s}, ' f'memo={self.memo!s}, ' f'method={self.method!s}, ' - f'payment_profile_id={self.payment_profile_id!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_product_family.py b/advancedbilling/models/create_product_family.py index a96be573..abe397cf 100644 --- a/advancedbilling/models/create_product_family.py +++ b/advancedbilling/models/create_product_family.py @@ -91,13 +91,13 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' - f'handle={self.handle!r}, ' - f'description={self.description!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' - f'handle={self.handle!s}, ' - f'description={self.description!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_product_price_point.py b/advancedbilling/models/create_product_price_point.py index 43701936..0ab9a807 100644 --- a/advancedbilling/models/create_product_price_point.py +++ b/advancedbilling/models/create_product_price_point.py @@ -186,35 +186,35 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' - f'handle={self.handle!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' f'price_in_cents={self.price_in_cents!r}, ' f'interval={self.interval!r}, ' f'interval_unit={self.interval_unit!r}, ' - f'trial_price_in_cents={self.trial_price_in_cents!r}, ' - f'trial_interval={self.trial_interval!r}, ' - f'trial_interval_unit={self.trial_interval_unit!r}, ' - f'trial_type={self.trial_type!r}, ' - f'initial_charge_in_cents={self.initial_charge_in_cents!r}, ' - f'initial_charge_after_trial={self.initial_charge_after_trial!r}, ' - f'expiration_interval={self.expiration_interval!r}, ' - f'expiration_interval_unit={self.expiration_interval_unit!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!r}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!r}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!r}, ' + f'trial_type={(self.trial_type if hasattr(self, "trial_type") else None)!r}, ' + f'initial_charge_in_cents={(self.initial_charge_in_cents if hasattr(self, "initial_charge_in_cents") else None)!r}, ' + f'initial_charge_after_trial={(self.initial_charge_after_trial if hasattr(self, "initial_charge_after_trial") else None)!r}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!r}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' - f'handle={self.handle!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' f'price_in_cents={self.price_in_cents!s}, ' f'interval={self.interval!s}, ' f'interval_unit={self.interval_unit!s}, ' - f'trial_price_in_cents={self.trial_price_in_cents!s}, ' - f'trial_interval={self.trial_interval!s}, ' - f'trial_interval_unit={self.trial_interval_unit!s}, ' - f'trial_type={self.trial_type!s}, ' - f'initial_charge_in_cents={self.initial_charge_in_cents!s}, ' - f'initial_charge_after_trial={self.initial_charge_after_trial!s}, ' - f'expiration_interval={self.expiration_interval!s}, ' - f'expiration_interval_unit={self.expiration_interval_unit!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!s}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!s}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!s}, ' + f'trial_type={(self.trial_type if hasattr(self, "trial_type") else None)!s}, ' + f'initial_charge_in_cents={(self.initial_charge_in_cents if hasattr(self, "initial_charge_in_cents") else None)!s}, ' + f'initial_charge_after_trial={(self.initial_charge_after_trial if hasattr(self, "initial_charge_after_trial") else None)!s}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!s}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_reason_code.py b/advancedbilling/models/create_reason_code.py index d256cea3..f99da787 100644 --- a/advancedbilling/models/create_reason_code.py +++ b/advancedbilling/models/create_reason_code.py @@ -85,12 +85,12 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'code={self.code!r}, ' f'description={self.description!r}, ' - f'position={self.position!r}, ' + f'position={(self.position if hasattr(self, "position") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'code={self.code!s}, ' f'description={self.description!s}, ' - f'position={self.position!s}, ' + f'position={(self.position if hasattr(self, "position") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_segment.py b/advancedbilling/models/create_segment.py index feab2c5e..a873ec2b 100644 --- a/advancedbilling/models/create_segment.py +++ b/advancedbilling/models/create_segment.py @@ -131,20 +131,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'segment_property_1_value={self.segment_property_1_value!r}, ' - f'segment_property_2_value={self.segment_property_2_value!r}, ' - f'segment_property_3_value={self.segment_property_3_value!r}, ' - f'segment_property_4_value={self.segment_property_4_value!r}, ' + f'segment_property_1_value={(self.segment_property_1_value if hasattr(self, "segment_property_1_value") else None)!r}, ' + f'segment_property_2_value={(self.segment_property_2_value if hasattr(self, "segment_property_2_value") else None)!r}, ' + f'segment_property_3_value={(self.segment_property_3_value if hasattr(self, "segment_property_3_value") else None)!r}, ' + f'segment_property_4_value={(self.segment_property_4_value if hasattr(self, "segment_property_4_value") else None)!r}, ' f'pricing_scheme={self.pricing_scheme!r}, ' - f'prices={self.prices!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'segment_property_1_value={self.segment_property_1_value!s}, ' - f'segment_property_2_value={self.segment_property_2_value!s}, ' - f'segment_property_3_value={self.segment_property_3_value!s}, ' - f'segment_property_4_value={self.segment_property_4_value!s}, ' + f'segment_property_1_value={(self.segment_property_1_value if hasattr(self, "segment_property_1_value") else None)!s}, ' + f'segment_property_2_value={(self.segment_property_2_value if hasattr(self, "segment_property_2_value") else None)!s}, ' + f'segment_property_3_value={(self.segment_property_3_value if hasattr(self, "segment_property_3_value") else None)!s}, ' + f'segment_property_4_value={(self.segment_property_4_value if hasattr(self, "segment_property_4_value") else None)!s}, ' f'pricing_scheme={self.pricing_scheme!s}, ' - f'prices={self.prices!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_subscription.py b/advancedbilling/models/create_subscription.py index 8c4560ba..0a16396a 100644 --- a/advancedbilling/models/create_subscription.py +++ b/advancedbilling/models/create_subscription.py @@ -73,21 +73,31 @@ class CreateSubscription(object): subscription will not be created. See further notes in the section on Importing Subscriptions. initial_billing_at (datetime): (Optional) Set this attribute to a - future date/time to create a subscription in the "Awaiting Signup" - state, rather than "Active" or "Trialing". See the notes on - “Date/Time Format” in our [subscription import - documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489 - 107213-Advanced-Billing-Subscription-Imports#date-format). In the - "Awaiting Signup" state, a subscription behaves like any other. It - can be canceled, allocated to, had its billing date changed. etc. - When the initial_billing_at date hits, the subscription will - transition to the expected state. If the product has a trial, the - subscription will enter a trial, otherwise it will go active. - Setup fees will be respected either before or after the trial, as - configured on the price point. If the payment is due at the - initial_billing_at and it fails the subscription will be - immediately canceled. See further notes in the section on Delayed - Signups. + future date/time to create a subscription in the Awaiting Signup + state, rather than Active or Trialing. You can omit the + initial_billing_at date to activate the subscription immediately. + In the Awaiting Signup state, a subscription behaves like any + other. It can be canceled, allocated to, or have its billing date + changed. etc. When the initial_billing_at date hits, the + subscription will transition to the expected state. If the product + has a trial, the subscription will enter a trial, otherwise it + will go active. Setup fees will be respected either before or + after the trial, as configured on the price point. If the payment + is due at the initial_billing_at and it fails the subscription + will be immediately canceled. See the [subscription + import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213- + Advanced-Billing-Subscription-Imports#date-format) documentation + for more information about Date/Time Formats. + defer_signup (bool): (Optional) Set this attribute to true to create + the subscription in the Awaiting Signup Date state. Use this when + you want to create a subscription that has an unknown first + billing date. When the first billing date is known, update a + subscription and set the `initial_billing_at` date. The + subscription moves to the Awaiting Signup state with a scheduled + initial billing date. You can omit the initial_billing_at date to + activate the subscription immediately. See [Subscription + States](https://maxio-chargify.zendesk.com/hc/en-us/articles/540422 + 2005773-Subscription-States) for more information. stored_credential_transaction_id (int): For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be @@ -103,7 +113,7 @@ class CreateSubscription(object): an existing subscription via the API as `credit_card` > id or `bank_account` > id) reference (str): The reference value (provided by your app) for the - subscription itelf. + subscription itself. customer_attributes (CustomerAttributes): The model property of type CustomerAttributes. payment_profile_attributes (PaymentProfileAttributes): alias to @@ -165,7 +175,7 @@ class CreateSubscription(object): reason_code (str): (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to indicate why a subscription was canceled. - product_change_delayed (bool): (Optional, used only for Delayed + product_change_delayed (bool): (Optional) used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. @@ -222,6 +232,7 @@ class CreateSubscription(object): "customer_id": 'customer_id', "next_billing_at": 'next_billing_at', "initial_billing_at": 'initial_billing_at', + "defer_signup": 'defer_signup', "stored_credential_transaction_id": 'stored_credential_transaction_id', "sales_rep_id": 'sales_rep_id', "payment_profile_id": 'payment_profile_id', @@ -274,6 +285,7 @@ class CreateSubscription(object): 'customer_id', 'next_billing_at', 'initial_billing_at', + 'defer_signup', 'stored_credential_transaction_id', 'sales_rep_id', 'payment_profile_id', @@ -330,6 +342,7 @@ def __init__(self, customer_id=APIHelper.SKIP, next_billing_at=APIHelper.SKIP, initial_billing_at=APIHelper.SKIP, + defer_signup=False, stored_credential_transaction_id=APIHelper.SKIP, sales_rep_id=APIHelper.SKIP, payment_profile_id=APIHelper.SKIP, @@ -396,6 +409,7 @@ def __init__(self, self.next_billing_at = APIHelper.apply_datetime_converter(next_billing_at, APIHelper.RFC3339DateTime) if next_billing_at else None if initial_billing_at is not APIHelper.SKIP: self.initial_billing_at = APIHelper.apply_datetime_converter(initial_billing_at, APIHelper.RFC3339DateTime) if initial_billing_at else None + self.defer_signup = defer_signup if stored_credential_transaction_id is not APIHelper.SKIP: self.stored_credential_transaction_id = stored_credential_transaction_id if sales_rep_id is not APIHelper.SKIP: @@ -505,6 +519,7 @@ def from_dictionary(cls, customer_id = dictionary.get("customer_id") if dictionary.get("customer_id") else APIHelper.SKIP next_billing_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("next_billing_at")).datetime if dictionary.get("next_billing_at") else APIHelper.SKIP initial_billing_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("initial_billing_at")).datetime if dictionary.get("initial_billing_at") else APIHelper.SKIP + defer_signup = dictionary.get("defer_signup") if dictionary.get("defer_signup") else False stored_credential_transaction_id = dictionary.get("stored_credential_transaction_id") if dictionary.get("stored_credential_transaction_id") else APIHelper.SKIP sales_rep_id = dictionary.get("sales_rep_id") if dictionary.get("sales_rep_id") else APIHelper.SKIP payment_profile_id = dictionary.get("payment_profile_id") if dictionary.get("payment_profile_id") else APIHelper.SKIP @@ -561,6 +576,7 @@ def from_dictionary(cls, customer_id, next_billing_at, initial_billing_at, + defer_signup, stored_credential_transaction_id, sales_rep_id, payment_profile_id, @@ -601,106 +617,108 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'product_handle={self.product_handle!r}, ' - f'product_id={self.product_id!r}, ' - f'product_price_point_handle={self.product_price_point_handle!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'custom_price={self.custom_price!r}, ' - f'coupon_code={self.coupon_code!r}, ' - f'coupon_codes={self.coupon_codes!r}, ' - f'payment_collection_method={self.payment_collection_method!r}, ' - f'receives_invoice_emails={self.receives_invoice_emails!r}, ' - f'net_terms={self.net_terms!r}, ' - f'customer_id={self.customer_id!r}, ' - f'next_billing_at={self.next_billing_at!r}, ' - f'initial_billing_at={self.initial_billing_at!r}, ' - f'stored_credential_transaction_id={self.stored_credential_transaction_id!r}, ' - f'sales_rep_id={self.sales_rep_id!r}, ' - f'payment_profile_id={self.payment_profile_id!r}, ' - f'reference={self.reference!r}, ' - f'customer_attributes={self.customer_attributes!r}, ' - f'payment_profile_attributes={self.payment_profile_attributes!r}, ' - f'credit_card_attributes={self.credit_card_attributes!r}, ' - f'bank_account_attributes={self.bank_account_attributes!r}, ' - f'components={self.components!r}, ' - f'calendar_billing={self.calendar_billing!r}, ' - f'metafields={self.metafields!r}, ' - f'customer_reference={self.customer_reference!r}, ' - f'group={self.group!r}, ' - f'ref={self.ref!r}, ' - f'cancellation_message={self.cancellation_message!r}, ' - f'cancellation_method={self.cancellation_method!r}, ' - f'currency={self.currency!r}, ' - f'expires_at={self.expires_at!r}, ' - f'expiration_tracks_next_billing_change={self.expiration_tracks_next_billing_change!r}, ' - f'agreement_terms={self.agreement_terms!r}, ' - f'authorizer_first_name={self.authorizer_first_name!r}, ' - f'authorizer_last_name={self.authorizer_last_name!r}, ' - f'calendar_billing_first_charge={self.calendar_billing_first_charge!r}, ' - f'reason_code={self.reason_code!r}, ' - f'product_change_delayed={self.product_change_delayed!r}, ' - f'offer_id={self.offer_id!r}, ' - f'prepaid_configuration={self.prepaid_configuration!r}, ' - f'previous_billing_at={self.previous_billing_at!r}, ' - f'import_mrr={self.import_mrr!r}, ' - f'canceled_at={self.canceled_at!r}, ' - f'activated_at={self.activated_at!r}, ' - f'agreement_acceptance={self.agreement_acceptance!r}, ' - f'ach_agreement={self.ach_agreement!r}, ' - f'dunning_communication_delay_enabled={self.dunning_communication_delay_enabled!r}, ' - f'dunning_communication_delay_time_zone={self.dunning_communication_delay_time_zone!r}, ' - f'skip_billing_manifest_taxes={self.skip_billing_manifest_taxes!r}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!r}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!r}, ' + f'coupon_codes={(self.coupon_codes if hasattr(self, "coupon_codes") else None)!r}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!r}, ' + f'receives_invoice_emails={(self.receives_invoice_emails if hasattr(self, "receives_invoice_emails") else None)!r}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'next_billing_at={(self.next_billing_at if hasattr(self, "next_billing_at") else None)!r}, ' + f'initial_billing_at={(self.initial_billing_at if hasattr(self, "initial_billing_at") else None)!r}, ' + f'defer_signup={(self.defer_signup if hasattr(self, "defer_signup") else None)!r}, ' + f'stored_credential_transaction_id={(self.stored_credential_transaction_id if hasattr(self, "stored_credential_transaction_id") else None)!r}, ' + f'sales_rep_id={(self.sales_rep_id if hasattr(self, "sales_rep_id") else None)!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'customer_attributes={(self.customer_attributes if hasattr(self, "customer_attributes") else None)!r}, ' + f'payment_profile_attributes={(self.payment_profile_attributes if hasattr(self, "payment_profile_attributes") else None)!r}, ' + f'credit_card_attributes={(self.credit_card_attributes if hasattr(self, "credit_card_attributes") else None)!r}, ' + f'bank_account_attributes={(self.bank_account_attributes if hasattr(self, "bank_account_attributes") else None)!r}, ' + f'components={(self.components if hasattr(self, "components") else None)!r}, ' + f'calendar_billing={(self.calendar_billing if hasattr(self, "calendar_billing") else None)!r}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!r}, ' + f'customer_reference={(self.customer_reference if hasattr(self, "customer_reference") else None)!r}, ' + f'group={(self.group if hasattr(self, "group") else None)!r}, ' + f'ref={(self.ref if hasattr(self, "ref") else None)!r}, ' + f'cancellation_message={(self.cancellation_message if hasattr(self, "cancellation_message") else None)!r}, ' + f'cancellation_method={(self.cancellation_method if hasattr(self, "cancellation_method") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!r}, ' + f'expiration_tracks_next_billing_change={(self.expiration_tracks_next_billing_change if hasattr(self, "expiration_tracks_next_billing_change") else None)!r}, ' + f'agreement_terms={(self.agreement_terms if hasattr(self, "agreement_terms") else None)!r}, ' + f'authorizer_first_name={(self.authorizer_first_name if hasattr(self, "authorizer_first_name") else None)!r}, ' + f'authorizer_last_name={(self.authorizer_last_name if hasattr(self, "authorizer_last_name") else None)!r}, ' + f'calendar_billing_first_charge={(self.calendar_billing_first_charge if hasattr(self, "calendar_billing_first_charge") else None)!r}, ' + f'reason_code={(self.reason_code if hasattr(self, "reason_code") else None)!r}, ' + f'product_change_delayed={(self.product_change_delayed if hasattr(self, "product_change_delayed") else None)!r}, ' + f'offer_id={(self.offer_id if hasattr(self, "offer_id") else None)!r}, ' + f'prepaid_configuration={(self.prepaid_configuration if hasattr(self, "prepaid_configuration") else None)!r}, ' + f'previous_billing_at={(self.previous_billing_at if hasattr(self, "previous_billing_at") else None)!r}, ' + f'import_mrr={(self.import_mrr if hasattr(self, "import_mrr") else None)!r}, ' + f'canceled_at={(self.canceled_at if hasattr(self, "canceled_at") else None)!r}, ' + f'activated_at={(self.activated_at if hasattr(self, "activated_at") else None)!r}, ' + f'agreement_acceptance={(self.agreement_acceptance if hasattr(self, "agreement_acceptance") else None)!r}, ' + f'ach_agreement={(self.ach_agreement if hasattr(self, "ach_agreement") else None)!r}, ' + f'dunning_communication_delay_enabled={(self.dunning_communication_delay_enabled if hasattr(self, "dunning_communication_delay_enabled") else None)!r}, ' + f'dunning_communication_delay_time_zone={(self.dunning_communication_delay_time_zone if hasattr(self, "dunning_communication_delay_time_zone") else None)!r}, ' + f'skip_billing_manifest_taxes={(self.skip_billing_manifest_taxes if hasattr(self, "skip_billing_manifest_taxes") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'product_handle={self.product_handle!s}, ' - f'product_id={self.product_id!s}, ' - f'product_price_point_handle={self.product_price_point_handle!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'custom_price={self.custom_price!s}, ' - f'coupon_code={self.coupon_code!s}, ' - f'coupon_codes={self.coupon_codes!s}, ' - f'payment_collection_method={self.payment_collection_method!s}, ' - f'receives_invoice_emails={self.receives_invoice_emails!s}, ' - f'net_terms={self.net_terms!s}, ' - f'customer_id={self.customer_id!s}, ' - f'next_billing_at={self.next_billing_at!s}, ' - f'initial_billing_at={self.initial_billing_at!s}, ' - f'stored_credential_transaction_id={self.stored_credential_transaction_id!s}, ' - f'sales_rep_id={self.sales_rep_id!s}, ' - f'payment_profile_id={self.payment_profile_id!s}, ' - f'reference={self.reference!s}, ' - f'customer_attributes={self.customer_attributes!s}, ' - f'payment_profile_attributes={self.payment_profile_attributes!s}, ' - f'credit_card_attributes={self.credit_card_attributes!s}, ' - f'bank_account_attributes={self.bank_account_attributes!s}, ' - f'components={self.components!s}, ' - f'calendar_billing={self.calendar_billing!s}, ' - f'metafields={self.metafields!s}, ' - f'customer_reference={self.customer_reference!s}, ' - f'group={self.group!s}, ' - f'ref={self.ref!s}, ' - f'cancellation_message={self.cancellation_message!s}, ' - f'cancellation_method={self.cancellation_method!s}, ' - f'currency={self.currency!s}, ' - f'expires_at={self.expires_at!s}, ' - f'expiration_tracks_next_billing_change={self.expiration_tracks_next_billing_change!s}, ' - f'agreement_terms={self.agreement_terms!s}, ' - f'authorizer_first_name={self.authorizer_first_name!s}, ' - f'authorizer_last_name={self.authorizer_last_name!s}, ' - f'calendar_billing_first_charge={self.calendar_billing_first_charge!s}, ' - f'reason_code={self.reason_code!s}, ' - f'product_change_delayed={self.product_change_delayed!s}, ' - f'offer_id={self.offer_id!s}, ' - f'prepaid_configuration={self.prepaid_configuration!s}, ' - f'previous_billing_at={self.previous_billing_at!s}, ' - f'import_mrr={self.import_mrr!s}, ' - f'canceled_at={self.canceled_at!s}, ' - f'activated_at={self.activated_at!s}, ' - f'agreement_acceptance={self.agreement_acceptance!s}, ' - f'ach_agreement={self.ach_agreement!s}, ' - f'dunning_communication_delay_enabled={self.dunning_communication_delay_enabled!s}, ' - f'dunning_communication_delay_time_zone={self.dunning_communication_delay_time_zone!s}, ' - f'skip_billing_manifest_taxes={self.skip_billing_manifest_taxes!s}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!s}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!s}, ' + f'coupon_codes={(self.coupon_codes if hasattr(self, "coupon_codes") else None)!s}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!s}, ' + f'receives_invoice_emails={(self.receives_invoice_emails if hasattr(self, "receives_invoice_emails") else None)!s}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'next_billing_at={(self.next_billing_at if hasattr(self, "next_billing_at") else None)!s}, ' + f'initial_billing_at={(self.initial_billing_at if hasattr(self, "initial_billing_at") else None)!s}, ' + f'defer_signup={(self.defer_signup if hasattr(self, "defer_signup") else None)!s}, ' + f'stored_credential_transaction_id={(self.stored_credential_transaction_id if hasattr(self, "stored_credential_transaction_id") else None)!s}, ' + f'sales_rep_id={(self.sales_rep_id if hasattr(self, "sales_rep_id") else None)!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'customer_attributes={(self.customer_attributes if hasattr(self, "customer_attributes") else None)!s}, ' + f'payment_profile_attributes={(self.payment_profile_attributes if hasattr(self, "payment_profile_attributes") else None)!s}, ' + f'credit_card_attributes={(self.credit_card_attributes if hasattr(self, "credit_card_attributes") else None)!s}, ' + f'bank_account_attributes={(self.bank_account_attributes if hasattr(self, "bank_account_attributes") else None)!s}, ' + f'components={(self.components if hasattr(self, "components") else None)!s}, ' + f'calendar_billing={(self.calendar_billing if hasattr(self, "calendar_billing") else None)!s}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!s}, ' + f'customer_reference={(self.customer_reference if hasattr(self, "customer_reference") else None)!s}, ' + f'group={(self.group if hasattr(self, "group") else None)!s}, ' + f'ref={(self.ref if hasattr(self, "ref") else None)!s}, ' + f'cancellation_message={(self.cancellation_message if hasattr(self, "cancellation_message") else None)!s}, ' + f'cancellation_method={(self.cancellation_method if hasattr(self, "cancellation_method") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!s}, ' + f'expiration_tracks_next_billing_change={(self.expiration_tracks_next_billing_change if hasattr(self, "expiration_tracks_next_billing_change") else None)!s}, ' + f'agreement_terms={(self.agreement_terms if hasattr(self, "agreement_terms") else None)!s}, ' + f'authorizer_first_name={(self.authorizer_first_name if hasattr(self, "authorizer_first_name") else None)!s}, ' + f'authorizer_last_name={(self.authorizer_last_name if hasattr(self, "authorizer_last_name") else None)!s}, ' + f'calendar_billing_first_charge={(self.calendar_billing_first_charge if hasattr(self, "calendar_billing_first_charge") else None)!s}, ' + f'reason_code={(self.reason_code if hasattr(self, "reason_code") else None)!s}, ' + f'product_change_delayed={(self.product_change_delayed if hasattr(self, "product_change_delayed") else None)!s}, ' + f'offer_id={(self.offer_id if hasattr(self, "offer_id") else None)!s}, ' + f'prepaid_configuration={(self.prepaid_configuration if hasattr(self, "prepaid_configuration") else None)!s}, ' + f'previous_billing_at={(self.previous_billing_at if hasattr(self, "previous_billing_at") else None)!s}, ' + f'import_mrr={(self.import_mrr if hasattr(self, "import_mrr") else None)!s}, ' + f'canceled_at={(self.canceled_at if hasattr(self, "canceled_at") else None)!s}, ' + f'activated_at={(self.activated_at if hasattr(self, "activated_at") else None)!s}, ' + f'agreement_acceptance={(self.agreement_acceptance if hasattr(self, "agreement_acceptance") else None)!s}, ' + f'ach_agreement={(self.ach_agreement if hasattr(self, "ach_agreement") else None)!s}, ' + f'dunning_communication_delay_enabled={(self.dunning_communication_delay_enabled if hasattr(self, "dunning_communication_delay_enabled") else None)!s}, ' + f'dunning_communication_delay_time_zone={(self.dunning_communication_delay_time_zone if hasattr(self, "dunning_communication_delay_time_zone") else None)!s}, ' + f'skip_billing_manifest_taxes={(self.skip_billing_manifest_taxes if hasattr(self, "skip_billing_manifest_taxes") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_subscription_component.py b/advancedbilling/models/create_subscription_component.py index a9b548ee..3701f927 100644 --- a/advancedbilling/models/create_subscription_component.py +++ b/advancedbilling/models/create_subscription_component.py @@ -147,22 +147,22 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'enabled={self.enabled!r}, ' - f'unit_balance={self.unit_balance!r}, ' - f'allocated_quantity={self.allocated_quantity!r}, ' - f'quantity={self.quantity!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'custom_price={self.custom_price!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'enabled={(self.enabled if hasattr(self, "enabled") else None)!r}, ' + f'unit_balance={(self.unit_balance if hasattr(self, "unit_balance") else None)!r}, ' + f'allocated_quantity={(self.allocated_quantity if hasattr(self, "allocated_quantity") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'enabled={self.enabled!s}, ' - f'unit_balance={self.unit_balance!s}, ' - f'allocated_quantity={self.allocated_quantity!s}, ' - f'quantity={self.quantity!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'custom_price={self.custom_price!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'enabled={(self.enabled if hasattr(self, "enabled") else None)!s}, ' + f'unit_balance={(self.unit_balance if hasattr(self, "unit_balance") else None)!s}, ' + f'allocated_quantity={(self.allocated_quantity if hasattr(self, "allocated_quantity") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_subscription_group.py b/advancedbilling/models/create_subscription_group.py index b6ed2630..3c496849 100644 --- a/advancedbilling/models/create_subscription_group.py +++ b/advancedbilling/models/create_subscription_group.py @@ -78,11 +78,11 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' f'subscription_id={self.subscription_id!r}, ' - f'member_ids={self.member_ids!r}, ' + f'member_ids={(self.member_ids if hasattr(self, "member_ids") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'subscription_id={self.subscription_id!s}, ' - f'member_ids={self.member_ids!s}, ' + f'member_ids={(self.member_ids if hasattr(self, "member_ids") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/create_usage.py b/advancedbilling/models/create_usage.py index f3dd60d6..f4710a48 100644 --- a/advancedbilling/models/create_usage.py +++ b/advancedbilling/models/create_usage.py @@ -100,16 +100,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'quantity={self.quantity!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'memo={self.memo!r}, ' - f'billing_schedule={self.billing_schedule!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'billing_schedule={(self.billing_schedule if hasattr(self, "billing_schedule") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'quantity={self.quantity!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'memo={self.memo!s}, ' - f'billing_schedule={self.billing_schedule!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'billing_schedule={(self.billing_schedule if hasattr(self, "billing_schedule") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/created_prepayment.py b/advancedbilling/models/created_prepayment.py index b320ecd3..68d80b9a 100644 --- a/advancedbilling/models/created_prepayment.py +++ b/advancedbilling/models/created_prepayment.py @@ -119,22 +119,22 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'memo={self.memo!r}, ' - f'created_at={self.created_at!r}, ' - f'starting_balance_in_cents={self.starting_balance_in_cents!r}, ' - f'ending_balance_in_cents={self.ending_balance_in_cents!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'starting_balance_in_cents={(self.starting_balance_in_cents if hasattr(self, "starting_balance_in_cents") else None)!r}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'memo={self.memo!s}, ' - f'created_at={self.created_at!s}, ' - f'starting_balance_in_cents={self.starting_balance_in_cents!s}, ' - f'ending_balance_in_cents={self.ending_balance_in_cents!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'starting_balance_in_cents={(self.starting_balance_in_cents if hasattr(self, "starting_balance_in_cents") else None)!s}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/credit_card_attributes.py b/advancedbilling/models/credit_card_attributes.py index 8b524d71..abc517bb 100644 --- a/advancedbilling/models/credit_card_attributes.py +++ b/advancedbilling/models/credit_card_attributes.py @@ -109,14 +109,14 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'full_number={self.full_number!r}, ' - f'expiration_month={self.expiration_month!r}, ' - f'expiration_year={self.expiration_year!r}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!r}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!r}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'full_number={self.full_number!s}, ' - f'expiration_month={self.expiration_month!s}, ' - f'expiration_year={self.expiration_year!s}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!s}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!s}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/credit_card_payment_profile.py b/advancedbilling/models/credit_card_payment_profile.py index 097706ca..9879484b 100644 --- a/advancedbilling/models/credit_card_payment_profile.py +++ b/advancedbilling/models/credit_card_payment_profile.py @@ -54,6 +54,10 @@ class CreditCardPaymentProfile(object): tok_9g6hw85pnpt6knmskpwp4ttt) site_gateway_setting_id (int): The model property of type int. gateway_handle (str): An identifier of connected gateway. + created_at (datetime): A timestamp indicating when this payment + profile was created + updated_at (datetime): A timestamp indicating when this payment + profile was last updated additional_properties (Dict[str, object]): The additional properties for the model. @@ -82,7 +86,9 @@ class CreditCardPaymentProfile(object): "disabled": 'disabled', "chargify_token": 'chargify_token', "site_gateway_setting_id": 'site_gateway_setting_id', - "gateway_handle": 'gateway_handle' + "gateway_handle": 'gateway_handle', + "created_at": 'created_at', + "updated_at": 'updated_at' } _optionals = [ @@ -107,6 +113,8 @@ class CreditCardPaymentProfile(object): 'chargify_token', 'site_gateway_setting_id', 'gateway_handle', + 'created_at', + 'updated_at', ] _nullables = [ @@ -145,6 +153,8 @@ def __init__(self, chargify_token=APIHelper.SKIP, site_gateway_setting_id=APIHelper.SKIP, gateway_handle=APIHelper.SKIP, + created_at=APIHelper.SKIP, + updated_at=APIHelper.SKIP, additional_properties=None): """Constructor for the CreditCardPaymentProfile class""" @@ -192,6 +202,10 @@ def __init__(self, self.site_gateway_setting_id = site_gateway_setting_id if gateway_handle is not APIHelper.SKIP: self.gateway_handle = gateway_handle + if created_at is not APIHelper.SKIP: + self.created_at = APIHelper.apply_datetime_converter(created_at, APIHelper.RFC3339DateTime) if created_at else None + if updated_at is not APIHelper.SKIP: + self.updated_at = APIHelper.apply_datetime_converter(updated_at, APIHelper.RFC3339DateTime) if updated_at else None # Add additional model properties to the instance if additional_properties is None: @@ -239,6 +253,8 @@ def from_dictionary(cls, chargify_token = dictionary.get("chargify_token") if dictionary.get("chargify_token") else APIHelper.SKIP site_gateway_setting_id = dictionary.get("site_gateway_setting_id") if "site_gateway_setting_id" in dictionary.keys() else APIHelper.SKIP gateway_handle = dictionary.get("gateway_handle") if "gateway_handle" in dictionary.keys() else APIHelper.SKIP + created_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("created_at")).datetime if dictionary.get("created_at") else APIHelper.SKIP + updated_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("updated_at")).datetime if dictionary.get("updated_at") else APIHelper.SKIP # Clean out expected properties from dictionary additional_properties = {k: v for k, v in dictionary.items() if k not in cls._names.values()} # Return an object of this model @@ -264,6 +280,8 @@ def from_dictionary(cls, chargify_token, site_gateway_setting_id, gateway_handle, + created_at, + updated_at, additional_properties) @classmethod @@ -292,52 +310,56 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'masked_card_number={self.masked_card_number!r}, ' - f'card_type={self.card_type!r}, ' - f'expiration_month={self.expiration_month!r}, ' - f'expiration_year={self.expiration_year!r}, ' - f'customer_id={self.customer_id!r}, ' - f'current_vault={self.current_vault!r}, ' - f'vault_token={self.vault_token!r}, ' - f'billing_address={self.billing_address!r}, ' - f'billing_city={self.billing_city!r}, ' - f'billing_state={self.billing_state!r}, ' - f'billing_zip={self.billing_zip!r}, ' - f'billing_country={self.billing_country!r}, ' - f'customer_vault_token={self.customer_vault_token!r}, ' - f'billing_address_2={self.billing_address_2!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!r}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!r}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!r}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!r}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!r}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!r}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!r}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!r}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!r}, ' f'payment_type={self.payment_type!r}, ' - f'disabled={self.disabled!r}, ' - f'chargify_token={self.chargify_token!r}, ' - f'site_gateway_setting_id={self.site_gateway_setting_id!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' + f'disabled={(self.disabled if hasattr(self, "disabled") else None)!r}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!r}, ' + f'site_gateway_setting_id={(self.site_gateway_setting_id if hasattr(self, "site_gateway_setting_id") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'masked_card_number={self.masked_card_number!s}, ' - f'card_type={self.card_type!s}, ' - f'expiration_month={self.expiration_month!s}, ' - f'expiration_year={self.expiration_year!s}, ' - f'customer_id={self.customer_id!s}, ' - f'current_vault={self.current_vault!s}, ' - f'vault_token={self.vault_token!s}, ' - f'billing_address={self.billing_address!s}, ' - f'billing_city={self.billing_city!s}, ' - f'billing_state={self.billing_state!s}, ' - f'billing_zip={self.billing_zip!s}, ' - f'billing_country={self.billing_country!s}, ' - f'customer_vault_token={self.customer_vault_token!s}, ' - f'billing_address_2={self.billing_address_2!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!s}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!s}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!s}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!s}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!s}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!s}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!s}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!s}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!s}, ' f'payment_type={self.payment_type!s}, ' - f'disabled={self.disabled!s}, ' - f'chargify_token={self.chargify_token!s}, ' - f'site_gateway_setting_id={self.site_gateway_setting_id!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' + f'disabled={(self.disabled if hasattr(self, "disabled") else None)!s}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!s}, ' + f'site_gateway_setting_id={(self.site_gateway_setting_id if hasattr(self, "site_gateway_setting_id") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/credit_note.py b/advancedbilling/models/credit_note.py index 9f74ce3b..921f22b7 100644 --- a/advancedbilling/models/credit_note.py +++ b/advancedbilling/models/credit_note.py @@ -379,62 +379,62 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'site_id={self.site_id!r}, ' - f'customer_id={self.customer_id!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'number={self.number!r}, ' - f'sequence_number={self.sequence_number!r}, ' - f'issue_date={self.issue_date!r}, ' - f'applied_date={self.applied_date!r}, ' - f'status={self.status!r}, ' - f'currency={self.currency!r}, ' - f'memo={self.memo!r}, ' - f'seller={self.seller!r}, ' - f'customer={self.customer!r}, ' - f'billing_address={self.billing_address!r}, ' - f'shipping_address={self.shipping_address!r}, ' - f'subtotal_amount={self.subtotal_amount!r}, ' - f'discount_amount={self.discount_amount!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'total_amount={self.total_amount!r}, ' - f'applied_amount={self.applied_amount!r}, ' - f'remaining_amount={self.remaining_amount!r}, ' - f'line_items={self.line_items!r}, ' - f'discounts={self.discounts!r}, ' - f'taxes={self.taxes!r}, ' - f'applications={self.applications!r}, ' - f'refunds={self.refunds!r}, ' - f'origin_invoices={self.origin_invoices!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'number={(self.number if hasattr(self, "number") else None)!r}, ' + f'sequence_number={(self.sequence_number if hasattr(self, "sequence_number") else None)!r}, ' + f'issue_date={(self.issue_date if hasattr(self, "issue_date") else None)!r}, ' + f'applied_date={(self.applied_date if hasattr(self, "applied_date") else None)!r}, ' + f'status={(self.status if hasattr(self, "status") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'seller={(self.seller if hasattr(self, "seller") else None)!r}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!r}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!r}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!r}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!r}, ' + f'remaining_amount={(self.remaining_amount if hasattr(self, "remaining_amount") else None)!r}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!r}, ' + f'discounts={(self.discounts if hasattr(self, "discounts") else None)!r}, ' + f'taxes={(self.taxes if hasattr(self, "taxes") else None)!r}, ' + f'applications={(self.applications if hasattr(self, "applications") else None)!r}, ' + f'refunds={(self.refunds if hasattr(self, "refunds") else None)!r}, ' + f'origin_invoices={(self.origin_invoices if hasattr(self, "origin_invoices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'site_id={self.site_id!s}, ' - f'customer_id={self.customer_id!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'number={self.number!s}, ' - f'sequence_number={self.sequence_number!s}, ' - f'issue_date={self.issue_date!s}, ' - f'applied_date={self.applied_date!s}, ' - f'status={self.status!s}, ' - f'currency={self.currency!s}, ' - f'memo={self.memo!s}, ' - f'seller={self.seller!s}, ' - f'customer={self.customer!s}, ' - f'billing_address={self.billing_address!s}, ' - f'shipping_address={self.shipping_address!s}, ' - f'subtotal_amount={self.subtotal_amount!s}, ' - f'discount_amount={self.discount_amount!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'total_amount={self.total_amount!s}, ' - f'applied_amount={self.applied_amount!s}, ' - f'remaining_amount={self.remaining_amount!s}, ' - f'line_items={self.line_items!s}, ' - f'discounts={self.discounts!s}, ' - f'taxes={self.taxes!s}, ' - f'applications={self.applications!s}, ' - f'refunds={self.refunds!s}, ' - f'origin_invoices={self.origin_invoices!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'number={(self.number if hasattr(self, "number") else None)!s}, ' + f'sequence_number={(self.sequence_number if hasattr(self, "sequence_number") else None)!s}, ' + f'issue_date={(self.issue_date if hasattr(self, "issue_date") else None)!s}, ' + f'applied_date={(self.applied_date if hasattr(self, "applied_date") else None)!s}, ' + f'status={(self.status if hasattr(self, "status") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'seller={(self.seller if hasattr(self, "seller") else None)!s}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!s}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!s}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!s}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!s}, ' + f'remaining_amount={(self.remaining_amount if hasattr(self, "remaining_amount") else None)!s}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!s}, ' + f'discounts={(self.discounts if hasattr(self, "discounts") else None)!s}, ' + f'taxes={(self.taxes if hasattr(self, "taxes") else None)!s}, ' + f'applications={(self.applications if hasattr(self, "applications") else None)!s}, ' + f'refunds={(self.refunds if hasattr(self, "refunds") else None)!s}, ' + f'origin_invoices={(self.origin_invoices if hasattr(self, "origin_invoices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/credit_note_application.py b/advancedbilling/models/credit_note_application.py index 8e65933a..918557de 100644 --- a/advancedbilling/models/credit_note_application.py +++ b/advancedbilling/models/credit_note_application.py @@ -125,18 +125,18 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'transaction_time={self.transaction_time!r}, ' - f'invoice_uid={self.invoice_uid!r}, ' - f'memo={self.memo!r}, ' - f'applied_amount={self.applied_amount!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!r}, ' + f'invoice_uid={(self.invoice_uid if hasattr(self, "invoice_uid") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'transaction_time={self.transaction_time!s}, ' - f'invoice_uid={self.invoice_uid!s}, ' - f'memo={self.memo!s}, ' - f'applied_amount={self.applied_amount!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!s}, ' + f'invoice_uid={(self.invoice_uid if hasattr(self, "invoice_uid") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/credit_note_line_item.py b/advancedbilling/models/credit_note_line_item.py index 5e02bdf6..99308a05 100644 --- a/advancedbilling/models/credit_note_line_item.py +++ b/advancedbilling/models/credit_note_line_item.py @@ -276,44 +276,44 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'title={self.title!r}, ' - f'description={self.description!r}, ' - f'quantity={self.quantity!r}, ' - f'unit_price={self.unit_price!r}, ' - f'subtotal_amount={self.subtotal_amount!r}, ' - f'discount_amount={self.discount_amount!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'total_amount={self.total_amount!r}, ' - f'tiered_unit_price={self.tiered_unit_price!r}, ' - f'period_range_start={self.period_range_start!r}, ' - f'period_range_end={self.period_range_end!r}, ' - f'product_id={self.product_id!r}, ' - f'product_version={self.product_version!r}, ' - f'component_id={self.component_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'billing_schedule_item_id={self.billing_schedule_item_id!r}, ' - f'custom_item={self.custom_item!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'title={(self.title if hasattr(self, "title") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!r}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!r}, ' + f'tiered_unit_price={(self.tiered_unit_price if hasattr(self, "tiered_unit_price") else None)!r}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!r}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_version={(self.product_version if hasattr(self, "product_version") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'billing_schedule_item_id={(self.billing_schedule_item_id if hasattr(self, "billing_schedule_item_id") else None)!r}, ' + f'custom_item={(self.custom_item if hasattr(self, "custom_item") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'title={self.title!s}, ' - f'description={self.description!s}, ' - f'quantity={self.quantity!s}, ' - f'unit_price={self.unit_price!s}, ' - f'subtotal_amount={self.subtotal_amount!s}, ' - f'discount_amount={self.discount_amount!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'total_amount={self.total_amount!s}, ' - f'tiered_unit_price={self.tiered_unit_price!s}, ' - f'period_range_start={self.period_range_start!s}, ' - f'period_range_end={self.period_range_end!s}, ' - f'product_id={self.product_id!s}, ' - f'product_version={self.product_version!s}, ' - f'component_id={self.component_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'billing_schedule_item_id={self.billing_schedule_item_id!s}, ' - f'custom_item={self.custom_item!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'title={(self.title if hasattr(self, "title") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!s}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!s}, ' + f'tiered_unit_price={(self.tiered_unit_price if hasattr(self, "tiered_unit_price") else None)!s}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!s}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_version={(self.product_version if hasattr(self, "product_version") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'billing_schedule_item_id={(self.billing_schedule_item_id if hasattr(self, "billing_schedule_item_id") else None)!s}, ' + f'custom_item={(self.custom_item if hasattr(self, "custom_item") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/currency_price.py b/advancedbilling/models/currency_price.py index 5c49ec33..f1562ebb 100644 --- a/advancedbilling/models/currency_price.py +++ b/advancedbilling/models/currency_price.py @@ -127,24 +127,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'currency={self.currency!r}, ' - f'price={self.price!r}, ' - f'formatted_price={self.formatted_price!r}, ' - f'price_id={self.price_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'role={self.role!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'price={(self.price if hasattr(self, "price") else None)!r}, ' + f'formatted_price={(self.formatted_price if hasattr(self, "formatted_price") else None)!r}, ' + f'price_id={(self.price_id if hasattr(self, "price_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'role={(self.role if hasattr(self, "role") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'currency={self.currency!s}, ' - f'price={self.price!s}, ' - f'formatted_price={self.formatted_price!s}, ' - f'price_id={self.price_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'role={self.role!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'price={(self.price if hasattr(self, "price") else None)!s}, ' + f'formatted_price={(self.formatted_price if hasattr(self, "formatted_price") else None)!s}, ' + f'price_id={(self.price_id if hasattr(self, "price_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'role={(self.role if hasattr(self, "role") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/customer.py b/advancedbilling/models/customer.py index 0c3eb938..af05ff1a 100644 --- a/advancedbilling/models/customer.py +++ b/advancedbilling/models/customer.py @@ -381,68 +381,68 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'email={self.email!r}, ' - f'cc_emails={self.cc_emails!r}, ' - f'organization={self.organization!r}, ' - f'reference={self.reference!r}, ' - f'id={self.id!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'address={self.address!r}, ' - f'address_2={self.address_2!r}, ' - f'city={self.city!r}, ' - f'state={self.state!r}, ' - f'state_name={self.state_name!r}, ' - f'zip={self.zip!r}, ' - f'country={self.country!r}, ' - f'country_name={self.country_name!r}, ' - f'phone={self.phone!r}, ' - f'verified={self.verified!r}, ' - f'portal_customer_created_at={self.portal_customer_created_at!r}, ' - f'portal_invite_last_sent_at={self.portal_invite_last_sent_at!r}, ' - f'portal_invite_last_accepted_at={self.portal_invite_last_accepted_at!r}, ' - f'tax_exempt={self.tax_exempt!r}, ' - f'vat_number={self.vat_number!r}, ' - f'parent_id={self.parent_id!r}, ' - f'locale={self.locale!r}, ' - f'default_subscription_group_uid={self.default_subscription_group_uid!r}, ' - f'salesforce_id={self.salesforce_id!r}, ' - f'tax_exempt_reason={self.tax_exempt_reason!r}, ' - f'default_auto_renewal_profile_id={self.default_auto_renewal_profile_id!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'email={(self.email if hasattr(self, "email") else None)!r}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!r}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'address={(self.address if hasattr(self, "address") else None)!r}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!r}, ' + f'city={(self.city if hasattr(self, "city") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'state_name={(self.state_name if hasattr(self, "state_name") else None)!r}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!r}, ' + f'country={(self.country if hasattr(self, "country") else None)!r}, ' + f'country_name={(self.country_name if hasattr(self, "country_name") else None)!r}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!r}, ' + f'verified={(self.verified if hasattr(self, "verified") else None)!r}, ' + f'portal_customer_created_at={(self.portal_customer_created_at if hasattr(self, "portal_customer_created_at") else None)!r}, ' + f'portal_invite_last_sent_at={(self.portal_invite_last_sent_at if hasattr(self, "portal_invite_last_sent_at") else None)!r}, ' + f'portal_invite_last_accepted_at={(self.portal_invite_last_accepted_at if hasattr(self, "portal_invite_last_accepted_at") else None)!r}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!r}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!r}, ' + f'parent_id={(self.parent_id if hasattr(self, "parent_id") else None)!r}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!r}, ' + f'default_subscription_group_uid={(self.default_subscription_group_uid if hasattr(self, "default_subscription_group_uid") else None)!r}, ' + f'salesforce_id={(self.salesforce_id if hasattr(self, "salesforce_id") else None)!r}, ' + f'tax_exempt_reason={(self.tax_exempt_reason if hasattr(self, "tax_exempt_reason") else None)!r}, ' + f'default_auto_renewal_profile_id={(self.default_auto_renewal_profile_id if hasattr(self, "default_auto_renewal_profile_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'email={self.email!s}, ' - f'cc_emails={self.cc_emails!s}, ' - f'organization={self.organization!s}, ' - f'reference={self.reference!s}, ' - f'id={self.id!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'address={self.address!s}, ' - f'address_2={self.address_2!s}, ' - f'city={self.city!s}, ' - f'state={self.state!s}, ' - f'state_name={self.state_name!s}, ' - f'zip={self.zip!s}, ' - f'country={self.country!s}, ' - f'country_name={self.country_name!s}, ' - f'phone={self.phone!s}, ' - f'verified={self.verified!s}, ' - f'portal_customer_created_at={self.portal_customer_created_at!s}, ' - f'portal_invite_last_sent_at={self.portal_invite_last_sent_at!s}, ' - f'portal_invite_last_accepted_at={self.portal_invite_last_accepted_at!s}, ' - f'tax_exempt={self.tax_exempt!s}, ' - f'vat_number={self.vat_number!s}, ' - f'parent_id={self.parent_id!s}, ' - f'locale={self.locale!s}, ' - f'default_subscription_group_uid={self.default_subscription_group_uid!s}, ' - f'salesforce_id={self.salesforce_id!s}, ' - f'tax_exempt_reason={self.tax_exempt_reason!s}, ' - f'default_auto_renewal_profile_id={self.default_auto_renewal_profile_id!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'email={(self.email if hasattr(self, "email") else None)!s}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!s}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'address={(self.address if hasattr(self, "address") else None)!s}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!s}, ' + f'city={(self.city if hasattr(self, "city") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'state_name={(self.state_name if hasattr(self, "state_name") else None)!s}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!s}, ' + f'country={(self.country if hasattr(self, "country") else None)!s}, ' + f'country_name={(self.country_name if hasattr(self, "country_name") else None)!s}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!s}, ' + f'verified={(self.verified if hasattr(self, "verified") else None)!s}, ' + f'portal_customer_created_at={(self.portal_customer_created_at if hasattr(self, "portal_customer_created_at") else None)!s}, ' + f'portal_invite_last_sent_at={(self.portal_invite_last_sent_at if hasattr(self, "portal_invite_last_sent_at") else None)!s}, ' + f'portal_invite_last_accepted_at={(self.portal_invite_last_accepted_at if hasattr(self, "portal_invite_last_accepted_at") else None)!s}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!s}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!s}, ' + f'parent_id={(self.parent_id if hasattr(self, "parent_id") else None)!s}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!s}, ' + f'default_subscription_group_uid={(self.default_subscription_group_uid if hasattr(self, "default_subscription_group_uid") else None)!s}, ' + f'salesforce_id={(self.salesforce_id if hasattr(self, "salesforce_id") else None)!s}, ' + f'tax_exempt_reason={(self.tax_exempt_reason if hasattr(self, "tax_exempt_reason") else None)!s}, ' + f'default_auto_renewal_profile_id={(self.default_auto_renewal_profile_id if hasattr(self, "default_auto_renewal_profile_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/customer_attributes.py b/advancedbilling/models/customer_attributes.py index 6778c1cc..8edbc948 100644 --- a/advancedbilling/models/customer_attributes.py +++ b/advancedbilling/models/customer_attributes.py @@ -280,48 +280,48 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'email={self.email!r}, ' - f'cc_emails={self.cc_emails!r}, ' - f'organization={self.organization!r}, ' - f'reference={self.reference!r}, ' - f'address={self.address!r}, ' - f'address_2={self.address_2!r}, ' - f'city={self.city!r}, ' - f'state={self.state!r}, ' - f'zip={self.zip!r}, ' - f'country={self.country!r}, ' - f'phone={self.phone!r}, ' - f'verified={self.verified!r}, ' - f'tax_exempt={self.tax_exempt!r}, ' - f'vat_number={self.vat_number!r}, ' - f'metafields={self.metafields!r}, ' - f'parent_id={self.parent_id!r}, ' - f'salesforce_id={self.salesforce_id!r}, ' - f'default_auto_renewal_profile_id={self.default_auto_renewal_profile_id!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'email={(self.email if hasattr(self, "email") else None)!r}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!r}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'address={(self.address if hasattr(self, "address") else None)!r}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!r}, ' + f'city={(self.city if hasattr(self, "city") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!r}, ' + f'country={(self.country if hasattr(self, "country") else None)!r}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!r}, ' + f'verified={(self.verified if hasattr(self, "verified") else None)!r}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!r}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!r}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!r}, ' + f'parent_id={(self.parent_id if hasattr(self, "parent_id") else None)!r}, ' + f'salesforce_id={(self.salesforce_id if hasattr(self, "salesforce_id") else None)!r}, ' + f'default_auto_renewal_profile_id={(self.default_auto_renewal_profile_id if hasattr(self, "default_auto_renewal_profile_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'email={self.email!s}, ' - f'cc_emails={self.cc_emails!s}, ' - f'organization={self.organization!s}, ' - f'reference={self.reference!s}, ' - f'address={self.address!s}, ' - f'address_2={self.address_2!s}, ' - f'city={self.city!s}, ' - f'state={self.state!s}, ' - f'zip={self.zip!s}, ' - f'country={self.country!s}, ' - f'phone={self.phone!s}, ' - f'verified={self.verified!s}, ' - f'tax_exempt={self.tax_exempt!s}, ' - f'vat_number={self.vat_number!s}, ' - f'metafields={self.metafields!s}, ' - f'parent_id={self.parent_id!s}, ' - f'salesforce_id={self.salesforce_id!s}, ' - f'default_auto_renewal_profile_id={self.default_auto_renewal_profile_id!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'email={(self.email if hasattr(self, "email") else None)!s}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!s}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'address={(self.address if hasattr(self, "address") else None)!s}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!s}, ' + f'city={(self.city if hasattr(self, "city") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!s}, ' + f'country={(self.country if hasattr(self, "country") else None)!s}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!s}, ' + f'verified={(self.verified if hasattr(self, "verified") else None)!s}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!s}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!s}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!s}, ' + f'parent_id={(self.parent_id if hasattr(self, "parent_id") else None)!s}, ' + f'salesforce_id={(self.salesforce_id if hasattr(self, "salesforce_id") else None)!s}, ' + f'default_auto_renewal_profile_id={(self.default_auto_renewal_profile_id if hasattr(self, "default_auto_renewal_profile_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/customer_change.py b/advancedbilling/models/customer_change.py index 1ee8827a..ab6da423 100644 --- a/advancedbilling/models/customer_change.py +++ b/advancedbilling/models/customer_change.py @@ -121,16 +121,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'payer={self.payer!r}, ' - f'shipping_address={self.shipping_address!r}, ' - f'billing_address={self.billing_address!r}, ' - f'custom_fields={self.custom_fields!r}, ' + f'payer={(self.payer if hasattr(self, "payer") else None)!r}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'custom_fields={(self.custom_fields if hasattr(self, "custom_fields") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'payer={self.payer!s}, ' - f'shipping_address={self.shipping_address!s}, ' - f'billing_address={self.billing_address!s}, ' - f'custom_fields={self.custom_fields!s}, ' + f'payer={(self.payer if hasattr(self, "payer") else None)!s}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'custom_fields={(self.custom_fields if hasattr(self, "custom_fields") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/customer_error.py b/advancedbilling/models/customer_error.py index b5d24e5f..f084f6b3 100644 --- a/advancedbilling/models/customer_error.py +++ b/advancedbilling/models/customer_error.py @@ -93,10 +93,10 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'customer={self.customer!r}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'customer={self.customer!s}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/debit_note.py b/advancedbilling/models/debit_note.py index 5676b4d2..9491ba75 100644 --- a/advancedbilling/models/debit_note.py +++ b/advancedbilling/models/debit_note.py @@ -319,54 +319,54 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'site_id={self.site_id!r}, ' - f'customer_id={self.customer_id!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'number={self.number!r}, ' - f'sequence_number={self.sequence_number!r}, ' - f'origin_credit_note_uid={self.origin_credit_note_uid!r}, ' - f'origin_credit_note_number={self.origin_credit_note_number!r}, ' - f'issue_date={self.issue_date!r}, ' - f'applied_date={self.applied_date!r}, ' - f'due_date={self.due_date!r}, ' - f'status={self.status!r}, ' - f'memo={self.memo!r}, ' - f'role={self.role!r}, ' - f'currency={self.currency!r}, ' - f'seller={self.seller!r}, ' - f'customer={self.customer!r}, ' - f'billing_address={self.billing_address!r}, ' - f'shipping_address={self.shipping_address!r}, ' - f'line_items={self.line_items!r}, ' - f'discounts={self.discounts!r}, ' - f'taxes={self.taxes!r}, ' - f'refunds={self.refunds!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'number={(self.number if hasattr(self, "number") else None)!r}, ' + f'sequence_number={(self.sequence_number if hasattr(self, "sequence_number") else None)!r}, ' + f'origin_credit_note_uid={(self.origin_credit_note_uid if hasattr(self, "origin_credit_note_uid") else None)!r}, ' + f'origin_credit_note_number={(self.origin_credit_note_number if hasattr(self, "origin_credit_note_number") else None)!r}, ' + f'issue_date={(self.issue_date if hasattr(self, "issue_date") else None)!r}, ' + f'applied_date={(self.applied_date if hasattr(self, "applied_date") else None)!r}, ' + f'due_date={(self.due_date if hasattr(self, "due_date") else None)!r}, ' + f'status={(self.status if hasattr(self, "status") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'role={(self.role if hasattr(self, "role") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'seller={(self.seller if hasattr(self, "seller") else None)!r}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!r}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!r}, ' + f'discounts={(self.discounts if hasattr(self, "discounts") else None)!r}, ' + f'taxes={(self.taxes if hasattr(self, "taxes") else None)!r}, ' + f'refunds={(self.refunds if hasattr(self, "refunds") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'site_id={self.site_id!s}, ' - f'customer_id={self.customer_id!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'number={self.number!s}, ' - f'sequence_number={self.sequence_number!s}, ' - f'origin_credit_note_uid={self.origin_credit_note_uid!s}, ' - f'origin_credit_note_number={self.origin_credit_note_number!s}, ' - f'issue_date={self.issue_date!s}, ' - f'applied_date={self.applied_date!s}, ' - f'due_date={self.due_date!s}, ' - f'status={self.status!s}, ' - f'memo={self.memo!s}, ' - f'role={self.role!s}, ' - f'currency={self.currency!s}, ' - f'seller={self.seller!s}, ' - f'customer={self.customer!s}, ' - f'billing_address={self.billing_address!s}, ' - f'shipping_address={self.shipping_address!s}, ' - f'line_items={self.line_items!s}, ' - f'discounts={self.discounts!s}, ' - f'taxes={self.taxes!s}, ' - f'refunds={self.refunds!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'number={(self.number if hasattr(self, "number") else None)!s}, ' + f'sequence_number={(self.sequence_number if hasattr(self, "sequence_number") else None)!s}, ' + f'origin_credit_note_uid={(self.origin_credit_note_uid if hasattr(self, "origin_credit_note_uid") else None)!s}, ' + f'origin_credit_note_number={(self.origin_credit_note_number if hasattr(self, "origin_credit_note_number") else None)!s}, ' + f'issue_date={(self.issue_date if hasattr(self, "issue_date") else None)!s}, ' + f'applied_date={(self.applied_date if hasattr(self, "applied_date") else None)!s}, ' + f'due_date={(self.due_date if hasattr(self, "due_date") else None)!s}, ' + f'status={(self.status if hasattr(self, "status") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'role={(self.role if hasattr(self, "role") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'seller={(self.seller if hasattr(self, "seller") else None)!s}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!s}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!s}, ' + f'discounts={(self.discounts if hasattr(self, "discounts") else None)!s}, ' + f'taxes={(self.taxes if hasattr(self, "taxes") else None)!s}, ' + f'refunds={(self.refunds if hasattr(self, "refunds") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/deduct_service_credit.py b/advancedbilling/models/deduct_service_credit.py index 2220d877..c8a95881 100644 --- a/advancedbilling/models/deduct_service_credit.py +++ b/advancedbilling/models/deduct_service_credit.py @@ -102,11 +102,11 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'amount={self.amount!r}, ' - f'memo={self.memo!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'amount={self.amount!s}, ' - f'memo={self.memo!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/delayed_cancellation_response.py b/advancedbilling/models/delayed_cancellation_response.py index 5a22ed0a..326ee3d6 100644 --- a/advancedbilling/models/delayed_cancellation_response.py +++ b/advancedbilling/models/delayed_cancellation_response.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'message={self.message!r}, ' + f'message={(self.message if hasattr(self, "message") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'message={self.message!s}, ' + f'message={(self.message if hasattr(self, "message") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/delete_subscription_group_response.py b/advancedbilling/models/delete_subscription_group_response.py index e6865db9..11671401 100644 --- a/advancedbilling/models/delete_subscription_group_response.py +++ b/advancedbilling/models/delete_subscription_group_response.py @@ -79,12 +79,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'deleted={self.deleted!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'deleted={(self.deleted if hasattr(self, "deleted") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'deleted={self.deleted!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'deleted={(self.deleted if hasattr(self, "deleted") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/dunning_step_data.py b/advancedbilling/models/dunning_step_data.py index 361be180..be81e614 100644 --- a/advancedbilling/models/dunning_step_data.py +++ b/advancedbilling/models/dunning_step_data.py @@ -165,22 +165,22 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'day_threshold={self.day_threshold!r}, ' f'action={self.action!r}, ' - f'email_body={self.email_body!r}, ' - f'email_subject={self.email_subject!r}, ' + f'email_body={(self.email_body if hasattr(self, "email_body") else None)!r}, ' + f'email_subject={(self.email_subject if hasattr(self, "email_subject") else None)!r}, ' f'send_email={self.send_email!r}, ' f'send_bcc_email={self.send_bcc_email!r}, ' f'send_sms={self.send_sms!r}, ' - f'sms_body={self.sms_body!r}, ' + f'sms_body={(self.sms_body if hasattr(self, "sms_body") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'day_threshold={self.day_threshold!s}, ' f'action={self.action!s}, ' - f'email_body={self.email_body!s}, ' - f'email_subject={self.email_subject!s}, ' + f'email_body={(self.email_body if hasattr(self, "email_body") else None)!s}, ' + f'email_subject={(self.email_subject if hasattr(self, "email_subject") else None)!s}, ' f'send_email={self.send_email!s}, ' f'send_bcc_email={self.send_bcc_email!s}, ' f'send_sms={self.send_sms!s}, ' - f'sms_body={self.sms_body!s}, ' + f'sms_body={(self.sms_body if hasattr(self, "sms_body") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/ebb_component.py b/advancedbilling/models/ebb_component.py index 7822d5eb..a5ff63e7 100644 --- a/advancedbilling/models/ebb_component.py +++ b/advancedbilling/models/ebb_component.py @@ -216,34 +216,34 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' f'unit_name={self.unit_name!r}, ' - f'description={self.description!r}, ' - f'handle={self.handle!r}, ' - f'taxable={self.taxable!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!r}, ' f'pricing_scheme={self.pricing_scheme!r}, ' - f'prices={self.prices!r}, ' - f'price_points={self.price_points!r}, ' - f'unit_price={self.unit_price!r}, ' - f'tax_code={self.tax_code!r}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!r}, ' f'event_based_billing_metric_id={self.event_based_billing_metric_id!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' f'unit_name={self.unit_name!s}, ' - f'description={self.description!s}, ' - f'handle={self.handle!s}, ' - f'taxable={self.taxable!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!s}, ' f'pricing_scheme={self.pricing_scheme!s}, ' - f'prices={self.prices!s}, ' - f'price_points={self.price_points!s}, ' - f'unit_price={self.unit_price!s}, ' - f'tax_code={self.tax_code!s}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!s}, ' f'event_based_billing_metric_id={self.event_based_billing_metric_id!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/ebb_event.py b/advancedbilling/models/ebb_event.py index a7deb321..47808fd3 100644 --- a/advancedbilling/models/ebb_event.py +++ b/advancedbilling/models/ebb_event.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'chargify={self.chargify!r}, ' + f'chargify={(self.chargify if hasattr(self, "chargify") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'chargify={self.chargify!s}, ' + f'chargify={(self.chargify if hasattr(self, "chargify") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/enable_webhooks_response.py b/advancedbilling/models/enable_webhooks_response.py index 7242b1f7..c0ccdb12 100644 --- a/advancedbilling/models/enable_webhooks_response.py +++ b/advancedbilling/models/enable_webhooks_response.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'webhooks_enabled={self.webhooks_enabled!r}, ' + f'webhooks_enabled={(self.webhooks_enabled if hasattr(self, "webhooks_enabled") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'webhooks_enabled={self.webhooks_enabled!s}, ' + f'webhooks_enabled={(self.webhooks_enabled if hasattr(self, "webhooks_enabled") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/endpoint.py b/advancedbilling/models/endpoint.py index 109d3533..792b949f 100644 --- a/advancedbilling/models/endpoint.py +++ b/advancedbilling/models/endpoint.py @@ -104,18 +104,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'url={self.url!r}, ' - f'site_id={self.site_id!r}, ' - f'status={self.status!r}, ' - f'webhook_subscriptions={self.webhook_subscriptions!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'url={(self.url if hasattr(self, "url") else None)!r}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!r}, ' + f'status={(self.status if hasattr(self, "status") else None)!r}, ' + f'webhook_subscriptions={(self.webhook_subscriptions if hasattr(self, "webhook_subscriptions") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'url={self.url!s}, ' - f'site_id={self.site_id!s}, ' - f'status={self.status!s}, ' - f'webhook_subscriptions={self.webhook_subscriptions!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'url={(self.url if hasattr(self, "url") else None)!s}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!s}, ' + f'status={(self.status if hasattr(self, "status") else None)!s}, ' + f'webhook_subscriptions={(self.webhook_subscriptions if hasattr(self, "webhook_subscriptions") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/endpoint_response.py b/advancedbilling/models/endpoint_response.py index b3a8de40..3f746af1 100644 --- a/advancedbilling/models/endpoint_response.py +++ b/advancedbilling/models/endpoint_response.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'endpoint={self.endpoint!r}, ' + f'endpoint={(self.endpoint if hasattr(self, "endpoint") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'endpoint={self.endpoint!s}, ' + f'endpoint={(self.endpoint if hasattr(self, "endpoint") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/errors.py b/advancedbilling/models/errors.py index 449617e7..92115c92 100644 --- a/advancedbilling/models/errors.py +++ b/advancedbilling/models/errors.py @@ -79,12 +79,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'per_page={self.per_page!r}, ' - f'price_point={self.price_point!r}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!r}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'per_page={self.per_page!s}, ' - f'price_point={self.price_point!s}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!s}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/event_based_billing_segment_error.py b/advancedbilling/models/event_based_billing_segment_error.py index 96135638..fd31e5df 100644 --- a/advancedbilling/models/event_based_billing_segment_error.py +++ b/advancedbilling/models/event_based_billing_segment_error.py @@ -13,11 +13,11 @@ class EventBasedBillingSegmentError(object): """Implementation of the 'Event Based Billing Segment Error' model. Attributes: - segments (Dict[str, object]): The key of the object would be a number - (an index in the request array) where the error occurred. In the - value object, the key represents the field and the value is an - array with error messages. In most cases, this object would - contain just one key. + segments (Dict[str, Any]): The key of the object would be a number (an + index in the request array) where the error occurred. In the value + object, the key represents the field and the value is an array + with error messages. In most cases, this object would contain just + one key. additional_properties (Dict[str, object]): The additional properties for the model. diff --git a/advancedbilling/models/failed_payment_event_data.py b/advancedbilling/models/failed_payment_event_data.py index 2139434f..172a7182 100644 --- a/advancedbilling/models/failed_payment_event_data.py +++ b/advancedbilling/models/failed_payment_event_data.py @@ -143,7 +143,7 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'amount_in_cents={self.amount_in_cents!r}, ' f'applied_amount={self.applied_amount!r}, ' - f'memo={self.memo!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' f'payment_method={self.payment_method!r}, ' f'transaction_id={self.transaction_id!r}, ' f'additional_properties={self.additional_properties!r})') @@ -152,7 +152,7 @@ def __str__(self): return (f'{self.__class__.__name__}(' f'amount_in_cents={self.amount_in_cents!s}, ' f'applied_amount={self.applied_amount!s}, ' - f'memo={self.memo!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' f'payment_method={self.payment_method!s}, ' f'transaction_id={self.transaction_id!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/full_subscription_group_response.py b/advancedbilling/models/full_subscription_group_response.py index 3d73586c..6d5558ed 100644 --- a/advancedbilling/models/full_subscription_group_response.py +++ b/advancedbilling/models/full_subscription_group_response.py @@ -227,32 +227,32 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'scheme={self.scheme!r}, ' - f'customer_id={self.customer_id!r}, ' - f'payment_profile_id={self.payment_profile_id!r}, ' - f'subscription_ids={self.subscription_ids!r}, ' - f'primary_subscription_id={self.primary_subscription_id!r}, ' - f'next_assessment_at={self.next_assessment_at!r}, ' - f'state={self.state!r}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!r}, ' - f'current_billing_amount_in_cents={self.current_billing_amount_in_cents!r}, ' - f'customer={self.customer!r}, ' - f'account_balances={self.account_balances!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!r}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!r}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!r}, ' + f'current_billing_amount_in_cents={(self.current_billing_amount_in_cents if hasattr(self, "current_billing_amount_in_cents") else None)!r}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!r}, ' + f'account_balances={(self.account_balances if hasattr(self, "account_balances") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'scheme={self.scheme!s}, ' - f'customer_id={self.customer_id!s}, ' - f'payment_profile_id={self.payment_profile_id!s}, ' - f'subscription_ids={self.subscription_ids!s}, ' - f'primary_subscription_id={self.primary_subscription_id!s}, ' - f'next_assessment_at={self.next_assessment_at!s}, ' - f'state={self.state!s}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!s}, ' - f'current_billing_amount_in_cents={self.current_billing_amount_in_cents!s}, ' - f'customer={self.customer!s}, ' - f'account_balances={self.account_balances!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!s}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!s}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!s}, ' + f'current_billing_amount_in_cents={(self.current_billing_amount_in_cents if hasattr(self, "current_billing_amount_in_cents") else None)!s}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!s}, ' + f'account_balances={(self.account_balances if hasattr(self, "account_balances") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/get_one_time_token_payment_profile.py b/advancedbilling/models/get_one_time_token_payment_profile.py index 9839c986..ee5f7c83 100644 --- a/advancedbilling/models/get_one_time_token_payment_profile.py +++ b/advancedbilling/models/get_one_time_token_payment_profile.py @@ -207,18 +207,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' f'first_name={self.first_name!r}, ' f'last_name={self.last_name!r}, ' f'masked_card_number={self.masked_card_number!r}, ' f'card_type={self.card_type!r}, ' f'expiration_month={self.expiration_month!r}, ' f'expiration_year={self.expiration_year!r}, ' - f'customer_id={self.customer_id!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' f'current_vault={self.current_vault!r}, ' f'vault_token={self.vault_token!r}, ' f'billing_address={self.billing_address!r}, ' - f'billing_address_2={self.billing_address_2!r}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!r}, ' f'billing_city={self.billing_city!r}, ' f'billing_country={self.billing_country!r}, ' f'billing_state={self.billing_state!r}, ' @@ -226,24 +226,24 @@ def __repr__(self): f'payment_type={self.payment_type!r}, ' f'disabled={self.disabled!r}, ' f'site_gateway_setting_id={self.site_gateway_setting_id!r}, ' - f'customer_vault_token={self.customer_vault_token!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' f'first_name={self.first_name!s}, ' f'last_name={self.last_name!s}, ' f'masked_card_number={self.masked_card_number!s}, ' f'card_type={self.card_type!s}, ' f'expiration_month={self.expiration_month!s}, ' f'expiration_year={self.expiration_year!s}, ' - f'customer_id={self.customer_id!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' f'current_vault={self.current_vault!s}, ' f'vault_token={self.vault_token!s}, ' f'billing_address={self.billing_address!s}, ' - f'billing_address_2={self.billing_address_2!s}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!s}, ' f'billing_city={self.billing_city!s}, ' f'billing_country={self.billing_country!s}, ' f'billing_state={self.billing_state!s}, ' @@ -251,6 +251,6 @@ def __str__(self): f'payment_type={self.payment_type!s}, ' f'disabled={self.disabled!s}, ' f'site_gateway_setting_id={self.site_gateway_setting_id!s}, ' - f'customer_vault_token={self.customer_vault_token!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/group_billing.py b/advancedbilling/models/group_billing.py index 983762b1..f95ade54 100644 --- a/advancedbilling/models/group_billing.py +++ b/advancedbilling/models/group_billing.py @@ -115,14 +115,14 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'accrue={self.accrue!r}, ' - f'align_date={self.align_date!r}, ' - f'prorate={self.prorate!r}, ' + f'accrue={(self.accrue if hasattr(self, "accrue") else None)!r}, ' + f'align_date={(self.align_date if hasattr(self, "align_date") else None)!r}, ' + f'prorate={(self.prorate if hasattr(self, "prorate") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'accrue={self.accrue!s}, ' - f'align_date={self.align_date!s}, ' - f'prorate={self.prorate!s}, ' + f'accrue={(self.accrue if hasattr(self, "accrue") else None)!s}, ' + f'align_date={(self.align_date if hasattr(self, "align_date") else None)!s}, ' + f'prorate={(self.prorate if hasattr(self, "prorate") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/group_settings.py b/advancedbilling/models/group_settings.py index a0734fea..2ba8bee0 100644 --- a/advancedbilling/models/group_settings.py +++ b/advancedbilling/models/group_settings.py @@ -108,11 +108,11 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'target={self.target!r}, ' - f'billing={self.billing!r}, ' + f'billing={(self.billing if hasattr(self, "billing") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'target={self.target!s}, ' - f'billing={self.billing!s}, ' + f'billing={(self.billing if hasattr(self, "billing") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/group_target.py b/advancedbilling/models/group_target.py index cea8e268..ba01df0f 100644 --- a/advancedbilling/models/group_target.py +++ b/advancedbilling/models/group_target.py @@ -109,11 +109,11 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'mtype={self.mtype!r}, ' - f'id={self.id!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'mtype={self.mtype!s}, ' - f'id={self.id!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/historic_usage.py b/advancedbilling/models/historic_usage.py index 779802dd..1117b4bc 100644 --- a/advancedbilling/models/historic_usage.py +++ b/advancedbilling/models/historic_usage.py @@ -113,14 +113,14 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'total_usage_quantity={self.total_usage_quantity!r}, ' - f'billing_period_starts_at={self.billing_period_starts_at!r}, ' - f'billing_period_ends_at={self.billing_period_ends_at!r}, ' + f'total_usage_quantity={(self.total_usage_quantity if hasattr(self, "total_usage_quantity") else None)!r}, ' + f'billing_period_starts_at={(self.billing_period_starts_at if hasattr(self, "billing_period_starts_at") else None)!r}, ' + f'billing_period_ends_at={(self.billing_period_ends_at if hasattr(self, "billing_period_ends_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'total_usage_quantity={self.total_usage_quantity!s}, ' - f'billing_period_starts_at={self.billing_period_starts_at!s}, ' - f'billing_period_ends_at={self.billing_period_ends_at!s}, ' + f'total_usage_quantity={(self.total_usage_quantity if hasattr(self, "total_usage_quantity") else None)!s}, ' + f'billing_period_starts_at={(self.billing_period_starts_at if hasattr(self, "billing_period_starts_at") else None)!s}, ' + f'billing_period_ends_at={(self.billing_period_ends_at if hasattr(self, "billing_period_ends_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice.py b/advancedbilling/models/invoice.py index 365350ab..b0b7ae77 100644 --- a/advancedbilling/models/invoice.py +++ b/advancedbilling/models/invoice.py @@ -653,120 +653,120 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'uid={self.uid!r}, ' - f'site_id={self.site_id!r}, ' - f'customer_id={self.customer_id!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'number={self.number!r}, ' - f'sequence_number={self.sequence_number!r}, ' - f'transaction_time={self.transaction_time!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'issue_date={self.issue_date!r}, ' - f'due_date={self.due_date!r}, ' - f'paid_date={self.paid_date!r}, ' - f'status={self.status!r}, ' - f'role={self.role!r}, ' - f'parent_invoice_id={self.parent_invoice_id!r}, ' - f'collection_method={self.collection_method!r}, ' - f'payment_instructions={self.payment_instructions!r}, ' - f'currency={self.currency!r}, ' - f'consolidation_level={self.consolidation_level!r}, ' - f'parent_invoice_uid={self.parent_invoice_uid!r}, ' - f'subscription_group_id={self.subscription_group_id!r}, ' - f'parent_invoice_number={self.parent_invoice_number!r}, ' - f'group_primary_subscription_id={self.group_primary_subscription_id!r}, ' - f'product_name={self.product_name!r}, ' - f'product_family_name={self.product_family_name!r}, ' - f'seller={self.seller!r}, ' - f'customer={self.customer!r}, ' - f'payer={self.payer!r}, ' - f'recipient_emails={self.recipient_emails!r}, ' - f'net_terms={self.net_terms!r}, ' - f'memo={self.memo!r}, ' - f'billing_address={self.billing_address!r}, ' - f'shipping_address={self.shipping_address!r}, ' - f'subtotal_amount={self.subtotal_amount!r}, ' - f'discount_amount={self.discount_amount!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'total_amount={self.total_amount!r}, ' - f'credit_amount={self.credit_amount!r}, ' - f'debit_amount={self.debit_amount!r}, ' - f'refund_amount={self.refund_amount!r}, ' - f'paid_amount={self.paid_amount!r}, ' - f'due_amount={self.due_amount!r}, ' - f'line_items={self.line_items!r}, ' - f'discounts={self.discounts!r}, ' - f'taxes={self.taxes!r}, ' - f'credits={self.credits!r}, ' - f'debits={self.debits!r}, ' - f'refunds={self.refunds!r}, ' - f'payments={self.payments!r}, ' - f'custom_fields={self.custom_fields!r}, ' - f'display_settings={self.display_settings!r}, ' - f'avatax_details={self.avatax_details!r}, ' - f'public_url={self.public_url!r}, ' - f'previous_balance_data={self.previous_balance_data!r}, ' - f'public_url_expires_on={self.public_url_expires_on!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'number={(self.number if hasattr(self, "number") else None)!r}, ' + f'sequence_number={(self.sequence_number if hasattr(self, "sequence_number") else None)!r}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'issue_date={(self.issue_date if hasattr(self, "issue_date") else None)!r}, ' + f'due_date={(self.due_date if hasattr(self, "due_date") else None)!r}, ' + f'paid_date={(self.paid_date if hasattr(self, "paid_date") else None)!r}, ' + f'status={(self.status if hasattr(self, "status") else None)!r}, ' + f'role={(self.role if hasattr(self, "role") else None)!r}, ' + f'parent_invoice_id={(self.parent_invoice_id if hasattr(self, "parent_invoice_id") else None)!r}, ' + f'collection_method={(self.collection_method if hasattr(self, "collection_method") else None)!r}, ' + f'payment_instructions={(self.payment_instructions if hasattr(self, "payment_instructions") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'consolidation_level={(self.consolidation_level if hasattr(self, "consolidation_level") else None)!r}, ' + f'parent_invoice_uid={(self.parent_invoice_uid if hasattr(self, "parent_invoice_uid") else None)!r}, ' + f'subscription_group_id={(self.subscription_group_id if hasattr(self, "subscription_group_id") else None)!r}, ' + f'parent_invoice_number={(self.parent_invoice_number if hasattr(self, "parent_invoice_number") else None)!r}, ' + f'group_primary_subscription_id={(self.group_primary_subscription_id if hasattr(self, "group_primary_subscription_id") else None)!r}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!r}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!r}, ' + f'seller={(self.seller if hasattr(self, "seller") else None)!r}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!r}, ' + f'payer={(self.payer if hasattr(self, "payer") else None)!r}, ' + f'recipient_emails={(self.recipient_emails if hasattr(self, "recipient_emails") else None)!r}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!r}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!r}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!r}, ' + f'credit_amount={(self.credit_amount if hasattr(self, "credit_amount") else None)!r}, ' + f'debit_amount={(self.debit_amount if hasattr(self, "debit_amount") else None)!r}, ' + f'refund_amount={(self.refund_amount if hasattr(self, "refund_amount") else None)!r}, ' + f'paid_amount={(self.paid_amount if hasattr(self, "paid_amount") else None)!r}, ' + f'due_amount={(self.due_amount if hasattr(self, "due_amount") else None)!r}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!r}, ' + f'discounts={(self.discounts if hasattr(self, "discounts") else None)!r}, ' + f'taxes={(self.taxes if hasattr(self, "taxes") else None)!r}, ' + f'credits={(self.credits if hasattr(self, "credits") else None)!r}, ' + f'debits={(self.debits if hasattr(self, "debits") else None)!r}, ' + f'refunds={(self.refunds if hasattr(self, "refunds") else None)!r}, ' + f'payments={(self.payments if hasattr(self, "payments") else None)!r}, ' + f'custom_fields={(self.custom_fields if hasattr(self, "custom_fields") else None)!r}, ' + f'display_settings={(self.display_settings if hasattr(self, "display_settings") else None)!r}, ' + f'avatax_details={(self.avatax_details if hasattr(self, "avatax_details") else None)!r}, ' + f'public_url={(self.public_url if hasattr(self, "public_url") else None)!r}, ' + f'previous_balance_data={(self.previous_balance_data if hasattr(self, "previous_balance_data") else None)!r}, ' + f'public_url_expires_on={(self.public_url_expires_on if hasattr(self, "public_url_expires_on") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'uid={self.uid!s}, ' - f'site_id={self.site_id!s}, ' - f'customer_id={self.customer_id!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'number={self.number!s}, ' - f'sequence_number={self.sequence_number!s}, ' - f'transaction_time={self.transaction_time!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'issue_date={self.issue_date!s}, ' - f'due_date={self.due_date!s}, ' - f'paid_date={self.paid_date!s}, ' - f'status={self.status!s}, ' - f'role={self.role!s}, ' - f'parent_invoice_id={self.parent_invoice_id!s}, ' - f'collection_method={self.collection_method!s}, ' - f'payment_instructions={self.payment_instructions!s}, ' - f'currency={self.currency!s}, ' - f'consolidation_level={self.consolidation_level!s}, ' - f'parent_invoice_uid={self.parent_invoice_uid!s}, ' - f'subscription_group_id={self.subscription_group_id!s}, ' - f'parent_invoice_number={self.parent_invoice_number!s}, ' - f'group_primary_subscription_id={self.group_primary_subscription_id!s}, ' - f'product_name={self.product_name!s}, ' - f'product_family_name={self.product_family_name!s}, ' - f'seller={self.seller!s}, ' - f'customer={self.customer!s}, ' - f'payer={self.payer!s}, ' - f'recipient_emails={self.recipient_emails!s}, ' - f'net_terms={self.net_terms!s}, ' - f'memo={self.memo!s}, ' - f'billing_address={self.billing_address!s}, ' - f'shipping_address={self.shipping_address!s}, ' - f'subtotal_amount={self.subtotal_amount!s}, ' - f'discount_amount={self.discount_amount!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'total_amount={self.total_amount!s}, ' - f'credit_amount={self.credit_amount!s}, ' - f'debit_amount={self.debit_amount!s}, ' - f'refund_amount={self.refund_amount!s}, ' - f'paid_amount={self.paid_amount!s}, ' - f'due_amount={self.due_amount!s}, ' - f'line_items={self.line_items!s}, ' - f'discounts={self.discounts!s}, ' - f'taxes={self.taxes!s}, ' - f'credits={self.credits!s}, ' - f'debits={self.debits!s}, ' - f'refunds={self.refunds!s}, ' - f'payments={self.payments!s}, ' - f'custom_fields={self.custom_fields!s}, ' - f'display_settings={self.display_settings!s}, ' - f'avatax_details={self.avatax_details!s}, ' - f'public_url={self.public_url!s}, ' - f'previous_balance_data={self.previous_balance_data!s}, ' - f'public_url_expires_on={self.public_url_expires_on!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'number={(self.number if hasattr(self, "number") else None)!s}, ' + f'sequence_number={(self.sequence_number if hasattr(self, "sequence_number") else None)!s}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'issue_date={(self.issue_date if hasattr(self, "issue_date") else None)!s}, ' + f'due_date={(self.due_date if hasattr(self, "due_date") else None)!s}, ' + f'paid_date={(self.paid_date if hasattr(self, "paid_date") else None)!s}, ' + f'status={(self.status if hasattr(self, "status") else None)!s}, ' + f'role={(self.role if hasattr(self, "role") else None)!s}, ' + f'parent_invoice_id={(self.parent_invoice_id if hasattr(self, "parent_invoice_id") else None)!s}, ' + f'collection_method={(self.collection_method if hasattr(self, "collection_method") else None)!s}, ' + f'payment_instructions={(self.payment_instructions if hasattr(self, "payment_instructions") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'consolidation_level={(self.consolidation_level if hasattr(self, "consolidation_level") else None)!s}, ' + f'parent_invoice_uid={(self.parent_invoice_uid if hasattr(self, "parent_invoice_uid") else None)!s}, ' + f'subscription_group_id={(self.subscription_group_id if hasattr(self, "subscription_group_id") else None)!s}, ' + f'parent_invoice_number={(self.parent_invoice_number if hasattr(self, "parent_invoice_number") else None)!s}, ' + f'group_primary_subscription_id={(self.group_primary_subscription_id if hasattr(self, "group_primary_subscription_id") else None)!s}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!s}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!s}, ' + f'seller={(self.seller if hasattr(self, "seller") else None)!s}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!s}, ' + f'payer={(self.payer if hasattr(self, "payer") else None)!s}, ' + f'recipient_emails={(self.recipient_emails if hasattr(self, "recipient_emails") else None)!s}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!s}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!s}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!s}, ' + f'credit_amount={(self.credit_amount if hasattr(self, "credit_amount") else None)!s}, ' + f'debit_amount={(self.debit_amount if hasattr(self, "debit_amount") else None)!s}, ' + f'refund_amount={(self.refund_amount if hasattr(self, "refund_amount") else None)!s}, ' + f'paid_amount={(self.paid_amount if hasattr(self, "paid_amount") else None)!s}, ' + f'due_amount={(self.due_amount if hasattr(self, "due_amount") else None)!s}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!s}, ' + f'discounts={(self.discounts if hasattr(self, "discounts") else None)!s}, ' + f'taxes={(self.taxes if hasattr(self, "taxes") else None)!s}, ' + f'credits={(self.credits if hasattr(self, "credits") else None)!s}, ' + f'debits={(self.debits if hasattr(self, "debits") else None)!s}, ' + f'refunds={(self.refunds if hasattr(self, "refunds") else None)!s}, ' + f'payments={(self.payments if hasattr(self, "payments") else None)!s}, ' + f'custom_fields={(self.custom_fields if hasattr(self, "custom_fields") else None)!s}, ' + f'display_settings={(self.display_settings if hasattr(self, "display_settings") else None)!s}, ' + f'avatax_details={(self.avatax_details if hasattr(self, "avatax_details") else None)!s}, ' + f'public_url={(self.public_url if hasattr(self, "public_url") else None)!s}, ' + f'previous_balance_data={(self.previous_balance_data if hasattr(self, "previous_balance_data") else None)!s}, ' + f'public_url_expires_on={(self.public_url_expires_on if hasattr(self, "public_url_expires_on") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_address.py b/advancedbilling/models/invoice_address.py index 1d8e1366..c8314456 100644 --- a/advancedbilling/models/invoice_address.py +++ b/advancedbilling/models/invoice_address.py @@ -142,20 +142,20 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'street={self.street!r}, ' - f'line_2={self.line_2!r}, ' - f'city={self.city!r}, ' - f'state={self.state!r}, ' - f'zip={self.zip!r}, ' - f'country={self.country!r}, ' + f'street={(self.street if hasattr(self, "street") else None)!r}, ' + f'line_2={(self.line_2 if hasattr(self, "line_2") else None)!r}, ' + f'city={(self.city if hasattr(self, "city") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!r}, ' + f'country={(self.country if hasattr(self, "country") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'street={self.street!s}, ' - f'line_2={self.line_2!s}, ' - f'city={self.city!s}, ' - f'state={self.state!s}, ' - f'zip={self.zip!s}, ' - f'country={self.country!s}, ' + f'street={(self.street if hasattr(self, "street") else None)!s}, ' + f'line_2={(self.line_2 if hasattr(self, "line_2") else None)!s}, ' + f'city={(self.city if hasattr(self, "city") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!s}, ' + f'country={(self.country if hasattr(self, "country") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_avatax_details.py b/advancedbilling/models/invoice_avatax_details.py index 8f5880dd..dfaa5a94 100644 --- a/advancedbilling/models/invoice_avatax_details.py +++ b/advancedbilling/models/invoice_avatax_details.py @@ -139,18 +139,18 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'status={self.status!r}, ' - f'document_code={self.document_code!r}, ' - f'commit_date={self.commit_date!r}, ' - f'modify_date={self.modify_date!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'status={(self.status if hasattr(self, "status") else None)!r}, ' + f'document_code={(self.document_code if hasattr(self, "document_code") else None)!r}, ' + f'commit_date={(self.commit_date if hasattr(self, "commit_date") else None)!r}, ' + f'modify_date={(self.modify_date if hasattr(self, "modify_date") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'status={self.status!s}, ' - f'document_code={self.document_code!s}, ' - f'commit_date={self.commit_date!s}, ' - f'modify_date={self.modify_date!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'status={(self.status if hasattr(self, "status") else None)!s}, ' + f'document_code={(self.document_code if hasattr(self, "document_code") else None)!s}, ' + f'commit_date={(self.commit_date if hasattr(self, "commit_date") else None)!s}, ' + f'modify_date={(self.modify_date if hasattr(self, "modify_date") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_balance_item.py b/advancedbilling/models/invoice_balance_item.py index 86f34505..4ff93fe5 100644 --- a/advancedbilling/models/invoice_balance_item.py +++ b/advancedbilling/models/invoice_balance_item.py @@ -109,14 +109,14 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'number={self.number!r}, ' - f'outstanding_amount={self.outstanding_amount!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'number={(self.number if hasattr(self, "number") else None)!r}, ' + f'outstanding_amount={(self.outstanding_amount if hasattr(self, "outstanding_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'number={self.number!s}, ' - f'outstanding_amount={self.outstanding_amount!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'number={(self.number if hasattr(self, "number") else None)!s}, ' + f'outstanding_amount={(self.outstanding_amount if hasattr(self, "outstanding_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_credit.py b/advancedbilling/models/invoice_credit.py index e53f7721..184cf287 100644 --- a/advancedbilling/models/invoice_credit.py +++ b/advancedbilling/models/invoice_credit.py @@ -141,22 +141,22 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'credit_note_number={self.credit_note_number!r}, ' - f'credit_note_uid={self.credit_note_uid!r}, ' - f'transaction_time={self.transaction_time!r}, ' - f'memo={self.memo!r}, ' - f'original_amount={self.original_amount!r}, ' - f'applied_amount={self.applied_amount!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'credit_note_number={(self.credit_note_number if hasattr(self, "credit_note_number") else None)!r}, ' + f'credit_note_uid={(self.credit_note_uid if hasattr(self, "credit_note_uid") else None)!r}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!r}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'credit_note_number={self.credit_note_number!s}, ' - f'credit_note_uid={self.credit_note_uid!s}, ' - f'transaction_time={self.transaction_time!s}, ' - f'memo={self.memo!s}, ' - f'original_amount={self.original_amount!s}, ' - f'applied_amount={self.applied_amount!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'credit_note_number={(self.credit_note_number if hasattr(self, "credit_note_number") else None)!s}, ' + f'credit_note_uid={(self.credit_note_uid if hasattr(self, "credit_note_uid") else None)!s}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!s}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_custom_field.py b/advancedbilling/models/invoice_custom_field.py index 08c6e039..162ee01f 100644 --- a/advancedbilling/models/invoice_custom_field.py +++ b/advancedbilling/models/invoice_custom_field.py @@ -126,18 +126,18 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'owner_id={self.owner_id!r}, ' - f'owner_type={self.owner_type!r}, ' - f'name={self.name!r}, ' - f'value={self.value!r}, ' - f'metadatum_id={self.metadatum_id!r}, ' + f'owner_id={(self.owner_id if hasattr(self, "owner_id") else None)!r}, ' + f'owner_type={(self.owner_type if hasattr(self, "owner_type") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'value={(self.value if hasattr(self, "value") else None)!r}, ' + f'metadatum_id={(self.metadatum_id if hasattr(self, "metadatum_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'owner_id={self.owner_id!s}, ' - f'owner_type={self.owner_type!s}, ' - f'name={self.name!s}, ' - f'value={self.value!s}, ' - f'metadatum_id={self.metadatum_id!s}, ' + f'owner_id={(self.owner_id if hasattr(self, "owner_id") else None)!s}, ' + f'owner_type={(self.owner_type if hasattr(self, "owner_type") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'value={(self.value if hasattr(self, "value") else None)!s}, ' + f'metadatum_id={(self.metadatum_id if hasattr(self, "metadatum_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_customer.py b/advancedbilling/models/invoice_customer.py index 5b0a4036..dfd8548f 100644 --- a/advancedbilling/models/invoice_customer.py +++ b/advancedbilling/models/invoice_customer.py @@ -151,22 +151,22 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'chargify_id={self.chargify_id!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'organization={self.organization!r}, ' - f'email={self.email!r}, ' - f'vat_number={self.vat_number!r}, ' - f'reference={self.reference!r}, ' + f'chargify_id={(self.chargify_id if hasattr(self, "chargify_id") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!r}, ' + f'email={(self.email if hasattr(self, "email") else None)!r}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'chargify_id={self.chargify_id!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'organization={self.organization!s}, ' - f'email={self.email!s}, ' - f'vat_number={self.vat_number!s}, ' - f'reference={self.reference!s}, ' + f'chargify_id={(self.chargify_id if hasattr(self, "chargify_id") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!s}, ' + f'email={(self.email if hasattr(self, "email") else None)!s}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_debit.py b/advancedbilling/models/invoice_debit.py index b1fd9b63..86a89803 100644 --- a/advancedbilling/models/invoice_debit.py +++ b/advancedbilling/models/invoice_debit.py @@ -149,24 +149,24 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'debit_note_number={self.debit_note_number!r}, ' - f'debit_note_uid={self.debit_note_uid!r}, ' - f'role={self.role!r}, ' - f'transaction_time={self.transaction_time!r}, ' - f'memo={self.memo!r}, ' - f'original_amount={self.original_amount!r}, ' - f'applied_amount={self.applied_amount!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'debit_note_number={(self.debit_note_number if hasattr(self, "debit_note_number") else None)!r}, ' + f'debit_note_uid={(self.debit_note_uid if hasattr(self, "debit_note_uid") else None)!r}, ' + f'role={(self.role if hasattr(self, "role") else None)!r}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!r}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'debit_note_number={self.debit_note_number!s}, ' - f'debit_note_uid={self.debit_note_uid!s}, ' - f'role={self.role!s}, ' - f'transaction_time={self.transaction_time!s}, ' - f'memo={self.memo!s}, ' - f'original_amount={self.original_amount!s}, ' - f'applied_amount={self.applied_amount!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'debit_note_number={(self.debit_note_number if hasattr(self, "debit_note_number") else None)!s}, ' + f'debit_note_uid={(self.debit_note_uid if hasattr(self, "debit_note_uid") else None)!s}, ' + f'role={(self.role if hasattr(self, "role") else None)!s}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!s}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_discount.py b/advancedbilling/models/invoice_discount.py index 387c3c55..d40b2d97 100644 --- a/advancedbilling/models/invoice_discount.py +++ b/advancedbilling/models/invoice_discount.py @@ -193,32 +193,32 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'title={self.title!r}, ' - f'description={self.description!r}, ' - f'code={self.code!r}, ' - f'source_type={self.source_type!r}, ' - f'source_id={self.source_id!r}, ' - f'discount_type={self.discount_type!r}, ' - f'percentage={self.percentage!r}, ' - f'eligible_amount={self.eligible_amount!r}, ' - f'discount_amount={self.discount_amount!r}, ' - f'transaction_id={self.transaction_id!r}, ' - f'line_item_breakouts={self.line_item_breakouts!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'title={(self.title if hasattr(self, "title") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'code={(self.code if hasattr(self, "code") else None)!r}, ' + f'source_type={(self.source_type if hasattr(self, "source_type") else None)!r}, ' + f'source_id={(self.source_id if hasattr(self, "source_id") else None)!r}, ' + f'discount_type={(self.discount_type if hasattr(self, "discount_type") else None)!r}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!r}, ' + f'eligible_amount={(self.eligible_amount if hasattr(self, "eligible_amount") else None)!r}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!r}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!r}, ' + f'line_item_breakouts={(self.line_item_breakouts if hasattr(self, "line_item_breakouts") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'title={self.title!s}, ' - f'description={self.description!s}, ' - f'code={self.code!s}, ' - f'source_type={self.source_type!s}, ' - f'source_id={self.source_id!s}, ' - f'discount_type={self.discount_type!s}, ' - f'percentage={self.percentage!s}, ' - f'eligible_amount={self.eligible_amount!s}, ' - f'discount_amount={self.discount_amount!s}, ' - f'transaction_id={self.transaction_id!s}, ' - f'line_item_breakouts={self.line_item_breakouts!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'title={(self.title if hasattr(self, "title") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'code={(self.code if hasattr(self, "code") else None)!s}, ' + f'source_type={(self.source_type if hasattr(self, "source_type") else None)!s}, ' + f'source_id={(self.source_id if hasattr(self, "source_id") else None)!s}, ' + f'discount_type={(self.discount_type if hasattr(self, "discount_type") else None)!s}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!s}, ' + f'eligible_amount={(self.eligible_amount if hasattr(self, "eligible_amount") else None)!s}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!s}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!s}, ' + f'line_item_breakouts={(self.line_item_breakouts if hasattr(self, "line_item_breakouts") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_discount_breakout.py b/advancedbilling/models/invoice_discount_breakout.py index d0ad175e..9e60b648 100644 --- a/advancedbilling/models/invoice_discount_breakout.py +++ b/advancedbilling/models/invoice_discount_breakout.py @@ -109,14 +109,14 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'eligible_amount={self.eligible_amount!r}, ' - f'discount_amount={self.discount_amount!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'eligible_amount={(self.eligible_amount if hasattr(self, "eligible_amount") else None)!r}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'eligible_amount={self.eligible_amount!s}, ' - f'discount_amount={self.discount_amount!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'eligible_amount={(self.eligible_amount if hasattr(self, "eligible_amount") else None)!s}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_display_settings.py b/advancedbilling/models/invoice_display_settings.py index 33cce68f..176cfe2d 100644 --- a/advancedbilling/models/invoice_display_settings.py +++ b/advancedbilling/models/invoice_display_settings.py @@ -101,12 +101,12 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'hide_zero_subtotal_lines={self.hide_zero_subtotal_lines!r}, ' - f'include_discounts_on_lines={self.include_discounts_on_lines!r}, ' + f'hide_zero_subtotal_lines={(self.hide_zero_subtotal_lines if hasattr(self, "hide_zero_subtotal_lines") else None)!r}, ' + f'include_discounts_on_lines={(self.include_discounts_on_lines if hasattr(self, "include_discounts_on_lines") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'hide_zero_subtotal_lines={self.hide_zero_subtotal_lines!s}, ' - f'include_discounts_on_lines={self.include_discounts_on_lines!s}, ' + f'hide_zero_subtotal_lines={(self.hide_zero_subtotal_lines if hasattr(self, "hide_zero_subtotal_lines") else None)!s}, ' + f'include_discounts_on_lines={(self.include_discounts_on_lines if hasattr(self, "include_discounts_on_lines") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_line_item.py b/advancedbilling/models/invoice_line_item.py index 14800946..d886dc02 100644 --- a/advancedbilling/models/invoice_line_item.py +++ b/advancedbilling/models/invoice_line_item.py @@ -339,54 +339,54 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'title={self.title!r}, ' - f'description={self.description!r}, ' - f'quantity={self.quantity!r}, ' - f'unit_price={self.unit_price!r}, ' - f'subtotal_amount={self.subtotal_amount!r}, ' - f'discount_amount={self.discount_amount!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'total_amount={self.total_amount!r}, ' - f'tiered_unit_price={self.tiered_unit_price!r}, ' - f'period_range_start={self.period_range_start!r}, ' - f'period_range_end={self.period_range_end!r}, ' - f'transaction_id={self.transaction_id!r}, ' - f'product_id={self.product_id!r}, ' - f'product_version={self.product_version!r}, ' - f'component_id={self.component_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'billing_schedule_item_id={self.billing_schedule_item_id!r}, ' - f'hide={self.hide!r}, ' - f'component_cost_data={self.component_cost_data!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'custom_item={self.custom_item!r}, ' - f'kind={self.kind!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'title={(self.title if hasattr(self, "title") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!r}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!r}, ' + f'tiered_unit_price={(self.tiered_unit_price if hasattr(self, "tiered_unit_price") else None)!r}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!r}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!r}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_version={(self.product_version if hasattr(self, "product_version") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'billing_schedule_item_id={(self.billing_schedule_item_id if hasattr(self, "billing_schedule_item_id") else None)!r}, ' + f'hide={(self.hide if hasattr(self, "hide") else None)!r}, ' + f'component_cost_data={(self.component_cost_data if hasattr(self, "component_cost_data") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'custom_item={(self.custom_item if hasattr(self, "custom_item") else None)!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'title={self.title!s}, ' - f'description={self.description!s}, ' - f'quantity={self.quantity!s}, ' - f'unit_price={self.unit_price!s}, ' - f'subtotal_amount={self.subtotal_amount!s}, ' - f'discount_amount={self.discount_amount!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'total_amount={self.total_amount!s}, ' - f'tiered_unit_price={self.tiered_unit_price!s}, ' - f'period_range_start={self.period_range_start!s}, ' - f'period_range_end={self.period_range_end!s}, ' - f'transaction_id={self.transaction_id!s}, ' - f'product_id={self.product_id!s}, ' - f'product_version={self.product_version!s}, ' - f'component_id={self.component_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'billing_schedule_item_id={self.billing_schedule_item_id!s}, ' - f'hide={self.hide!s}, ' - f'component_cost_data={self.component_cost_data!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'custom_item={self.custom_item!s}, ' - f'kind={self.kind!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'title={(self.title if hasattr(self, "title") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!s}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!s}, ' + f'tiered_unit_price={(self.tiered_unit_price if hasattr(self, "tiered_unit_price") else None)!s}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!s}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!s}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_version={(self.product_version if hasattr(self, "product_version") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'billing_schedule_item_id={(self.billing_schedule_item_id if hasattr(self, "billing_schedule_item_id") else None)!s}, ' + f'hide={(self.hide if hasattr(self, "hide") else None)!s}, ' + f'component_cost_data={(self.component_cost_data if hasattr(self, "component_cost_data") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'custom_item={(self.custom_item if hasattr(self, "custom_item") else None)!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_line_item_component_cost_data.py b/advancedbilling/models/invoice_line_item_component_cost_data.py index b2b01d68..4531ed37 100644 --- a/advancedbilling/models/invoice_line_item_component_cost_data.py +++ b/advancedbilling/models/invoice_line_item_component_cost_data.py @@ -99,10 +99,10 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'rates={self.rates!r}, ' + f'rates={(self.rates if hasattr(self, "rates") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'rates={self.rates!s}, ' + f'rates={(self.rates if hasattr(self, "rates") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_line_item_event_data.py b/advancedbilling/models/invoice_line_item_event_data.py index 68595a88..70679e02 100644 --- a/advancedbilling/models/invoice_line_item_event_data.py +++ b/advancedbilling/models/invoice_line_item_event_data.py @@ -262,48 +262,48 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'title={self.title!r}, ' - f'description={self.description!r}, ' - f'quantity={self.quantity!r}, ' - f'quantity_delta={self.quantity_delta!r}, ' - f'unit_price={self.unit_price!r}, ' - f'period_range_start={self.period_range_start!r}, ' - f'period_range_end={self.period_range_end!r}, ' - f'amount={self.amount!r}, ' - f'line_references={self.line_references!r}, ' - f'pricing_details_index={self.pricing_details_index!r}, ' - f'pricing_details={self.pricing_details!r}, ' - f'tax_code={self.tax_code!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'product_id={self.product_id!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'component_id={self.component_id!r}, ' - f'billing_schedule_item_id={self.billing_schedule_item_id!r}, ' - f'custom_item={self.custom_item!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'title={(self.title if hasattr(self, "title") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'quantity_delta={(self.quantity_delta if hasattr(self, "quantity_delta") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!r}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' + f'line_references={(self.line_references if hasattr(self, "line_references") else None)!r}, ' + f'pricing_details_index={(self.pricing_details_index if hasattr(self, "pricing_details_index") else None)!r}, ' + f'pricing_details={(self.pricing_details if hasattr(self, "pricing_details") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'billing_schedule_item_id={(self.billing_schedule_item_id if hasattr(self, "billing_schedule_item_id") else None)!r}, ' + f'custom_item={(self.custom_item if hasattr(self, "custom_item") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'title={self.title!s}, ' - f'description={self.description!s}, ' - f'quantity={self.quantity!s}, ' - f'quantity_delta={self.quantity_delta!s}, ' - f'unit_price={self.unit_price!s}, ' - f'period_range_start={self.period_range_start!s}, ' - f'period_range_end={self.period_range_end!s}, ' - f'amount={self.amount!s}, ' - f'line_references={self.line_references!s}, ' - f'pricing_details_index={self.pricing_details_index!s}, ' - f'pricing_details={self.pricing_details!s}, ' - f'tax_code={self.tax_code!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'product_id={self.product_id!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'component_id={self.component_id!s}, ' - f'billing_schedule_item_id={self.billing_schedule_item_id!s}, ' - f'custom_item={self.custom_item!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'title={(self.title if hasattr(self, "title") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'quantity_delta={(self.quantity_delta if hasattr(self, "quantity_delta") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!s}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' + f'line_references={(self.line_references if hasattr(self, "line_references") else None)!s}, ' + f'pricing_details_index={(self.pricing_details_index if hasattr(self, "pricing_details_index") else None)!s}, ' + f'pricing_details={(self.pricing_details if hasattr(self, "pricing_details") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'billing_schedule_item_id={(self.billing_schedule_item_id if hasattr(self, "billing_schedule_item_id") else None)!s}, ' + f'custom_item={(self.custom_item if hasattr(self, "custom_item") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_line_item_pricing_detail.py b/advancedbilling/models/invoice_line_item_pricing_detail.py index bd29e855..031b333d 100644 --- a/advancedbilling/models/invoice_line_item_pricing_detail.py +++ b/advancedbilling/models/invoice_line_item_pricing_detail.py @@ -101,12 +101,12 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'label={self.label!r}, ' - f'amount={self.amount!r}, ' + f'label={(self.label if hasattr(self, "label") else None)!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'label={self.label!s}, ' - f'amount={self.amount!s}, ' + f'label={(self.label if hasattr(self, "label") else None)!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_payer.py b/advancedbilling/models/invoice_payer.py index 6a6b36c6..4b131de8 100644 --- a/advancedbilling/models/invoice_payer.py +++ b/advancedbilling/models/invoice_payer.py @@ -138,20 +138,20 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'chargify_id={self.chargify_id!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'organization={self.organization!r}, ' - f'email={self.email!r}, ' - f'vat_number={self.vat_number!r}, ' + f'chargify_id={(self.chargify_id if hasattr(self, "chargify_id") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!r}, ' + f'email={(self.email if hasattr(self, "email") else None)!r}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'chargify_id={self.chargify_id!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'organization={self.organization!s}, ' - f'email={self.email!s}, ' - f'vat_number={self.vat_number!s}, ' + f'chargify_id={(self.chargify_id if hasattr(self, "chargify_id") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!s}, ' + f'email={(self.email if hasattr(self, "email") else None)!s}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_payer_change.py b/advancedbilling/models/invoice_payer_change.py index d05fc5e7..bb9febcb 100644 --- a/advancedbilling/models/invoice_payer_change.py +++ b/advancedbilling/models/invoice_payer_change.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'organization={self.organization!r}, ' - f'email={self.email!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!r}, ' + f'email={(self.email if hasattr(self, "email") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'organization={self.organization!s}, ' - f'email={self.email!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!s}, ' + f'email={(self.email if hasattr(self, "email") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_payment.py b/advancedbilling/models/invoice_payment.py index d98b91bc..e098da70 100644 --- a/advancedbilling/models/invoice_payment.py +++ b/advancedbilling/models/invoice_payment.py @@ -197,32 +197,32 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'transaction_time={self.transaction_time!r}, ' - f'memo={self.memo!r}, ' - f'original_amount={self.original_amount!r}, ' - f'applied_amount={self.applied_amount!r}, ' - f'payment_method={self.payment_method!r}, ' - f'transaction_id={self.transaction_id!r}, ' - f'prepayment={self.prepayment!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' - f'gateway_used={self.gateway_used!r}, ' - f'gateway_transaction_id={self.gateway_transaction_id!r}, ' - f'received_on={self.received_on!r}, ' - f'uid={self.uid!r}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!r}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!r}, ' + f'payment_method={(self.payment_method if hasattr(self, "payment_method") else None)!r}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!r}, ' + f'prepayment={(self.prepayment if hasattr(self, "prepayment") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' + f'gateway_used={(self.gateway_used if hasattr(self, "gateway_used") else None)!r}, ' + f'gateway_transaction_id={(self.gateway_transaction_id if hasattr(self, "gateway_transaction_id") else None)!r}, ' + f'received_on={(self.received_on if hasattr(self, "received_on") else None)!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'transaction_time={self.transaction_time!s}, ' - f'memo={self.memo!s}, ' - f'original_amount={self.original_amount!s}, ' - f'applied_amount={self.applied_amount!s}, ' - f'payment_method={self.payment_method!s}, ' - f'transaction_id={self.transaction_id!s}, ' - f'prepayment={self.prepayment!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' - f'gateway_used={self.gateway_used!s}, ' - f'gateway_transaction_id={self.gateway_transaction_id!s}, ' - f'received_on={self.received_on!s}, ' - f'uid={self.uid!s}, ' + f'transaction_time={(self.transaction_time if hasattr(self, "transaction_time") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!s}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!s}, ' + f'payment_method={(self.payment_method if hasattr(self, "payment_method") else None)!s}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!s}, ' + f'prepayment={(self.prepayment if hasattr(self, "prepayment") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' + f'gateway_used={(self.gateway_used if hasattr(self, "gateway_used") else None)!s}, ' + f'gateway_transaction_id={(self.gateway_transaction_id if hasattr(self, "gateway_transaction_id") else None)!s}, ' + f'received_on={(self.received_on if hasattr(self, "received_on") else None)!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_payment_application.py b/advancedbilling/models/invoice_payment_application.py index cf5c4cd6..f0c4f409 100644 --- a/advancedbilling/models/invoice_payment_application.py +++ b/advancedbilling/models/invoice_payment_application.py @@ -89,14 +89,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'invoice_uid={self.invoice_uid!r}, ' - f'application_uid={self.application_uid!r}, ' - f'applied_amount={self.applied_amount!r}, ' + f'invoice_uid={(self.invoice_uid if hasattr(self, "invoice_uid") else None)!r}, ' + f'application_uid={(self.application_uid if hasattr(self, "application_uid") else None)!r}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'invoice_uid={self.invoice_uid!s}, ' - f'application_uid={self.application_uid!s}, ' - f'applied_amount={self.applied_amount!s}, ' + f'invoice_uid={(self.invoice_uid if hasattr(self, "invoice_uid") else None)!s}, ' + f'application_uid={(self.application_uid if hasattr(self, "application_uid") else None)!s}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_payment_method.py b/advancedbilling/models/invoice_payment_method.py index 2708d3de..9dad2e1a 100644 --- a/advancedbilling/models/invoice_payment_method.py +++ b/advancedbilling/models/invoice_payment_method.py @@ -153,24 +153,24 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'details={self.details!r}, ' - f'kind={self.kind!r}, ' - f'memo={self.memo!r}, ' - f'mtype={self.mtype!r}, ' - f'card_brand={self.card_brand!r}, ' - f'card_expiration={self.card_expiration!r}, ' - f'last_four={self.last_four!r}, ' - f'masked_card_number={self.masked_card_number!r}, ' + f'details={(self.details if hasattr(self, "details") else None)!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!r}, ' + f'card_brand={(self.card_brand if hasattr(self, "card_brand") else None)!r}, ' + f'card_expiration={(self.card_expiration if hasattr(self, "card_expiration") else None)!r}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!r}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'details={self.details!s}, ' - f'kind={self.kind!s}, ' - f'memo={self.memo!s}, ' - f'mtype={self.mtype!s}, ' - f'card_brand={self.card_brand!s}, ' - f'card_expiration={self.card_expiration!s}, ' - f'last_four={self.last_four!s}, ' - f'masked_card_number={self.masked_card_number!s}, ' + f'details={(self.details if hasattr(self, "details") else None)!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!s}, ' + f'card_brand={(self.card_brand if hasattr(self, "card_brand") else None)!s}, ' + f'card_expiration={(self.card_expiration if hasattr(self, "card_expiration") else None)!s}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!s}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_pre_payment.py b/advancedbilling/models/invoice_pre_payment.py index d6349cd7..e3a0e538 100644 --- a/advancedbilling/models/invoice_pre_payment.py +++ b/advancedbilling/models/invoice_pre_payment.py @@ -89,14 +89,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'subscription_id={self.subscription_id!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'ending_balance_in_cents={self.ending_balance_in_cents!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'subscription_id={self.subscription_id!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'ending_balance_in_cents={self.ending_balance_in_cents!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_previous_balance.py b/advancedbilling/models/invoice_previous_balance.py index e894e769..17cf67d7 100644 --- a/advancedbilling/models/invoice_previous_balance.py +++ b/advancedbilling/models/invoice_previous_balance.py @@ -107,12 +107,12 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'captured_at={self.captured_at!r}, ' - f'invoices={self.invoices!r}, ' + f'captured_at={(self.captured_at if hasattr(self, "captured_at") else None)!r}, ' + f'invoices={(self.invoices if hasattr(self, "invoices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'captured_at={self.captured_at!s}, ' - f'invoices={self.invoices!s}, ' + f'captured_at={(self.captured_at if hasattr(self, "captured_at") else None)!s}, ' + f'invoices={(self.invoices if hasattr(self, "invoices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_refund.py b/advancedbilling/models/invoice_refund.py index 7fca4cc3..1608bff0 100644 --- a/advancedbilling/models/invoice_refund.py +++ b/advancedbilling/models/invoice_refund.py @@ -164,26 +164,26 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'transaction_id={self.transaction_id!r}, ' - f'payment_id={self.payment_id!r}, ' - f'memo={self.memo!r}, ' - f'original_amount={self.original_amount!r}, ' - f'applied_amount={self.applied_amount!r}, ' - f'gateway_transaction_id={self.gateway_transaction_id!r}, ' - f'gateway_used={self.gateway_used!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' - f'ach_late_reject={self.ach_late_reject!r}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!r}, ' + f'payment_id={(self.payment_id if hasattr(self, "payment_id") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!r}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!r}, ' + f'gateway_transaction_id={(self.gateway_transaction_id if hasattr(self, "gateway_transaction_id") else None)!r}, ' + f'gateway_used={(self.gateway_used if hasattr(self, "gateway_used") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' + f'ach_late_reject={(self.ach_late_reject if hasattr(self, "ach_late_reject") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'transaction_id={self.transaction_id!s}, ' - f'payment_id={self.payment_id!s}, ' - f'memo={self.memo!s}, ' - f'original_amount={self.original_amount!s}, ' - f'applied_amount={self.applied_amount!s}, ' - f'gateway_transaction_id={self.gateway_transaction_id!s}, ' - f'gateway_used={self.gateway_used!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' - f'ach_late_reject={self.ach_late_reject!s}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!s}, ' + f'payment_id={(self.payment_id if hasattr(self, "payment_id") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!s}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!s}, ' + f'gateway_transaction_id={(self.gateway_transaction_id if hasattr(self, "gateway_transaction_id") else None)!s}, ' + f'gateway_used={(self.gateway_used if hasattr(self, "gateway_used") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' + f'ach_late_reject={(self.ach_late_reject if hasattr(self, "ach_late_reject") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_seller.py b/advancedbilling/models/invoice_seller.py index 7a64d883..7a8c7435 100644 --- a/advancedbilling/models/invoice_seller.py +++ b/advancedbilling/models/invoice_seller.py @@ -125,16 +125,16 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!r}, ' - f'address={self.address!r}, ' - f'phone={self.phone!r}, ' - f'logo_url={self.logo_url!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'address={(self.address if hasattr(self, "address") else None)!r}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!r}, ' + f'logo_url={(self.logo_url if hasattr(self, "logo_url") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!s}, ' - f'address={self.address!s}, ' - f'phone={self.phone!s}, ' - f'logo_url={self.logo_url!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'address={(self.address if hasattr(self, "address") else None)!s}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!s}, ' + f'logo_url={(self.logo_url if hasattr(self, "logo_url") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_tax.py b/advancedbilling/models/invoice_tax.py index e0f4b3df..42bcadc1 100644 --- a/advancedbilling/models/invoice_tax.py +++ b/advancedbilling/models/invoice_tax.py @@ -214,36 +214,36 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'title={self.title!r}, ' - f'description={self.description!r}, ' - f'source_type={self.source_type!r}, ' - f'source_id={self.source_id!r}, ' - f'percentage={self.percentage!r}, ' - f'taxable_amount={self.taxable_amount!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'transaction_id={self.transaction_id!r}, ' - f'line_item_breakouts={self.line_item_breakouts!r}, ' - f'tax_component_breakouts={self.tax_component_breakouts!r}, ' - f'eu_vat={self.eu_vat!r}, ' - f'mtype={self.mtype!r}, ' - f'tax_exempt_amount={self.tax_exempt_amount!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'title={(self.title if hasattr(self, "title") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'source_type={(self.source_type if hasattr(self, "source_type") else None)!r}, ' + f'source_id={(self.source_id if hasattr(self, "source_id") else None)!r}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!r}, ' + f'taxable_amount={(self.taxable_amount if hasattr(self, "taxable_amount") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!r}, ' + f'line_item_breakouts={(self.line_item_breakouts if hasattr(self, "line_item_breakouts") else None)!r}, ' + f'tax_component_breakouts={(self.tax_component_breakouts if hasattr(self, "tax_component_breakouts") else None)!r}, ' + f'eu_vat={(self.eu_vat if hasattr(self, "eu_vat") else None)!r}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!r}, ' + f'tax_exempt_amount={(self.tax_exempt_amount if hasattr(self, "tax_exempt_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'title={self.title!s}, ' - f'description={self.description!s}, ' - f'source_type={self.source_type!s}, ' - f'source_id={self.source_id!s}, ' - f'percentage={self.percentage!s}, ' - f'taxable_amount={self.taxable_amount!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'transaction_id={self.transaction_id!s}, ' - f'line_item_breakouts={self.line_item_breakouts!s}, ' - f'tax_component_breakouts={self.tax_component_breakouts!s}, ' - f'eu_vat={self.eu_vat!s}, ' - f'mtype={self.mtype!s}, ' - f'tax_exempt_amount={self.tax_exempt_amount!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'title={(self.title if hasattr(self, "title") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'source_type={(self.source_type if hasattr(self, "source_type") else None)!s}, ' + f'source_id={(self.source_id if hasattr(self, "source_id") else None)!s}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!s}, ' + f'taxable_amount={(self.taxable_amount if hasattr(self, "taxable_amount") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!s}, ' + f'line_item_breakouts={(self.line_item_breakouts if hasattr(self, "line_item_breakouts") else None)!s}, ' + f'tax_component_breakouts={(self.tax_component_breakouts if hasattr(self, "tax_component_breakouts") else None)!s}, ' + f'eu_vat={(self.eu_vat if hasattr(self, "eu_vat") else None)!s}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!s}, ' + f'tax_exempt_amount={(self.tax_exempt_amount if hasattr(self, "tax_exempt_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_tax_breakout.py b/advancedbilling/models/invoice_tax_breakout.py index 45b66103..8a34ab22 100644 --- a/advancedbilling/models/invoice_tax_breakout.py +++ b/advancedbilling/models/invoice_tax_breakout.py @@ -117,16 +117,16 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'taxable_amount={self.taxable_amount!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'tax_exempt_amount={self.tax_exempt_amount!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'taxable_amount={(self.taxable_amount if hasattr(self, "taxable_amount") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'tax_exempt_amount={(self.tax_exempt_amount if hasattr(self, "tax_exempt_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'taxable_amount={self.taxable_amount!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'tax_exempt_amount={self.tax_exempt_amount!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'taxable_amount={(self.taxable_amount if hasattr(self, "taxable_amount") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'tax_exempt_amount={(self.tax_exempt_amount if hasattr(self, "tax_exempt_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/invoice_tax_component_breakout.py b/advancedbilling/models/invoice_tax_component_breakout.py index 6686b0e2..bd628d16 100644 --- a/advancedbilling/models/invoice_tax_component_breakout.py +++ b/advancedbilling/models/invoice_tax_component_breakout.py @@ -197,36 +197,36 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'tax_rule_id={self.tax_rule_id!r}, ' - f'percentage={self.percentage!r}, ' - f'country_code={self.country_code!r}, ' - f'subdivision_code={self.subdivision_code!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'taxable_amount={self.taxable_amount!r}, ' - f'tax_exempt_amount={self.tax_exempt_amount!r}, ' - f'non_taxable_amount={self.non_taxable_amount!r}, ' - f'tax_name={self.tax_name!r}, ' - f'tax_type={self.tax_type!r}, ' - f'rate_type={self.rate_type!r}, ' - f'tax_authority_type={self.tax_authority_type!r}, ' - f'state_assigned_no={self.state_assigned_no!r}, ' - f'tax_sub_type={self.tax_sub_type!r}, ' + f'tax_rule_id={(self.tax_rule_id if hasattr(self, "tax_rule_id") else None)!r}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!r}, ' + f'country_code={(self.country_code if hasattr(self, "country_code") else None)!r}, ' + f'subdivision_code={(self.subdivision_code if hasattr(self, "subdivision_code") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'taxable_amount={(self.taxable_amount if hasattr(self, "taxable_amount") else None)!r}, ' + f'tax_exempt_amount={(self.tax_exempt_amount if hasattr(self, "tax_exempt_amount") else None)!r}, ' + f'non_taxable_amount={(self.non_taxable_amount if hasattr(self, "non_taxable_amount") else None)!r}, ' + f'tax_name={(self.tax_name if hasattr(self, "tax_name") else None)!r}, ' + f'tax_type={(self.tax_type if hasattr(self, "tax_type") else None)!r}, ' + f'rate_type={(self.rate_type if hasattr(self, "rate_type") else None)!r}, ' + f'tax_authority_type={(self.tax_authority_type if hasattr(self, "tax_authority_type") else None)!r}, ' + f'state_assigned_no={(self.state_assigned_no if hasattr(self, "state_assigned_no") else None)!r}, ' + f'tax_sub_type={(self.tax_sub_type if hasattr(self, "tax_sub_type") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'tax_rule_id={self.tax_rule_id!s}, ' - f'percentage={self.percentage!s}, ' - f'country_code={self.country_code!s}, ' - f'subdivision_code={self.subdivision_code!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'taxable_amount={self.taxable_amount!s}, ' - f'tax_exempt_amount={self.tax_exempt_amount!s}, ' - f'non_taxable_amount={self.non_taxable_amount!s}, ' - f'tax_name={self.tax_name!s}, ' - f'tax_type={self.tax_type!s}, ' - f'rate_type={self.rate_type!s}, ' - f'tax_authority_type={self.tax_authority_type!s}, ' - f'state_assigned_no={self.state_assigned_no!s}, ' - f'tax_sub_type={self.tax_sub_type!s}, ' + f'tax_rule_id={(self.tax_rule_id if hasattr(self, "tax_rule_id") else None)!s}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!s}, ' + f'country_code={(self.country_code if hasattr(self, "country_code") else None)!s}, ' + f'subdivision_code={(self.subdivision_code if hasattr(self, "subdivision_code") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'taxable_amount={(self.taxable_amount if hasattr(self, "taxable_amount") else None)!s}, ' + f'tax_exempt_amount={(self.tax_exempt_amount if hasattr(self, "tax_exempt_amount") else None)!s}, ' + f'non_taxable_amount={(self.non_taxable_amount if hasattr(self, "non_taxable_amount") else None)!s}, ' + f'tax_name={(self.tax_name if hasattr(self, "tax_name") else None)!s}, ' + f'tax_type={(self.tax_type if hasattr(self, "tax_type") else None)!s}, ' + f'rate_type={(self.rate_type if hasattr(self, "rate_type") else None)!s}, ' + f'tax_authority_type={(self.tax_authority_type if hasattr(self, "tax_authority_type") else None)!s}, ' + f'state_assigned_no={(self.state_assigned_no if hasattr(self, "state_assigned_no") else None)!s}, ' + f'tax_sub_type={(self.tax_sub_type if hasattr(self, "tax_sub_type") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/issue_advance_invoice_request.py b/advancedbilling/models/issue_advance_invoice_request.py index a5a94137..f9256911 100644 --- a/advancedbilling/models/issue_advance_invoice_request.py +++ b/advancedbilling/models/issue_advance_invoice_request.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'force={self.force!r}, ' + f'force={(self.force if hasattr(self, "force") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'force={self.force!s}, ' + f'force={(self.force if hasattr(self, "force") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/issue_invoice_request.py b/advancedbilling/models/issue_invoice_request.py index f9d7d9ae..dedc3804 100644 --- a/advancedbilling/models/issue_invoice_request.py +++ b/advancedbilling/models/issue_invoice_request.py @@ -83,10 +83,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'on_failed_payment={self.on_failed_payment!r}, ' + f'on_failed_payment={(self.on_failed_payment if hasattr(self, "on_failed_payment") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'on_failed_payment={self.on_failed_payment!s}, ' + f'on_failed_payment={(self.on_failed_payment if hasattr(self, "on_failed_payment") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/issue_service_credit.py b/advancedbilling/models/issue_service_credit.py index 85251f15..1cb4f9d5 100644 --- a/advancedbilling/models/issue_service_credit.py +++ b/advancedbilling/models/issue_service_credit.py @@ -102,11 +102,11 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'amount={self.amount!r}, ' - f'memo={self.memo!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'amount={self.amount!s}, ' - f'memo={self.memo!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/item_price_point_data.py b/advancedbilling/models/item_price_point_data.py index 34657235..3dddb453 100644 --- a/advancedbilling/models/item_price_point_data.py +++ b/advancedbilling/models/item_price_point_data.py @@ -109,14 +109,14 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'handle={self.handle!r}, ' - f'name={self.name!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'handle={self.handle!s}, ' - f'name={self.name!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_components_filter.py b/advancedbilling/models/list_components_filter.py index b595c092..a2b91191 100644 --- a/advancedbilling/models/list_components_filter.py +++ b/advancedbilling/models/list_components_filter.py @@ -83,12 +83,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'ids={self.ids!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' + f'ids={(self.ids if hasattr(self, "ids") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'ids={self.ids!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' + f'ids={(self.ids if hasattr(self, "ids") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_coupons_filter.py b/advancedbilling/models/list_coupons_filter.py index 1f766063..0dd0a494 100644 --- a/advancedbilling/models/list_coupons_filter.py +++ b/advancedbilling/models/list_coupons_filter.py @@ -152,24 +152,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'date_field={self.date_field!r}, ' - f'start_date={self.start_date!r}, ' - f'end_date={self.end_date!r}, ' - f'start_datetime={self.start_datetime!r}, ' - f'end_datetime={self.end_datetime!r}, ' - f'ids={self.ids!r}, ' - f'codes={self.codes!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' + f'date_field={(self.date_field if hasattr(self, "date_field") else None)!r}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!r}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!r}, ' + f'start_datetime={(self.start_datetime if hasattr(self, "start_datetime") else None)!r}, ' + f'end_datetime={(self.end_datetime if hasattr(self, "end_datetime") else None)!r}, ' + f'ids={(self.ids if hasattr(self, "ids") else None)!r}, ' + f'codes={(self.codes if hasattr(self, "codes") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'date_field={self.date_field!s}, ' - f'start_date={self.start_date!s}, ' - f'end_date={self.end_date!s}, ' - f'start_datetime={self.start_datetime!s}, ' - f'end_datetime={self.end_datetime!s}, ' - f'ids={self.ids!s}, ' - f'codes={self.codes!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' + f'date_field={(self.date_field if hasattr(self, "date_field") else None)!s}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!s}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!s}, ' + f'start_datetime={(self.start_datetime if hasattr(self, "start_datetime") else None)!s}, ' + f'end_datetime={(self.end_datetime if hasattr(self, "end_datetime") else None)!s}, ' + f'ids={(self.ids if hasattr(self, "ids") else None)!s}, ' + f'codes={(self.codes if hasattr(self, "codes") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_invoice_events_response.py b/advancedbilling/models/list_invoice_events_response.py index d852f3b9..2e2cc51a 100644 --- a/advancedbilling/models/list_invoice_events_response.py +++ b/advancedbilling/models/list_invoice_events_response.py @@ -109,16 +109,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'events={self.events!r}, ' - f'page={self.page!r}, ' - f'per_page={self.per_page!r}, ' - f'total_pages={self.total_pages!r}, ' + f'events={(self.events if hasattr(self, "events") else None)!r}, ' + f'page={(self.page if hasattr(self, "page") else None)!r}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!r}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'events={self.events!s}, ' - f'page={self.page!s}, ' - f'per_page={self.per_page!s}, ' - f'total_pages={self.total_pages!s}, ' + f'events={(self.events if hasattr(self, "events") else None)!s}, ' + f'page={(self.page if hasattr(self, "page") else None)!s}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!s}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_metafields_response.py b/advancedbilling/models/list_metafields_response.py index d103fe01..01cbe6d6 100644 --- a/advancedbilling/models/list_metafields_response.py +++ b/advancedbilling/models/list_metafields_response.py @@ -109,18 +109,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'total_count={self.total_count!r}, ' - f'current_page={self.current_page!r}, ' - f'total_pages={self.total_pages!r}, ' - f'per_page={self.per_page!r}, ' - f'metafields={self.metafields!r}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!r}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!r}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!r}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!r}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'total_count={self.total_count!s}, ' - f'current_page={self.current_page!s}, ' - f'total_pages={self.total_pages!s}, ' - f'per_page={self.per_page!s}, ' - f'metafields={self.metafields!s}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!s}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!s}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!s}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!s}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_mrr_filter.py b/advancedbilling/models/list_mrr_filter.py index dc2d841f..46a26944 100644 --- a/advancedbilling/models/list_mrr_filter.py +++ b/advancedbilling/models/list_mrr_filter.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'subscription_ids={self.subscription_ids!r}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'subscription_ids={self.subscription_ids!s}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_mrr_response_result.py b/advancedbilling/models/list_mrr_response_result.py index ae4e5a0e..67f9e150 100644 --- a/advancedbilling/models/list_mrr_response_result.py +++ b/advancedbilling/models/list_mrr_response_result.py @@ -124,22 +124,22 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'page={self.page!r}, ' - f'per_page={self.per_page!r}, ' - f'total_pages={self.total_pages!r}, ' - f'total_entries={self.total_entries!r}, ' - f'currency={self.currency!r}, ' - f'currency_symbol={self.currency_symbol!r}, ' - f'movements={self.movements!r}, ' + f'page={(self.page if hasattr(self, "page") else None)!r}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!r}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!r}, ' + f'total_entries={(self.total_entries if hasattr(self, "total_entries") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'currency_symbol={(self.currency_symbol if hasattr(self, "currency_symbol") else None)!r}, ' + f'movements={(self.movements if hasattr(self, "movements") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'page={self.page!s}, ' - f'per_page={self.per_page!s}, ' - f'total_pages={self.total_pages!s}, ' - f'total_entries={self.total_entries!s}, ' - f'currency={self.currency!s}, ' - f'currency_symbol={self.currency_symbol!s}, ' - f'movements={self.movements!s}, ' + f'page={(self.page if hasattr(self, "page") else None)!s}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!s}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!s}, ' + f'total_entries={(self.total_entries if hasattr(self, "total_entries") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'currency_symbol={(self.currency_symbol if hasattr(self, "currency_symbol") else None)!s}, ' + f'movements={(self.movements if hasattr(self, "movements") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_offers_response.py b/advancedbilling/models/list_offers_response.py index 5a089cbc..de928405 100644 --- a/advancedbilling/models/list_offers_response.py +++ b/advancedbilling/models/list_offers_response.py @@ -76,10 +76,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'offers={self.offers!r}, ' + f'offers={(self.offers if hasattr(self, "offers") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'offers={self.offers!s}, ' + f'offers={(self.offers if hasattr(self, "offers") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_prepayments_filter.py b/advancedbilling/models/list_prepayments_filter.py index 1f678213..2954519f 100644 --- a/advancedbilling/models/list_prepayments_filter.py +++ b/advancedbilling/models/list_prepayments_filter.py @@ -98,14 +98,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'date_field={self.date_field!r}, ' - f'start_date={self.start_date!r}, ' - f'end_date={self.end_date!r}, ' + f'date_field={(self.date_field if hasattr(self, "date_field") else None)!r}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!r}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'date_field={self.date_field!s}, ' - f'start_date={self.start_date!s}, ' - f'end_date={self.end_date!s}, ' + f'date_field={(self.date_field if hasattr(self, "date_field") else None)!s}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!s}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_price_points_filter.py b/advancedbilling/models/list_price_points_filter.py index e786b701..a5467909 100644 --- a/advancedbilling/models/list_price_points_filter.py +++ b/advancedbilling/models/list_price_points_filter.py @@ -151,24 +151,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'date_field={self.date_field!r}, ' - f'start_date={self.start_date!r}, ' - f'end_date={self.end_date!r}, ' - f'start_datetime={self.start_datetime!r}, ' - f'end_datetime={self.end_datetime!r}, ' - f'mtype={self.mtype!r}, ' - f'ids={self.ids!r}, ' - f'archived_at={self.archived_at!r}, ' + f'date_field={(self.date_field if hasattr(self, "date_field") else None)!r}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!r}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!r}, ' + f'start_datetime={(self.start_datetime if hasattr(self, "start_datetime") else None)!r}, ' + f'end_datetime={(self.end_datetime if hasattr(self, "end_datetime") else None)!r}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!r}, ' + f'ids={(self.ids if hasattr(self, "ids") else None)!r}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'date_field={self.date_field!s}, ' - f'start_date={self.start_date!s}, ' - f'end_date={self.end_date!s}, ' - f'start_datetime={self.start_datetime!s}, ' - f'end_datetime={self.end_datetime!s}, ' - f'mtype={self.mtype!s}, ' - f'ids={self.ids!s}, ' - f'archived_at={self.archived_at!s}, ' + f'date_field={(self.date_field if hasattr(self, "date_field") else None)!s}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!s}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!s}, ' + f'start_datetime={(self.start_datetime if hasattr(self, "start_datetime") else None)!s}, ' + f'end_datetime={(self.end_datetime if hasattr(self, "end_datetime") else None)!s}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!s}, ' + f'ids={(self.ids if hasattr(self, "ids") else None)!s}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_products_filter.py b/advancedbilling/models/list_products_filter.py index 29189f79..b32fff0e 100644 --- a/advancedbilling/models/list_products_filter.py +++ b/advancedbilling/models/list_products_filter.py @@ -97,14 +97,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'ids={self.ids!r}, ' - f'prepaid_product_price_point={self.prepaid_product_price_point!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' + f'ids={(self.ids if hasattr(self, "ids") else None)!r}, ' + f'prepaid_product_price_point={(self.prepaid_product_price_point if hasattr(self, "prepaid_product_price_point") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'ids={self.ids!s}, ' - f'prepaid_product_price_point={self.prepaid_product_price_point!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' + f'ids={(self.ids if hasattr(self, "ids") else None)!s}, ' + f'prepaid_product_price_point={(self.prepaid_product_price_point if hasattr(self, "prepaid_product_price_point") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_proforma_invoices_meta.py b/advancedbilling/models/list_proforma_invoices_meta.py index b2c1180e..07e441f9 100644 --- a/advancedbilling/models/list_proforma_invoices_meta.py +++ b/advancedbilling/models/list_proforma_invoices_meta.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'total_count={self.total_count!r}, ' - f'current_page={self.current_page!r}, ' - f'total_pages={self.total_pages!r}, ' - f'status_code={self.status_code!r}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!r}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!r}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!r}, ' + f'status_code={(self.status_code if hasattr(self, "status_code") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'total_count={self.total_count!s}, ' - f'current_page={self.current_page!s}, ' - f'total_pages={self.total_pages!s}, ' - f'status_code={self.status_code!s}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!s}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!s}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!s}, ' + f'status_code={(self.status_code if hasattr(self, "status_code") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_proforma_invoices_response.py b/advancedbilling/models/list_proforma_invoices_response.py index 9bb3a965..55a4a449 100644 --- a/advancedbilling/models/list_proforma_invoices_response.py +++ b/advancedbilling/models/list_proforma_invoices_response.py @@ -87,12 +87,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'proforma_invoices={self.proforma_invoices!r}, ' - f'meta={self.meta!r}, ' + f'proforma_invoices={(self.proforma_invoices if hasattr(self, "proforma_invoices") else None)!r}, ' + f'meta={(self.meta if hasattr(self, "meta") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'proforma_invoices={self.proforma_invoices!s}, ' - f'meta={self.meta!s}, ' + f'proforma_invoices={(self.proforma_invoices if hasattr(self, "proforma_invoices") else None)!s}, ' + f'meta={(self.meta if hasattr(self, "meta") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_public_keys_meta.py b/advancedbilling/models/list_public_keys_meta.py index 35078bff..1d0ce5f2 100644 --- a/advancedbilling/models/list_public_keys_meta.py +++ b/advancedbilling/models/list_public_keys_meta.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'total_count={self.total_count!r}, ' - f'current_page={self.current_page!r}, ' - f'total_pages={self.total_pages!r}, ' - f'per_page={self.per_page!r}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!r}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!r}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!r}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'total_count={self.total_count!s}, ' - f'current_page={self.current_page!s}, ' - f'total_pages={self.total_pages!s}, ' - f'per_page={self.per_page!s}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!s}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!s}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!s}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_public_keys_response.py b/advancedbilling/models/list_public_keys_response.py index f62264b8..076ed94b 100644 --- a/advancedbilling/models/list_public_keys_response.py +++ b/advancedbilling/models/list_public_keys_response.py @@ -87,12 +87,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'chargify_js_keys={self.chargify_js_keys!r}, ' - f'meta={self.meta!r}, ' + f'chargify_js_keys={(self.chargify_js_keys if hasattr(self, "chargify_js_keys") else None)!r}, ' + f'meta={(self.meta if hasattr(self, "meta") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'chargify_js_keys={self.chargify_js_keys!s}, ' - f'meta={self.meta!s}, ' + f'chargify_js_keys={(self.chargify_js_keys if hasattr(self, "chargify_js_keys") else None)!s}, ' + f'meta={(self.meta if hasattr(self, "meta") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_sale_rep_item.py b/advancedbilling/models/list_sale_rep_item.py index e8b3350a..a9e136fe 100644 --- a/advancedbilling/models/list_sale_rep_item.py +++ b/advancedbilling/models/list_sale_rep_item.py @@ -105,18 +105,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'full_name={self.full_name!r}, ' - f'subscriptions_count={self.subscriptions_count!r}, ' - f'mrr_data={self.mrr_data!r}, ' - f'test_mode={self.test_mode!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'full_name={(self.full_name if hasattr(self, "full_name") else None)!r}, ' + f'subscriptions_count={(self.subscriptions_count if hasattr(self, "subscriptions_count") else None)!r}, ' + f'mrr_data={(self.mrr_data if hasattr(self, "mrr_data") else None)!r}, ' + f'test_mode={(self.test_mode if hasattr(self, "test_mode") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'full_name={self.full_name!s}, ' - f'subscriptions_count={self.subscriptions_count!s}, ' - f'mrr_data={self.mrr_data!s}, ' - f'test_mode={self.test_mode!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'full_name={(self.full_name if hasattr(self, "full_name") else None)!s}, ' + f'subscriptions_count={(self.subscriptions_count if hasattr(self, "subscriptions_count") else None)!s}, ' + f'mrr_data={(self.mrr_data if hasattr(self, "mrr_data") else None)!s}, ' + f'test_mode={(self.test_mode if hasattr(self, "test_mode") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_segments_filter.py b/advancedbilling/models/list_segments_filter.py index c6b0ab24..6b301b44 100644 --- a/advancedbilling/models/list_segments_filter.py +++ b/advancedbilling/models/list_segments_filter.py @@ -107,16 +107,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'segment_property_1_value={self.segment_property_1_value!r}, ' - f'segment_property_2_value={self.segment_property_2_value!r}, ' - f'segment_property_3_value={self.segment_property_3_value!r}, ' - f'segment_property_4_value={self.segment_property_4_value!r}, ' + f'segment_property_1_value={(self.segment_property_1_value if hasattr(self, "segment_property_1_value") else None)!r}, ' + f'segment_property_2_value={(self.segment_property_2_value if hasattr(self, "segment_property_2_value") else None)!r}, ' + f'segment_property_3_value={(self.segment_property_3_value if hasattr(self, "segment_property_3_value") else None)!r}, ' + f'segment_property_4_value={(self.segment_property_4_value if hasattr(self, "segment_property_4_value") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'segment_property_1_value={self.segment_property_1_value!s}, ' - f'segment_property_2_value={self.segment_property_2_value!s}, ' - f'segment_property_3_value={self.segment_property_3_value!s}, ' - f'segment_property_4_value={self.segment_property_4_value!s}, ' + f'segment_property_1_value={(self.segment_property_1_value if hasattr(self, "segment_property_1_value") else None)!s}, ' + f'segment_property_2_value={(self.segment_property_2_value if hasattr(self, "segment_property_2_value") else None)!s}, ' + f'segment_property_3_value={(self.segment_property_3_value if hasattr(self, "segment_property_3_value") else None)!s}, ' + f'segment_property_4_value={(self.segment_property_4_value if hasattr(self, "segment_property_4_value") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_segments_response.py b/advancedbilling/models/list_segments_response.py index c3af0aca..774cd7fc 100644 --- a/advancedbilling/models/list_segments_response.py +++ b/advancedbilling/models/list_segments_response.py @@ -76,10 +76,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'segments={self.segments!r}, ' + f'segments={(self.segments if hasattr(self, "segments") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'segments={self.segments!s}, ' + f'segments={(self.segments if hasattr(self, "segments") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_service_credits_response.py b/advancedbilling/models/list_service_credits_response.py new file mode 100644 index 00000000..f1a1703b --- /dev/null +++ b/advancedbilling/models/list_service_credits_response.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- + +""" +advanced_billing + +This file was automatically generated for Maxio by APIMATIC v3.0 ( + https://www.apimatic.io ). +""" +from advancedbilling.api_helper import APIHelper +from advancedbilling.models.service_credit_1 import ServiceCredit1 + + +class ListServiceCreditsResponse(object): + + """Implementation of the 'List Service Credits Response' model. + + Attributes: + service_credits (List[ServiceCredit1]): The model property of type + List[ServiceCredit1]. + additional_properties (Dict[str, object]): The additional properties + for the model. + + """ + + # Create a mapping from Model property names to API property names + _names = { + "service_credits": 'service_credits' + } + + _optionals = [ + 'service_credits', + ] + + def __init__(self, + service_credits=APIHelper.SKIP, + additional_properties=None): + """Constructor for the ListServiceCreditsResponse class""" + + # Initialize members of the class + if service_credits is not APIHelper.SKIP: + self.service_credits = service_credits + + # Add additional model properties to the instance + if additional_properties is None: + additional_properties = {} + self.additional_properties = additional_properties + + @classmethod + def from_dictionary(cls, + dictionary): + """Creates an instance of this model from a dictionary + + Args: + dictionary (dictionary): A dictionary representation of the object + as obtained from the deserialization of the server's response. The + keys MUST match property names in the API description. + + Returns: + object: An instance of this structure class. + + """ + + if not isinstance(dictionary, dict) or dictionary is None: + return None + + # Extract variables from the dictionary + service_credits = None + if dictionary.get('service_credits') is not None: + service_credits = [ServiceCredit1.from_dictionary(x) for x in dictionary.get('service_credits')] + else: + service_credits = APIHelper.SKIP + # Clean out expected properties from dictionary + additional_properties = {k: v for k, v in dictionary.items() if k not in cls._names.values()} + # Return an object of this model + return cls(service_credits, + additional_properties) + + def __repr__(self): + return (f'{self.__class__.__name__}(' + f'service_credits={(self.service_credits if hasattr(self, "service_credits") else None)!r}, ' + f'additional_properties={self.additional_properties!r})') + + def __str__(self): + return (f'{self.__class__.__name__}(' + f'service_credits={(self.service_credits if hasattr(self, "service_credits") else None)!s}, ' + f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_subcription_group_prepayment_item.py b/advancedbilling/models/list_subcription_group_prepayment_item.py index c55273e6..a9b4e878 100644 --- a/advancedbilling/models/list_subcription_group_prepayment_item.py +++ b/advancedbilling/models/list_subcription_group_prepayment_item.py @@ -136,26 +136,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'subscription_group_uid={self.subscription_group_uid!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'remaining_amount_in_cents={self.remaining_amount_in_cents!r}, ' - f'details={self.details!r}, ' - f'external={self.external!r}, ' - f'memo={self.memo!r}, ' - f'payment_type={self.payment_type!r}, ' - f'created_at={self.created_at!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'subscription_group_uid={(self.subscription_group_uid if hasattr(self, "subscription_group_uid") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'remaining_amount_in_cents={(self.remaining_amount_in_cents if hasattr(self, "remaining_amount_in_cents") else None)!r}, ' + f'details={(self.details if hasattr(self, "details") else None)!r}, ' + f'external={(self.external if hasattr(self, "external") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'subscription_group_uid={self.subscription_group_uid!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'remaining_amount_in_cents={self.remaining_amount_in_cents!s}, ' - f'details={self.details!s}, ' - f'external={self.external!s}, ' - f'memo={self.memo!s}, ' - f'payment_type={self.payment_type!s}, ' - f'created_at={self.created_at!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'subscription_group_uid={(self.subscription_group_uid if hasattr(self, "subscription_group_uid") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'remaining_amount_in_cents={(self.remaining_amount_in_cents if hasattr(self, "remaining_amount_in_cents") else None)!s}, ' + f'details={(self.details if hasattr(self, "details") else None)!s}, ' + f'external={(self.external if hasattr(self, "external") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_subscription_components_filter.py b/advancedbilling/models/list_subscription_components_filter.py index 0a6e2727..d808f374 100644 --- a/advancedbilling/models/list_subscription_components_filter.py +++ b/advancedbilling/models/list_subscription_components_filter.py @@ -83,12 +83,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'currencies={self.currencies!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' + f'currencies={(self.currencies if hasattr(self, "currencies") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'currencies={self.currencies!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' + f'currencies={(self.currencies if hasattr(self, "currencies") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_subscription_components_for_site_filter.py b/advancedbilling/models/list_subscription_components_for_site_filter.py index cf2c743c..cd0af032 100644 --- a/advancedbilling/models/list_subscription_components_for_site_filter.py +++ b/advancedbilling/models/list_subscription_components_for_site_filter.py @@ -93,14 +93,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'currencies={self.currencies!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'subscription={self.subscription!r}, ' + f'currencies={(self.currencies if hasattr(self, "currencies") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'currencies={self.currencies!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'subscription={self.subscription!s}, ' + f'currencies={(self.currencies if hasattr(self, "currencies") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_subscription_groups_item.py b/advancedbilling/models/list_subscription_groups_item.py index ab8a4139..5ab83a12 100644 --- a/advancedbilling/models/list_subscription_groups_item.py +++ b/advancedbilling/models/list_subscription_groups_item.py @@ -153,30 +153,30 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'scheme={self.scheme!r}, ' - f'customer_id={self.customer_id!r}, ' - f'payment_profile_id={self.payment_profile_id!r}, ' - f'subscription_ids={self.subscription_ids!r}, ' - f'primary_subscription_id={self.primary_subscription_id!r}, ' - f'next_assessment_at={self.next_assessment_at!r}, ' - f'state={self.state!r}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!r}, ' - f'account_balances={self.account_balances!r}, ' - f'group_type={self.group_type!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!r}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!r}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!r}, ' + f'account_balances={(self.account_balances if hasattr(self, "account_balances") else None)!r}, ' + f'group_type={(self.group_type if hasattr(self, "group_type") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'scheme={self.scheme!s}, ' - f'customer_id={self.customer_id!s}, ' - f'payment_profile_id={self.payment_profile_id!s}, ' - f'subscription_ids={self.subscription_ids!s}, ' - f'primary_subscription_id={self.primary_subscription_id!s}, ' - f'next_assessment_at={self.next_assessment_at!s}, ' - f'state={self.state!s}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!s}, ' - f'account_balances={self.account_balances!s}, ' - f'group_type={self.group_type!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!s}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!s}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!s}, ' + f'account_balances={(self.account_balances if hasattr(self, "account_balances") else None)!s}, ' + f'group_type={(self.group_type if hasattr(self, "group_type") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_subscription_groups_meta.py b/advancedbilling/models/list_subscription_groups_meta.py index 8c65c920..8cd298a1 100644 --- a/advancedbilling/models/list_subscription_groups_meta.py +++ b/advancedbilling/models/list_subscription_groups_meta.py @@ -79,12 +79,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'current_page={self.current_page!r}, ' - f'total_count={self.total_count!r}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!r}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'current_page={self.current_page!s}, ' - f'total_count={self.total_count!s}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!s}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/list_subscription_groups_response.py b/advancedbilling/models/list_subscription_groups_response.py index 22194084..82f79966 100644 --- a/advancedbilling/models/list_subscription_groups_response.py +++ b/advancedbilling/models/list_subscription_groups_response.py @@ -87,12 +87,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'subscription_groups={self.subscription_groups!r}, ' - f'meta={self.meta!r}, ' + f'subscription_groups={(self.subscription_groups if hasattr(self, "subscription_groups") else None)!r}, ' + f'meta={(self.meta if hasattr(self, "meta") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'subscription_groups={self.subscription_groups!s}, ' - f'meta={self.meta!s}, ' + f'subscription_groups={(self.subscription_groups if hasattr(self, "subscription_groups") else None)!s}, ' + f'meta={(self.meta if hasattr(self, "meta") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/metadata.py b/advancedbilling/models/metadata.py index 4392c448..65330f43 100644 --- a/advancedbilling/models/metadata.py +++ b/advancedbilling/models/metadata.py @@ -122,20 +122,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'value={self.value!r}, ' - f'resource_id={self.resource_id!r}, ' - f'name={self.name!r}, ' - f'deleted_at={self.deleted_at!r}, ' - f'metafield_id={self.metafield_id!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'value={(self.value if hasattr(self, "value") else None)!r}, ' + f'resource_id={(self.resource_id if hasattr(self, "resource_id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'deleted_at={(self.deleted_at if hasattr(self, "deleted_at") else None)!r}, ' + f'metafield_id={(self.metafield_id if hasattr(self, "metafield_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'value={self.value!s}, ' - f'resource_id={self.resource_id!s}, ' - f'name={self.name!s}, ' - f'deleted_at={self.deleted_at!s}, ' - f'metafield_id={self.metafield_id!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'value={(self.value if hasattr(self, "value") else None)!s}, ' + f'resource_id={(self.resource_id if hasattr(self, "resource_id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'deleted_at={(self.deleted_at if hasattr(self, "deleted_at") else None)!s}, ' + f'metafield_id={(self.metafield_id if hasattr(self, "metafield_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/metafield.py b/advancedbilling/models/metafield.py index b08228e5..3e4b00d4 100644 --- a/advancedbilling/models/metafield.py +++ b/advancedbilling/models/metafield.py @@ -129,20 +129,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'name={self.name!r}, ' - f'scope={self.scope!r}, ' - f'data_count={self.data_count!r}, ' - f'input_type={self.input_type!r}, ' - f'enum={self.enum!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'scope={(self.scope if hasattr(self, "scope") else None)!r}, ' + f'data_count={(self.data_count if hasattr(self, "data_count") else None)!r}, ' + f'input_type={(self.input_type if hasattr(self, "input_type") else None)!r}, ' + f'enum={(self.enum if hasattr(self, "enum") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'name={self.name!s}, ' - f'scope={self.scope!s}, ' - f'data_count={self.data_count!s}, ' - f'input_type={self.input_type!s}, ' - f'enum={self.enum!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'scope={(self.scope if hasattr(self, "scope") else None)!s}, ' + f'data_count={(self.data_count if hasattr(self, "data_count") else None)!s}, ' + f'input_type={(self.input_type if hasattr(self, "input_type") else None)!s}, ' + f'enum={(self.enum if hasattr(self, "enum") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/metafield_scope.py b/advancedbilling/models/metafield_scope.py index 715ee555..f78fbc76 100644 --- a/advancedbilling/models/metafield_scope.py +++ b/advancedbilling/models/metafield_scope.py @@ -151,22 +151,22 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'csv={self.csv!r}, ' - f'invoices={self.invoices!r}, ' - f'statements={self.statements!r}, ' - f'portal={self.portal!r}, ' - f'public_show={self.public_show!r}, ' - f'public_edit={self.public_edit!r}, ' - f'hosted={self.hosted!r}, ' + f'csv={(self.csv if hasattr(self, "csv") else None)!r}, ' + f'invoices={(self.invoices if hasattr(self, "invoices") else None)!r}, ' + f'statements={(self.statements if hasattr(self, "statements") else None)!r}, ' + f'portal={(self.portal if hasattr(self, "portal") else None)!r}, ' + f'public_show={(self.public_show if hasattr(self, "public_show") else None)!r}, ' + f'public_edit={(self.public_edit if hasattr(self, "public_edit") else None)!r}, ' + f'hosted={(self.hosted if hasattr(self, "hosted") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'csv={self.csv!s}, ' - f'invoices={self.invoices!s}, ' - f'statements={self.statements!s}, ' - f'portal={self.portal!s}, ' - f'public_show={self.public_show!s}, ' - f'public_edit={self.public_edit!s}, ' - f'hosted={self.hosted!s}, ' + f'csv={(self.csv if hasattr(self, "csv") else None)!s}, ' + f'invoices={(self.invoices if hasattr(self, "invoices") else None)!s}, ' + f'statements={(self.statements if hasattr(self, "statements") else None)!s}, ' + f'portal={(self.portal if hasattr(self, "portal") else None)!s}, ' + f'public_show={(self.public_show if hasattr(self, "public_show") else None)!s}, ' + f'public_edit={(self.public_edit if hasattr(self, "public_edit") else None)!s}, ' + f'hosted={(self.hosted if hasattr(self, "hosted") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/metered_component.py b/advancedbilling/models/metered_component.py index fde450e6..e3a254c1 100644 --- a/advancedbilling/models/metered_component.py +++ b/advancedbilling/models/metered_component.py @@ -236,38 +236,38 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' f'unit_name={self.unit_name!r}, ' - f'description={self.description!r}, ' - f'handle={self.handle!r}, ' - f'taxable={self.taxable!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!r}, ' f'pricing_scheme={self.pricing_scheme!r}, ' - f'prices={self.prices!r}, ' - f'price_points={self.price_points!r}, ' - f'unit_price={self.unit_price!r}, ' - f'tax_code={self.tax_code!r}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!r}, ' - f'display_on_hosted_page={self.display_on_hosted_page!r}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!r}, ' - f'public_signup_page_ids={self.public_signup_page_ids!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!r}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!r}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!r}, ' + f'public_signup_page_ids={(self.public_signup_page_ids if hasattr(self, "public_signup_page_ids") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' f'unit_name={self.unit_name!s}, ' - f'description={self.description!s}, ' - f'handle={self.handle!s}, ' - f'taxable={self.taxable!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!s}, ' f'pricing_scheme={self.pricing_scheme!s}, ' - f'prices={self.prices!s}, ' - f'price_points={self.price_points!s}, ' - f'unit_price={self.unit_price!s}, ' - f'tax_code={self.tax_code!s}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!s}, ' - f'display_on_hosted_page={self.display_on_hosted_page!s}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!s}, ' - f'public_signup_page_ids={self.public_signup_page_ids!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!s}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!s}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!s}, ' + f'public_signup_page_ids={(self.public_signup_page_ids if hasattr(self, "public_signup_page_ids") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/movement.py b/advancedbilling/models/movement.py index 08c9d57e..d1801088 100644 --- a/advancedbilling/models/movement.py +++ b/advancedbilling/models/movement.py @@ -142,26 +142,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'timestamp={self.timestamp!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'amount_formatted={self.amount_formatted!r}, ' - f'description={self.description!r}, ' - f'category={self.category!r}, ' - f'breakouts={self.breakouts!r}, ' - f'line_items={self.line_items!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'subscriber_name={self.subscriber_name!r}, ' + f'timestamp={(self.timestamp if hasattr(self, "timestamp") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'amount_formatted={(self.amount_formatted if hasattr(self, "amount_formatted") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'category={(self.category if hasattr(self, "category") else None)!r}, ' + f'breakouts={(self.breakouts if hasattr(self, "breakouts") else None)!r}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'subscriber_name={(self.subscriber_name if hasattr(self, "subscriber_name") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'timestamp={self.timestamp!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'amount_formatted={self.amount_formatted!s}, ' - f'description={self.description!s}, ' - f'category={self.category!s}, ' - f'breakouts={self.breakouts!s}, ' - f'line_items={self.line_items!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'subscriber_name={self.subscriber_name!s}, ' + f'timestamp={(self.timestamp if hasattr(self, "timestamp") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'amount_formatted={(self.amount_formatted if hasattr(self, "amount_formatted") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'category={(self.category if hasattr(self, "category") else None)!s}, ' + f'breakouts={(self.breakouts if hasattr(self, "breakouts") else None)!s}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'subscriber_name={(self.subscriber_name if hasattr(self, "subscriber_name") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/movement_line_item.py b/advancedbilling/models/movement_line_item.py index 217f49c7..170a07c8 100644 --- a/advancedbilling/models/movement_line_item.py +++ b/advancedbilling/models/movement_line_item.py @@ -144,26 +144,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'product_id={self.product_id!r}, ' - f'component_id={self.component_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'name={self.name!r}, ' - f'mrr={self.mrr!r}, ' - f'mrr_movements={self.mrr_movements!r}, ' - f'quantity={self.quantity!r}, ' - f'prev_quantity={self.prev_quantity!r}, ' - f'recurring={self.recurring!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'mrr={(self.mrr if hasattr(self, "mrr") else None)!r}, ' + f'mrr_movements={(self.mrr_movements if hasattr(self, "mrr_movements") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'prev_quantity={(self.prev_quantity if hasattr(self, "prev_quantity") else None)!r}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'product_id={self.product_id!s}, ' - f'component_id={self.component_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'name={self.name!s}, ' - f'mrr={self.mrr!s}, ' - f'mrr_movements={self.mrr_movements!s}, ' - f'quantity={self.quantity!s}, ' - f'prev_quantity={self.prev_quantity!s}, ' - f'recurring={self.recurring!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'mrr={(self.mrr if hasattr(self, "mrr") else None)!s}, ' + f'mrr_movements={(self.mrr_movements if hasattr(self, "mrr_movements") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'prev_quantity={(self.prev_quantity if hasattr(self, "prev_quantity") else None)!s}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/mrr.py b/advancedbilling/models/mrr.py index ce5c7680..020633d0 100644 --- a/advancedbilling/models/mrr.py +++ b/advancedbilling/models/mrr.py @@ -112,20 +112,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'amount_formatted={self.amount_formatted!r}, ' - f'currency={self.currency!r}, ' - f'currency_symbol={self.currency_symbol!r}, ' - f'breakouts={self.breakouts!r}, ' - f'at_time={self.at_time!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'amount_formatted={(self.amount_formatted if hasattr(self, "amount_formatted") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'currency_symbol={(self.currency_symbol if hasattr(self, "currency_symbol") else None)!r}, ' + f'breakouts={(self.breakouts if hasattr(self, "breakouts") else None)!r}, ' + f'at_time={(self.at_time if hasattr(self, "at_time") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'amount_formatted={self.amount_formatted!s}, ' - f'currency={self.currency!s}, ' - f'currency_symbol={self.currency_symbol!s}, ' - f'breakouts={self.breakouts!s}, ' - f'at_time={self.at_time!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'amount_formatted={(self.amount_formatted if hasattr(self, "amount_formatted") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'currency_symbol={(self.currency_symbol if hasattr(self, "currency_symbol") else None)!s}, ' + f'breakouts={(self.breakouts if hasattr(self, "breakouts") else None)!s}, ' + f'at_time={(self.at_time if hasattr(self, "at_time") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/mrr_movement.py b/advancedbilling/models/mrr_movement.py index 88a1eda1..afe6dba7 100644 --- a/advancedbilling/models/mrr_movement.py +++ b/advancedbilling/models/mrr_movement.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'amount={self.amount!r}, ' - f'category={self.category!r}, ' - f'subscriber_delta={self.subscriber_delta!r}, ' - f'lead_delta={self.lead_delta!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' + f'category={(self.category if hasattr(self, "category") else None)!r}, ' + f'subscriber_delta={(self.subscriber_delta if hasattr(self, "subscriber_delta") else None)!r}, ' + f'lead_delta={(self.lead_delta if hasattr(self, "lead_delta") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'amount={self.amount!s}, ' - f'category={self.category!s}, ' - f'subscriber_delta={self.subscriber_delta!s}, ' - f'lead_delta={self.lead_delta!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' + f'category={(self.category if hasattr(self, "category") else None)!s}, ' + f'subscriber_delta={(self.subscriber_delta if hasattr(self, "subscriber_delta") else None)!s}, ' + f'lead_delta={(self.lead_delta if hasattr(self, "lead_delta") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/multi_invoice_payment.py b/advancedbilling/models/multi_invoice_payment.py index ccc774cd..831f727d 100644 --- a/advancedbilling/models/multi_invoice_payment.py +++ b/advancedbilling/models/multi_invoice_payment.py @@ -102,16 +102,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'transaction_id={self.transaction_id!r}, ' - f'total_amount={self.total_amount!r}, ' - f'currency_code={self.currency_code!r}, ' - f'applications={self.applications!r}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!r}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!r}, ' + f'currency_code={(self.currency_code if hasattr(self, "currency_code") else None)!r}, ' + f'applications={(self.applications if hasattr(self, "applications") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'transaction_id={self.transaction_id!s}, ' - f'total_amount={self.total_amount!s}, ' - f'currency_code={self.currency_code!s}, ' - f'applications={self.applications!s}, ' + f'transaction_id={(self.transaction_id if hasattr(self, "transaction_id") else None)!s}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!s}, ' + f'currency_code={(self.currency_code if hasattr(self, "currency_code") else None)!s}, ' + f'applications={(self.applications if hasattr(self, "applications") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/nested_subscription_group.py b/advancedbilling/models/nested_subscription_group.py index 571ae0b6..6a7c2738 100644 --- a/advancedbilling/models/nested_subscription_group.py +++ b/advancedbilling/models/nested_subscription_group.py @@ -98,16 +98,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'scheme={self.scheme!r}, ' - f'primary_subscription_id={self.primary_subscription_id!r}, ' - f'primary={self.primary!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!r}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!r}, ' + f'primary={(self.primary if hasattr(self, "primary") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'scheme={self.scheme!s}, ' - f'primary_subscription_id={self.primary_subscription_id!s}, ' - f'primary={self.primary!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!s}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!s}, ' + f'primary={(self.primary if hasattr(self, "primary") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/net_terms.py b/advancedbilling/models/net_terms.py index 0a1fa289..4118d4fc 100644 --- a/advancedbilling/models/net_terms.py +++ b/advancedbilling/models/net_terms.py @@ -99,18 +99,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'default_net_terms={self.default_net_terms!r}, ' - f'automatic_net_terms={self.automatic_net_terms!r}, ' - f'remittance_net_terms={self.remittance_net_terms!r}, ' - f'net_terms_on_remittance_signups_enabled={self.net_terms_on_remittance_signups_enabled!r}, ' - f'custom_net_terms_enabled={self.custom_net_terms_enabled!r}, ' + f'default_net_terms={(self.default_net_terms if hasattr(self, "default_net_terms") else None)!r}, ' + f'automatic_net_terms={(self.automatic_net_terms if hasattr(self, "automatic_net_terms") else None)!r}, ' + f'remittance_net_terms={(self.remittance_net_terms if hasattr(self, "remittance_net_terms") else None)!r}, ' + f'net_terms_on_remittance_signups_enabled={(self.net_terms_on_remittance_signups_enabled if hasattr(self, "net_terms_on_remittance_signups_enabled") else None)!r}, ' + f'custom_net_terms_enabled={(self.custom_net_terms_enabled if hasattr(self, "custom_net_terms_enabled") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'default_net_terms={self.default_net_terms!s}, ' - f'automatic_net_terms={self.automatic_net_terms!s}, ' - f'remittance_net_terms={self.remittance_net_terms!s}, ' - f'net_terms_on_remittance_signups_enabled={self.net_terms_on_remittance_signups_enabled!s}, ' - f'custom_net_terms_enabled={self.custom_net_terms_enabled!s}, ' + f'default_net_terms={(self.default_net_terms if hasattr(self, "default_net_terms") else None)!s}, ' + f'automatic_net_terms={(self.automatic_net_terms if hasattr(self, "automatic_net_terms") else None)!s}, ' + f'remittance_net_terms={(self.remittance_net_terms if hasattr(self, "remittance_net_terms") else None)!s}, ' + f'net_terms_on_remittance_signups_enabled={(self.net_terms_on_remittance_signups_enabled if hasattr(self, "net_terms_on_remittance_signups_enabled") else None)!s}, ' + f'custom_net_terms_enabled={(self.custom_net_terms_enabled if hasattr(self, "custom_net_terms_enabled") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/offer.py b/advancedbilling/models/offer.py index 4b166e8e..75d99072 100644 --- a/advancedbilling/models/offer.py +++ b/advancedbilling/models/offer.py @@ -241,46 +241,46 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'site_id={self.site_id!r}, ' - f'product_family_id={self.product_family_id!r}, ' - f'product_id={self.product_id!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'product_revisable_number={self.product_revisable_number!r}, ' - f'name={self.name!r}, ' - f'handle={self.handle!r}, ' - f'description={self.description!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'archived_at={self.archived_at!r}, ' - f'offer_items={self.offer_items!r}, ' - f'offer_discounts={self.offer_discounts!r}, ' - f'product_family_name={self.product_family_name!r}, ' - f'product_name={self.product_name!r}, ' - f'product_price_point_name={self.product_price_point_name!r}, ' - f'product_price_in_cents={self.product_price_in_cents!r}, ' - f'offer_signup_pages={self.offer_signup_pages!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!r}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'product_revisable_number={(self.product_revisable_number if hasattr(self, "product_revisable_number") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!r}, ' + f'offer_items={(self.offer_items if hasattr(self, "offer_items") else None)!r}, ' + f'offer_discounts={(self.offer_discounts if hasattr(self, "offer_discounts") else None)!r}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!r}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!r}, ' + f'product_price_point_name={(self.product_price_point_name if hasattr(self, "product_price_point_name") else None)!r}, ' + f'product_price_in_cents={(self.product_price_in_cents if hasattr(self, "product_price_in_cents") else None)!r}, ' + f'offer_signup_pages={(self.offer_signup_pages if hasattr(self, "offer_signup_pages") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'site_id={self.site_id!s}, ' - f'product_family_id={self.product_family_id!s}, ' - f'product_id={self.product_id!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'product_revisable_number={self.product_revisable_number!s}, ' - f'name={self.name!s}, ' - f'handle={self.handle!s}, ' - f'description={self.description!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'archived_at={self.archived_at!s}, ' - f'offer_items={self.offer_items!s}, ' - f'offer_discounts={self.offer_discounts!s}, ' - f'product_family_name={self.product_family_name!s}, ' - f'product_name={self.product_name!s}, ' - f'product_price_point_name={self.product_price_point_name!s}, ' - f'product_price_in_cents={self.product_price_in_cents!s}, ' - f'offer_signup_pages={self.offer_signup_pages!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!s}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'product_revisable_number={(self.product_revisable_number if hasattr(self, "product_revisable_number") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!s}, ' + f'offer_items={(self.offer_items if hasattr(self, "offer_items") else None)!s}, ' + f'offer_discounts={(self.offer_discounts if hasattr(self, "offer_discounts") else None)!s}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!s}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!s}, ' + f'product_price_point_name={(self.product_price_point_name if hasattr(self, "product_price_point_name") else None)!s}, ' + f'product_price_in_cents={(self.product_price_in_cents if hasattr(self, "product_price_in_cents") else None)!s}, ' + f'offer_signup_pages={(self.offer_signup_pages if hasattr(self, "offer_signup_pages") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/offer_discount.py b/advancedbilling/models/offer_discount.py index e1b88a17..0cf5c215 100644 --- a/advancedbilling/models/offer_discount.py +++ b/advancedbilling/models/offer_discount.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'coupon_code={self.coupon_code!r}, ' - f'coupon_id={self.coupon_id!r}, ' - f'coupon_name={self.coupon_name!r}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!r}, ' + f'coupon_id={(self.coupon_id if hasattr(self, "coupon_id") else None)!r}, ' + f'coupon_name={(self.coupon_name if hasattr(self, "coupon_name") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'coupon_code={self.coupon_code!s}, ' - f'coupon_id={self.coupon_id!s}, ' - f'coupon_name={self.coupon_name!s}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!s}, ' + f'coupon_id={(self.coupon_id if hasattr(self, "coupon_id") else None)!s}, ' + f'coupon_name={(self.coupon_name if hasattr(self, "coupon_name") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/offer_item.py b/advancedbilling/models/offer_item.py index 5f93eb35..bda0c8ef 100644 --- a/advancedbilling/models/offer_item.py +++ b/advancedbilling/models/offer_item.py @@ -158,28 +158,28 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'starting_quantity={self.starting_quantity!r}, ' - f'editable={self.editable!r}, ' - f'component_unit_price={self.component_unit_price!r}, ' - f'component_name={self.component_name!r}, ' - f'price_point_name={self.price_point_name!r}, ' - f'currency_prices={self.currency_prices!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!r}, ' + f'editable={(self.editable if hasattr(self, "editable") else None)!r}, ' + f'component_unit_price={(self.component_unit_price if hasattr(self, "component_unit_price") else None)!r}, ' + f'component_name={(self.component_name if hasattr(self, "component_name") else None)!r}, ' + f'price_point_name={(self.price_point_name if hasattr(self, "price_point_name") else None)!r}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'starting_quantity={self.starting_quantity!s}, ' - f'editable={self.editable!s}, ' - f'component_unit_price={self.component_unit_price!s}, ' - f'component_name={self.component_name!s}, ' - f'price_point_name={self.price_point_name!s}, ' - f'currency_prices={self.currency_prices!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!s}, ' + f'editable={(self.editable if hasattr(self, "editable") else None)!s}, ' + f'component_unit_price={(self.component_unit_price if hasattr(self, "component_unit_price") else None)!s}, ' + f'component_name={(self.component_name if hasattr(self, "component_name") else None)!s}, ' + f'price_point_name={(self.price_point_name if hasattr(self, "price_point_name") else None)!s}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/offer_response.py b/advancedbilling/models/offer_response.py index 0796707f..48234de1 100644 --- a/advancedbilling/models/offer_response.py +++ b/advancedbilling/models/offer_response.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'offer={self.offer!r}, ' + f'offer={(self.offer if hasattr(self, "offer") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'offer={self.offer!s}, ' + f'offer={(self.offer if hasattr(self, "offer") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/offer_signup_page.py b/advancedbilling/models/offer_signup_page.py index a8d722dd..d1b5592b 100644 --- a/advancedbilling/models/offer_signup_page.py +++ b/advancedbilling/models/offer_signup_page.py @@ -111,20 +111,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'nickname={self.nickname!r}, ' - f'enabled={self.enabled!r}, ' - f'return_url={self.return_url!r}, ' - f'return_params={self.return_params!r}, ' - f'url={self.url!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'nickname={(self.nickname if hasattr(self, "nickname") else None)!r}, ' + f'enabled={(self.enabled if hasattr(self, "enabled") else None)!r}, ' + f'return_url={(self.return_url if hasattr(self, "return_url") else None)!r}, ' + f'return_params={(self.return_params if hasattr(self, "return_params") else None)!r}, ' + f'url={(self.url if hasattr(self, "url") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'nickname={self.nickname!s}, ' - f'enabled={self.enabled!s}, ' - f'return_url={self.return_url!s}, ' - f'return_params={self.return_params!s}, ' - f'url={self.url!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'nickname={(self.nickname if hasattr(self, "nickname") else None)!s}, ' + f'enabled={(self.enabled if hasattr(self, "enabled") else None)!s}, ' + f'return_url={(self.return_url if hasattr(self, "return_url") else None)!s}, ' + f'return_params={(self.return_params if hasattr(self, "return_params") else None)!s}, ' + f'url={(self.url if hasattr(self, "url") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/ok_response.py b/advancedbilling/models/ok_response.py index 2a20d1aa..fc8eb147 100644 --- a/advancedbilling/models/ok_response.py +++ b/advancedbilling/models/ok_response.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'ok={self.ok!r}, ' + f'ok={(self.ok if hasattr(self, "ok") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'ok={self.ok!s}, ' + f'ok={(self.ok if hasattr(self, "ok") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/on_off_component.py b/advancedbilling/models/on_off_component.py index 694ecf10..5d324c09 100644 --- a/advancedbilling/models/on_off_component.py +++ b/advancedbilling/models/on_off_component.py @@ -247,37 +247,37 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' - f'description={self.description!r}, ' - f'handle={self.handle!r}, ' - f'taxable={self.taxable!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'price_points={self.price_points!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!r}, ' f'unit_price={self.unit_price!r}, ' - f'tax_code={self.tax_code!r}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!r}, ' - f'display_on_hosted_page={self.display_on_hosted_page!r}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!r}, ' - f'public_signup_page_ids={self.public_signup_page_ids!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!r}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!r}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!r}, ' + f'public_signup_page_ids={(self.public_signup_page_ids if hasattr(self, "public_signup_page_ids") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' - f'description={self.description!s}, ' - f'handle={self.handle!s}, ' - f'taxable={self.taxable!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'price_points={self.price_points!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!s}, ' f'unit_price={self.unit_price!s}, ' - f'tax_code={self.tax_code!s}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!s}, ' - f'display_on_hosted_page={self.display_on_hosted_page!s}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!s}, ' - f'public_signup_page_ids={self.public_signup_page_ids!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!s}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!s}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!s}, ' + f'public_signup_page_ids={(self.public_signup_page_ids if hasattr(self, "public_signup_page_ids") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/organization_address.py b/advancedbilling/models/organization_address.py index b385e2f6..7c8ea5bd 100644 --- a/advancedbilling/models/organization_address.py +++ b/advancedbilling/models/organization_address.py @@ -138,24 +138,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'street={self.street!r}, ' - f'line_2={self.line_2!r}, ' - f'city={self.city!r}, ' - f'state={self.state!r}, ' - f'zip={self.zip!r}, ' - f'country={self.country!r}, ' - f'name={self.name!r}, ' - f'phone={self.phone!r}, ' + f'street={(self.street if hasattr(self, "street") else None)!r}, ' + f'line_2={(self.line_2 if hasattr(self, "line_2") else None)!r}, ' + f'city={(self.city if hasattr(self, "city") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!r}, ' + f'country={(self.country if hasattr(self, "country") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'street={self.street!s}, ' - f'line_2={self.line_2!s}, ' - f'city={self.city!s}, ' - f'state={self.state!s}, ' - f'zip={self.zip!s}, ' - f'country={self.country!s}, ' - f'name={self.name!s}, ' - f'phone={self.phone!s}, ' + f'street={(self.street if hasattr(self, "street") else None)!s}, ' + f'line_2={(self.line_2 if hasattr(self, "line_2") else None)!s}, ' + f'city={(self.city if hasattr(self, "city") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!s}, ' + f'country={(self.country if hasattr(self, "country") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/origin_invoice.py b/advancedbilling/models/origin_invoice.py index 2db96064..b86266b5 100644 --- a/advancedbilling/models/origin_invoice.py +++ b/advancedbilling/models/origin_invoice.py @@ -101,12 +101,12 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'number={self.number!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'number={(self.number if hasattr(self, "number") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'number={self.number!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'number={(self.number if hasattr(self, "number") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/overage_pricing.py b/advancedbilling/models/overage_pricing.py index e2cd1ab7..0c3d220c 100644 --- a/advancedbilling/models/overage_pricing.py +++ b/advancedbilling/models/overage_pricing.py @@ -111,11 +111,11 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'pricing_scheme={self.pricing_scheme!r}, ' - f'prices={self.prices!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'pricing_scheme={self.pricing_scheme!s}, ' - f'prices={self.prices!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/override_subscription.py b/advancedbilling/models/override_subscription.py index 48cc7eb1..6ba5d0f3 100644 --- a/advancedbilling/models/override_subscription.py +++ b/advancedbilling/models/override_subscription.py @@ -27,7 +27,9 @@ class OverrideSubscription(object): expires_at (datetime): Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only - ISO8601 format is supported. + ISO8601 format is supported. This field is not supported when + Multi-frequency is enabled for the Site. To change the Term End of + a Subscription, use the Update Subscription endpoint. current_period_starts_at (datetime): Can only be used when a subscription is unbilled, which happens when a future initial billing date is passed at subscription creation. The value passed @@ -118,18 +120,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'activated_at={self.activated_at!r}, ' - f'canceled_at={self.canceled_at!r}, ' - f'cancellation_message={self.cancellation_message!r}, ' - f'expires_at={self.expires_at!r}, ' - f'current_period_starts_at={self.current_period_starts_at!r}, ' + f'activated_at={(self.activated_at if hasattr(self, "activated_at") else None)!r}, ' + f'canceled_at={(self.canceled_at if hasattr(self, "canceled_at") else None)!r}, ' + f'cancellation_message={(self.cancellation_message if hasattr(self, "cancellation_message") else None)!r}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!r}, ' + f'current_period_starts_at={(self.current_period_starts_at if hasattr(self, "current_period_starts_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'activated_at={self.activated_at!s}, ' - f'canceled_at={self.canceled_at!s}, ' - f'cancellation_message={self.cancellation_message!s}, ' - f'expires_at={self.expires_at!s}, ' - f'current_period_starts_at={self.current_period_starts_at!s}, ' + f'activated_at={(self.activated_at if hasattr(self, "activated_at") else None)!s}, ' + f'canceled_at={(self.canceled_at if hasattr(self, "canceled_at") else None)!s}, ' + f'cancellation_message={(self.cancellation_message if hasattr(self, "cancellation_message") else None)!s}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!s}, ' + f'current_period_starts_at={(self.current_period_starts_at if hasattr(self, "current_period_starts_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/paginated_metadata.py b/advancedbilling/models/paginated_metadata.py index 1a109c7c..05504ed2 100644 --- a/advancedbilling/models/paginated_metadata.py +++ b/advancedbilling/models/paginated_metadata.py @@ -108,18 +108,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'total_count={self.total_count!r}, ' - f'current_page={self.current_page!r}, ' - f'total_pages={self.total_pages!r}, ' - f'per_page={self.per_page!r}, ' - f'metadata={self.metadata!r}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!r}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!r}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!r}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!r}, ' + f'metadata={(self.metadata if hasattr(self, "metadata") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'total_count={self.total_count!s}, ' - f'current_page={self.current_page!s}, ' - f'total_pages={self.total_pages!s}, ' - f'per_page={self.per_page!s}, ' - f'metadata={self.metadata!s}, ' + f'total_count={(self.total_count if hasattr(self, "total_count") else None)!s}, ' + f'current_page={(self.current_page if hasattr(self, "current_page") else None)!s}, ' + f'total_pages={(self.total_pages if hasattr(self, "total_pages") else None)!s}, ' + f'per_page={(self.per_page if hasattr(self, "per_page") else None)!s}, ' + f'metadata={(self.metadata if hasattr(self, "metadata") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/paid_invoice.py b/advancedbilling/models/paid_invoice.py index f3d4b3e9..d5f9419c 100644 --- a/advancedbilling/models/paid_invoice.py +++ b/advancedbilling/models/paid_invoice.py @@ -99,16 +99,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'invoice_id={self.invoice_id!r}, ' - f'status={self.status!r}, ' - f'due_amount={self.due_amount!r}, ' - f'paid_amount={self.paid_amount!r}, ' + f'invoice_id={(self.invoice_id if hasattr(self, "invoice_id") else None)!r}, ' + f'status={(self.status if hasattr(self, "status") else None)!r}, ' + f'due_amount={(self.due_amount if hasattr(self, "due_amount") else None)!r}, ' + f'paid_amount={(self.paid_amount if hasattr(self, "paid_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'invoice_id={self.invoice_id!s}, ' - f'status={self.status!s}, ' - f'due_amount={self.due_amount!s}, ' - f'paid_amount={self.paid_amount!s}, ' + f'invoice_id={(self.invoice_id if hasattr(self, "invoice_id") else None)!s}, ' + f'status={(self.status if hasattr(self, "status") else None)!s}, ' + f'due_amount={(self.due_amount if hasattr(self, "due_amount") else None)!s}, ' + f'paid_amount={(self.paid_amount if hasattr(self, "paid_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/pause_request.py b/advancedbilling/models/pause_request.py index 6c32e038..ba27d880 100644 --- a/advancedbilling/models/pause_request.py +++ b/advancedbilling/models/pause_request.py @@ -74,10 +74,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'hold={self.hold!r}, ' + f'hold={(self.hold if hasattr(self, "hold") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'hold={self.hold!s}, ' + f'hold={(self.hold if hasattr(self, "hold") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/payer_attributes.py b/advancedbilling/models/payer_attributes.py index 820eed30..6bb008c8 100644 --- a/advancedbilling/models/payer_attributes.py +++ b/advancedbilling/models/payer_attributes.py @@ -232,44 +232,44 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'email={self.email!r}, ' - f'cc_emails={self.cc_emails!r}, ' - f'organization={self.organization!r}, ' - f'reference={self.reference!r}, ' - f'address={self.address!r}, ' - f'address_2={self.address_2!r}, ' - f'city={self.city!r}, ' - f'state={self.state!r}, ' - f'zip={self.zip!r}, ' - f'country={self.country!r}, ' - f'phone={self.phone!r}, ' - f'locale={self.locale!r}, ' - f'vat_number={self.vat_number!r}, ' - f'tax_exempt={self.tax_exempt!r}, ' - f'tax_exempt_reason={self.tax_exempt_reason!r}, ' - f'metafields={self.metafields!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'email={(self.email if hasattr(self, "email") else None)!r}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!r}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'address={(self.address if hasattr(self, "address") else None)!r}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!r}, ' + f'city={(self.city if hasattr(self, "city") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!r}, ' + f'country={(self.country if hasattr(self, "country") else None)!r}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!r}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!r}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!r}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!r}, ' + f'tax_exempt_reason={(self.tax_exempt_reason if hasattr(self, "tax_exempt_reason") else None)!r}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'email={self.email!s}, ' - f'cc_emails={self.cc_emails!s}, ' - f'organization={self.organization!s}, ' - f'reference={self.reference!s}, ' - f'address={self.address!s}, ' - f'address_2={self.address_2!s}, ' - f'city={self.city!s}, ' - f'state={self.state!s}, ' - f'zip={self.zip!s}, ' - f'country={self.country!s}, ' - f'phone={self.phone!s}, ' - f'locale={self.locale!s}, ' - f'vat_number={self.vat_number!s}, ' - f'tax_exempt={self.tax_exempt!s}, ' - f'tax_exempt_reason={self.tax_exempt_reason!s}, ' - f'metafields={self.metafields!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'email={(self.email if hasattr(self, "email") else None)!s}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!s}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'address={(self.address if hasattr(self, "address") else None)!s}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!s}, ' + f'city={(self.city if hasattr(self, "city") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!s}, ' + f'country={(self.country if hasattr(self, "country") else None)!s}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!s}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!s}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!s}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!s}, ' + f'tax_exempt_reason={(self.tax_exempt_reason if hasattr(self, "tax_exempt_reason") else None)!s}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/payer_error.py b/advancedbilling/models/payer_error.py index 56b0268f..4d74fc10 100644 --- a/advancedbilling/models/payer_error.py +++ b/advancedbilling/models/payer_error.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'last_name={self.last_name!r}, ' - f'first_name={self.first_name!r}, ' - f'email={self.email!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'email={(self.email if hasattr(self, "email") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'last_name={self.last_name!s}, ' - f'first_name={self.first_name!s}, ' - f'email={self.email!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'email={(self.email if hasattr(self, "email") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/payment_for_allocation.py b/advancedbilling/models/payment_for_allocation.py index afe41abb..ec26bb03 100644 --- a/advancedbilling/models/payment_for_allocation.py +++ b/advancedbilling/models/payment_for_allocation.py @@ -119,16 +119,16 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'success={self.success!r}, ' - f'memo={self.memo!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'success={(self.success if hasattr(self, "success") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'success={self.success!s}, ' - f'memo={self.memo!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'success={(self.success if hasattr(self, "success") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/payment_method_credit_card.py b/advancedbilling/models/payment_method_credit_card.py index 2a163c97..cbbca725 100644 --- a/advancedbilling/models/payment_method_credit_card.py +++ b/advancedbilling/models/payment_method_credit_card.py @@ -136,8 +136,8 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'card_brand={self.card_brand!r}, ' - f'card_expiration={self.card_expiration!r}, ' - f'last_four={self.last_four!r}, ' + f'card_expiration={(self.card_expiration if hasattr(self, "card_expiration") else None)!r}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!r}, ' f'masked_card_number={self.masked_card_number!r}, ' f'mtype={self.mtype!r}, ' f'additional_properties={self.additional_properties!r})') @@ -145,8 +145,8 @@ def __repr__(self): def __str__(self): return (f'{self.__class__.__name__}(' f'card_brand={self.card_brand!s}, ' - f'card_expiration={self.card_expiration!s}, ' - f'last_four={self.last_four!s}, ' + f'card_expiration={(self.card_expiration if hasattr(self, "card_expiration") else None)!s}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!s}, ' f'masked_card_number={self.masked_card_number!s}, ' f'mtype={self.mtype!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/payment_profile_attributes.py b/advancedbilling/models/payment_profile_attributes.py index ffcbf226..e0e5af34 100644 --- a/advancedbilling/models/payment_profile_attributes.py +++ b/advancedbilling/models/payment_profile_attributes.py @@ -352,58 +352,58 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'chargify_token={self.chargify_token!r}, ' - f'id={self.id!r}, ' - f'payment_type={self.payment_type!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'masked_card_number={self.masked_card_number!r}, ' - f'full_number={self.full_number!r}, ' - f'card_type={self.card_type!r}, ' - f'expiration_month={self.expiration_month!r}, ' - f'expiration_year={self.expiration_year!r}, ' - f'billing_address={self.billing_address!r}, ' - f'billing_address_2={self.billing_address_2!r}, ' - f'billing_city={self.billing_city!r}, ' - f'billing_state={self.billing_state!r}, ' - f'billing_country={self.billing_country!r}, ' - f'billing_zip={self.billing_zip!r}, ' - f'current_vault={self.current_vault!r}, ' - f'vault_token={self.vault_token!r}, ' - f'customer_vault_token={self.customer_vault_token!r}, ' - f'customer_id={self.customer_id!r}, ' - f'paypal_email={self.paypal_email!r}, ' - f'payment_method_nonce={self.payment_method_nonce!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' - f'cvv={self.cvv!r}, ' - f'last_four={self.last_four!r}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!r}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!r}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!r}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!r}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!r}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!r}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!r}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!r}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!r}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'paypal_email={(self.paypal_email if hasattr(self, "paypal_email") else None)!r}, ' + f'payment_method_nonce={(self.payment_method_nonce if hasattr(self, "payment_method_nonce") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' + f'cvv={(self.cvv if hasattr(self, "cvv") else None)!r}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'chargify_token={self.chargify_token!s}, ' - f'id={self.id!s}, ' - f'payment_type={self.payment_type!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'masked_card_number={self.masked_card_number!s}, ' - f'full_number={self.full_number!s}, ' - f'card_type={self.card_type!s}, ' - f'expiration_month={self.expiration_month!s}, ' - f'expiration_year={self.expiration_year!s}, ' - f'billing_address={self.billing_address!s}, ' - f'billing_address_2={self.billing_address_2!s}, ' - f'billing_city={self.billing_city!s}, ' - f'billing_state={self.billing_state!s}, ' - f'billing_country={self.billing_country!s}, ' - f'billing_zip={self.billing_zip!s}, ' - f'current_vault={self.current_vault!s}, ' - f'vault_token={self.vault_token!s}, ' - f'customer_vault_token={self.customer_vault_token!s}, ' - f'customer_id={self.customer_id!s}, ' - f'paypal_email={self.paypal_email!s}, ' - f'payment_method_nonce={self.payment_method_nonce!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' - f'cvv={self.cvv!s}, ' - f'last_four={self.last_four!s}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!s}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!s}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!s}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!s}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!s}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!s}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!s}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!s}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!s}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'paypal_email={(self.paypal_email if hasattr(self, "paypal_email") else None)!s}, ' + f'payment_method_nonce={(self.payment_method_nonce if hasattr(self, "payment_method_nonce") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' + f'cvv={(self.cvv if hasattr(self, "cvv") else None)!s}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/paypal_payment_profile.py b/advancedbilling/models/paypal_payment_profile.py index bc8cfb9b..677a9129 100644 --- a/advancedbilling/models/paypal_payment_profile.py +++ b/advancedbilling/models/paypal_payment_profile.py @@ -42,6 +42,10 @@ class PaypalPaymentProfile(object): site_gateway_setting_id (int): The model property of type int. gateway_handle (str): The model property of type str. paypal_email (str): The model property of type str. + created_at (datetime): A timestamp indicating when this payment + profile was created + updated_at (datetime): A timestamp indicating when this payment + profile was last updated additional_properties (Dict[str, object]): The additional properties for the model. @@ -65,7 +69,9 @@ class PaypalPaymentProfile(object): "billing_address_2": 'billing_address_2', "site_gateway_setting_id": 'site_gateway_setting_id', "gateway_handle": 'gateway_handle', - "paypal_email": 'paypal_email' + "paypal_email": 'paypal_email', + "created_at": 'created_at', + "updated_at": 'updated_at' } _optionals = [ @@ -85,6 +91,8 @@ class PaypalPaymentProfile(object): 'site_gateway_setting_id', 'gateway_handle', 'paypal_email', + 'created_at', + 'updated_at', ] _nullables = [ @@ -117,6 +125,8 @@ def __init__(self, site_gateway_setting_id=APIHelper.SKIP, gateway_handle=APIHelper.SKIP, paypal_email=APIHelper.SKIP, + created_at=APIHelper.SKIP, + updated_at=APIHelper.SKIP, additional_properties=None): """Constructor for the PaypalPaymentProfile class""" @@ -154,6 +164,10 @@ def __init__(self, self.gateway_handle = gateway_handle if paypal_email is not APIHelper.SKIP: self.paypal_email = paypal_email + if created_at is not APIHelper.SKIP: + self.created_at = APIHelper.apply_datetime_converter(created_at, APIHelper.RFC3339DateTime) if created_at else None + if updated_at is not APIHelper.SKIP: + self.updated_at = APIHelper.apply_datetime_converter(updated_at, APIHelper.RFC3339DateTime) if updated_at else None # Add additional model properties to the instance if additional_properties is None: @@ -196,6 +210,8 @@ def from_dictionary(cls, site_gateway_setting_id = dictionary.get("site_gateway_setting_id") if "site_gateway_setting_id" in dictionary.keys() else APIHelper.SKIP gateway_handle = dictionary.get("gateway_handle") if "gateway_handle" in dictionary.keys() else APIHelper.SKIP paypal_email = dictionary.get("paypal_email") if dictionary.get("paypal_email") else APIHelper.SKIP + created_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("created_at")).datetime if dictionary.get("created_at") else APIHelper.SKIP + updated_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("updated_at")).datetime if dictionary.get("updated_at") else APIHelper.SKIP # Clean out expected properties from dictionary additional_properties = {k: v for k, v in dictionary.items() if k not in cls._names.values()} # Return an object of this model @@ -216,6 +232,8 @@ def from_dictionary(cls, site_gateway_setting_id, gateway_handle, paypal_email, + created_at, + updated_at, additional_properties) @classmethod @@ -244,42 +262,46 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'customer_id={self.customer_id!r}, ' - f'current_vault={self.current_vault!r}, ' - f'vault_token={self.vault_token!r}, ' - f'billing_address={self.billing_address!r}, ' - f'billing_city={self.billing_city!r}, ' - f'billing_state={self.billing_state!r}, ' - f'billing_zip={self.billing_zip!r}, ' - f'billing_country={self.billing_country!r}, ' - f'customer_vault_token={self.customer_vault_token!r}, ' - f'billing_address_2={self.billing_address_2!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!r}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!r}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!r}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!r}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!r}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!r}, ' f'payment_type={self.payment_type!r}, ' - f'site_gateway_setting_id={self.site_gateway_setting_id!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' - f'paypal_email={self.paypal_email!r}, ' + f'site_gateway_setting_id={(self.site_gateway_setting_id if hasattr(self, "site_gateway_setting_id") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' + f'paypal_email={(self.paypal_email if hasattr(self, "paypal_email") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'customer_id={self.customer_id!s}, ' - f'current_vault={self.current_vault!s}, ' - f'vault_token={self.vault_token!s}, ' - f'billing_address={self.billing_address!s}, ' - f'billing_city={self.billing_city!s}, ' - f'billing_state={self.billing_state!s}, ' - f'billing_zip={self.billing_zip!s}, ' - f'billing_country={self.billing_country!s}, ' - f'customer_vault_token={self.customer_vault_token!s}, ' - f'billing_address_2={self.billing_address_2!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!s}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!s}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!s}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!s}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!s}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!s}, ' f'payment_type={self.payment_type!s}, ' - f'site_gateway_setting_id={self.site_gateway_setting_id!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' - f'paypal_email={self.paypal_email!s}, ' + f'site_gateway_setting_id={(self.site_gateway_setting_id if hasattr(self, "site_gateway_setting_id") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' + f'paypal_email={(self.paypal_email if hasattr(self, "paypal_email") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/portal_management_link.py b/advancedbilling/models/portal_management_link.py index ea318b7b..c64ce666 100644 --- a/advancedbilling/models/portal_management_link.py +++ b/advancedbilling/models/portal_management_link.py @@ -118,20 +118,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'url={self.url!r}, ' - f'fetch_count={self.fetch_count!r}, ' - f'created_at={self.created_at!r}, ' - f'new_link_available_at={self.new_link_available_at!r}, ' - f'expires_at={self.expires_at!r}, ' - f'last_invite_sent_at={self.last_invite_sent_at!r}, ' + f'url={(self.url if hasattr(self, "url") else None)!r}, ' + f'fetch_count={(self.fetch_count if hasattr(self, "fetch_count") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'new_link_available_at={(self.new_link_available_at if hasattr(self, "new_link_available_at") else None)!r}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!r}, ' + f'last_invite_sent_at={(self.last_invite_sent_at if hasattr(self, "last_invite_sent_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'url={self.url!s}, ' - f'fetch_count={self.fetch_count!s}, ' - f'created_at={self.created_at!s}, ' - f'new_link_available_at={self.new_link_available_at!s}, ' - f'expires_at={self.expires_at!s}, ' - f'last_invite_sent_at={self.last_invite_sent_at!s}, ' + f'url={(self.url if hasattr(self, "url") else None)!s}, ' + f'fetch_count={(self.fetch_count if hasattr(self, "fetch_count") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'new_link_available_at={(self.new_link_available_at if hasattr(self, "new_link_available_at") else None)!s}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!s}, ' + f'last_invite_sent_at={(self.last_invite_sent_at if hasattr(self, "last_invite_sent_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/prepaid_configuration.py b/advancedbilling/models/prepaid_configuration.py index 18e0c86a..44766638 100644 --- a/advancedbilling/models/prepaid_configuration.py +++ b/advancedbilling/models/prepaid_configuration.py @@ -104,18 +104,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'initial_funding_amount_in_cents={self.initial_funding_amount_in_cents!r}, ' - f'replenish_to_amount_in_cents={self.replenish_to_amount_in_cents!r}, ' - f'auto_replenish={self.auto_replenish!r}, ' - f'replenish_threshold_amount_in_cents={self.replenish_threshold_amount_in_cents!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'initial_funding_amount_in_cents={(self.initial_funding_amount_in_cents if hasattr(self, "initial_funding_amount_in_cents") else None)!r}, ' + f'replenish_to_amount_in_cents={(self.replenish_to_amount_in_cents if hasattr(self, "replenish_to_amount_in_cents") else None)!r}, ' + f'auto_replenish={(self.auto_replenish if hasattr(self, "auto_replenish") else None)!r}, ' + f'replenish_threshold_amount_in_cents={(self.replenish_threshold_amount_in_cents if hasattr(self, "replenish_threshold_amount_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'initial_funding_amount_in_cents={self.initial_funding_amount_in_cents!s}, ' - f'replenish_to_amount_in_cents={self.replenish_to_amount_in_cents!s}, ' - f'auto_replenish={self.auto_replenish!s}, ' - f'replenish_threshold_amount_in_cents={self.replenish_threshold_amount_in_cents!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'initial_funding_amount_in_cents={(self.initial_funding_amount_in_cents if hasattr(self, "initial_funding_amount_in_cents") else None)!s}, ' + f'replenish_to_amount_in_cents={(self.replenish_to_amount_in_cents if hasattr(self, "replenish_to_amount_in_cents") else None)!s}, ' + f'auto_replenish={(self.auto_replenish if hasattr(self, "auto_replenish") else None)!s}, ' + f'replenish_threshold_amount_in_cents={(self.replenish_threshold_amount_in_cents if hasattr(self, "replenish_threshold_amount_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/prepaid_usage_allocation_detail.py b/advancedbilling/models/prepaid_usage_allocation_detail.py index 9015fd85..b05fce28 100644 --- a/advancedbilling/models/prepaid_usage_allocation_detail.py +++ b/advancedbilling/models/prepaid_usage_allocation_detail.py @@ -109,14 +109,14 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'allocation_id={self.allocation_id!r}, ' - f'charge_id={self.charge_id!r}, ' - f'usage_quantity={self.usage_quantity!r}, ' + f'allocation_id={(self.allocation_id if hasattr(self, "allocation_id") else None)!r}, ' + f'charge_id={(self.charge_id if hasattr(self, "charge_id") else None)!r}, ' + f'usage_quantity={(self.usage_quantity if hasattr(self, "usage_quantity") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'allocation_id={self.allocation_id!s}, ' - f'charge_id={self.charge_id!s}, ' - f'usage_quantity={self.usage_quantity!s}, ' + f'allocation_id={(self.allocation_id if hasattr(self, "allocation_id") else None)!s}, ' + f'charge_id={(self.charge_id if hasattr(self, "charge_id") else None)!s}, ' + f'usage_quantity={(self.usage_quantity if hasattr(self, "usage_quantity") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/prepaid_usage_component.py b/advancedbilling/models/prepaid_usage_component.py index c993a5e9..ef474d3b 100644 --- a/advancedbilling/models/prepaid_usage_component.py +++ b/advancedbilling/models/prepaid_usage_component.py @@ -285,48 +285,48 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' f'unit_name={self.unit_name!r}, ' - f'description={self.description!r}, ' - f'handle={self.handle!r}, ' - f'taxable={self.taxable!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!r}, ' f'pricing_scheme={self.pricing_scheme!r}, ' - f'prices={self.prices!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'price_points={self.price_points!r}, ' - f'unit_price={self.unit_price!r}, ' - f'tax_code={self.tax_code!r}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!r}, ' f'overage_pricing={self.overage_pricing!r}, ' - f'rollover_prepaid_remainder={self.rollover_prepaid_remainder!r}, ' - f'renew_prepaid_allocation={self.renew_prepaid_allocation!r}, ' - f'expiration_interval={self.expiration_interval!r}, ' - f'expiration_interval_unit={self.expiration_interval_unit!r}, ' - f'display_on_hosted_page={self.display_on_hosted_page!r}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!r}, ' - f'public_signup_page_ids={self.public_signup_page_ids!r}, ' + f'rollover_prepaid_remainder={(self.rollover_prepaid_remainder if hasattr(self, "rollover_prepaid_remainder") else None)!r}, ' + f'renew_prepaid_allocation={(self.renew_prepaid_allocation if hasattr(self, "renew_prepaid_allocation") else None)!r}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!r}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!r}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!r}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!r}, ' + f'public_signup_page_ids={(self.public_signup_page_ids if hasattr(self, "public_signup_page_ids") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' f'unit_name={self.unit_name!s}, ' - f'description={self.description!s}, ' - f'handle={self.handle!s}, ' - f'taxable={self.taxable!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!s}, ' f'pricing_scheme={self.pricing_scheme!s}, ' - f'prices={self.prices!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'price_points={self.price_points!s}, ' - f'unit_price={self.unit_price!s}, ' - f'tax_code={self.tax_code!s}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!s}, ' f'overage_pricing={self.overage_pricing!s}, ' - f'rollover_prepaid_remainder={self.rollover_prepaid_remainder!s}, ' - f'renew_prepaid_allocation={self.renew_prepaid_allocation!s}, ' - f'expiration_interval={self.expiration_interval!s}, ' - f'expiration_interval_unit={self.expiration_interval_unit!s}, ' - f'display_on_hosted_page={self.display_on_hosted_page!s}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!s}, ' - f'public_signup_page_ids={self.public_signup_page_ids!s}, ' + f'rollover_prepaid_remainder={(self.rollover_prepaid_remainder if hasattr(self, "rollover_prepaid_remainder") else None)!s}, ' + f'renew_prepaid_allocation={(self.renew_prepaid_allocation if hasattr(self, "renew_prepaid_allocation") else None)!s}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!s}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!s}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!s}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!s}, ' + f'public_signup_page_ids={(self.public_signup_page_ids if hasattr(self, "public_signup_page_ids") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/prepayment.py b/advancedbilling/models/prepayment.py index 3fa1d74c..d5e5df0f 100644 --- a/advancedbilling/models/prepayment.py +++ b/advancedbilling/models/prepayment.py @@ -133,11 +133,11 @@ def __repr__(self): f'subscription_id={self.subscription_id!r}, ' f'amount_in_cents={self.amount_in_cents!r}, ' f'remaining_amount_in_cents={self.remaining_amount_in_cents!r}, ' - f'refunded_amount_in_cents={self.refunded_amount_in_cents!r}, ' - f'details={self.details!r}, ' + f'refunded_amount_in_cents={(self.refunded_amount_in_cents if hasattr(self, "refunded_amount_in_cents") else None)!r}, ' + f'details={(self.details if hasattr(self, "details") else None)!r}, ' f'external={self.external!r}, ' f'memo={self.memo!r}, ' - f'payment_type={self.payment_type!r}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!r}, ' f'created_at={self.created_at!r}, ' f'additional_properties={self.additional_properties!r})') @@ -147,10 +147,10 @@ def __str__(self): f'subscription_id={self.subscription_id!s}, ' f'amount_in_cents={self.amount_in_cents!s}, ' f'remaining_amount_in_cents={self.remaining_amount_in_cents!s}, ' - f'refunded_amount_in_cents={self.refunded_amount_in_cents!s}, ' - f'details={self.details!s}, ' + f'refunded_amount_in_cents={(self.refunded_amount_in_cents if hasattr(self, "refunded_amount_in_cents") else None)!s}, ' + f'details={(self.details if hasattr(self, "details") else None)!s}, ' f'external={self.external!s}, ' f'memo={self.memo!s}, ' - f'payment_type={self.payment_type!s}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!s}, ' f'created_at={self.created_at!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/prepayments_response.py b/advancedbilling/models/prepayments_response.py index 41a26abe..667d6f60 100644 --- a/advancedbilling/models/prepayments_response.py +++ b/advancedbilling/models/prepayments_response.py @@ -77,10 +77,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'prepayments={self.prepayments!r}, ' + f'prepayments={(self.prepayments if hasattr(self, "prepayments") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'prepayments={self.prepayments!s}, ' + f'prepayments={(self.prepayments if hasattr(self, "prepayments") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/preview_allocations_request.py b/advancedbilling/models/preview_allocations_request.py index 496c5b20..6731b14e 100644 --- a/advancedbilling/models/preview_allocations_request.py +++ b/advancedbilling/models/preview_allocations_request.py @@ -113,15 +113,15 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' f'allocations={self.allocations!r}, ' - f'effective_proration_date={self.effective_proration_date!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' + f'effective_proration_date={(self.effective_proration_date if hasattr(self, "effective_proration_date") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'allocations={self.allocations!s}, ' - f'effective_proration_date={self.effective_proration_date!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' + f'effective_proration_date={(self.effective_proration_date if hasattr(self, "effective_proration_date") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/price.py b/advancedbilling/models/price.py index 7d414e6f..a80b6a4e 100644 --- a/advancedbilling/models/price.py +++ b/advancedbilling/models/price.py @@ -119,13 +119,13 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'starting_quantity={self.starting_quantity!r}, ' - f'ending_quantity={self.ending_quantity!r}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!r}, ' f'unit_price={self.unit_price!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'starting_quantity={self.starting_quantity!s}, ' - f'ending_quantity={self.ending_quantity!s}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!s}, ' f'unit_price={self.unit_price!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/product.py b/advancedbilling/models/product.py index f1422334..ac450752 100644 --- a/advancedbilling/models/product.py +++ b/advancedbilling/models/product.py @@ -424,82 +424,82 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'name={self.name!r}, ' - f'handle={self.handle!r}, ' - f'description={self.description!r}, ' - f'accounting_code={self.accounting_code!r}, ' - f'request_credit_card={self.request_credit_card!r}, ' - f'expiration_interval={self.expiration_interval!r}, ' - f'expiration_interval_unit={self.expiration_interval_unit!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'price_in_cents={self.price_in_cents!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' - f'initial_charge_in_cents={self.initial_charge_in_cents!r}, ' - f'trial_price_in_cents={self.trial_price_in_cents!r}, ' - f'trial_interval={self.trial_interval!r}, ' - f'trial_interval_unit={self.trial_interval_unit!r}, ' - f'archived_at={self.archived_at!r}, ' - f'require_credit_card={self.require_credit_card!r}, ' - f'return_params={self.return_params!r}, ' - f'taxable={self.taxable!r}, ' - f'update_return_url={self.update_return_url!r}, ' - f'initial_charge_after_trial={self.initial_charge_after_trial!r}, ' - f'version_number={self.version_number!r}, ' - f'update_return_params={self.update_return_params!r}, ' - f'product_family={self.product_family!r}, ' - f'public_signup_pages={self.public_signup_pages!r}, ' - f'product_price_point_name={self.product_price_point_name!r}, ' - f'request_billing_address={self.request_billing_address!r}, ' - f'require_billing_address={self.require_billing_address!r}, ' - f'require_shipping_address={self.require_shipping_address!r}, ' - f'tax_code={self.tax_code!r}, ' - f'default_product_price_point_id={self.default_product_price_point_id!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'item_category={self.item_category!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'product_price_point_handle={self.product_price_point_handle!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!r}, ' + f'request_credit_card={(self.request_credit_card if hasattr(self, "request_credit_card") else None)!r}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!r}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'price_in_cents={(self.price_in_cents if hasattr(self, "price_in_cents") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' + f'initial_charge_in_cents={(self.initial_charge_in_cents if hasattr(self, "initial_charge_in_cents") else None)!r}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!r}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!r}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!r}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!r}, ' + f'require_credit_card={(self.require_credit_card if hasattr(self, "require_credit_card") else None)!r}, ' + f'return_params={(self.return_params if hasattr(self, "return_params") else None)!r}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!r}, ' + f'update_return_url={(self.update_return_url if hasattr(self, "update_return_url") else None)!r}, ' + f'initial_charge_after_trial={(self.initial_charge_after_trial if hasattr(self, "initial_charge_after_trial") else None)!r}, ' + f'version_number={(self.version_number if hasattr(self, "version_number") else None)!r}, ' + f'update_return_params={(self.update_return_params if hasattr(self, "update_return_params") else None)!r}, ' + f'product_family={(self.product_family if hasattr(self, "product_family") else None)!r}, ' + f'public_signup_pages={(self.public_signup_pages if hasattr(self, "public_signup_pages") else None)!r}, ' + f'product_price_point_name={(self.product_price_point_name if hasattr(self, "product_price_point_name") else None)!r}, ' + f'request_billing_address={(self.request_billing_address if hasattr(self, "request_billing_address") else None)!r}, ' + f'require_billing_address={(self.require_billing_address if hasattr(self, "require_billing_address") else None)!r}, ' + f'require_shipping_address={(self.require_shipping_address if hasattr(self, "require_shipping_address") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'default_product_price_point_id={(self.default_product_price_point_id if hasattr(self, "default_product_price_point_id") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'item_category={(self.item_category if hasattr(self, "item_category") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'name={self.name!s}, ' - f'handle={self.handle!s}, ' - f'description={self.description!s}, ' - f'accounting_code={self.accounting_code!s}, ' - f'request_credit_card={self.request_credit_card!s}, ' - f'expiration_interval={self.expiration_interval!s}, ' - f'expiration_interval_unit={self.expiration_interval_unit!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'price_in_cents={self.price_in_cents!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' - f'initial_charge_in_cents={self.initial_charge_in_cents!s}, ' - f'trial_price_in_cents={self.trial_price_in_cents!s}, ' - f'trial_interval={self.trial_interval!s}, ' - f'trial_interval_unit={self.trial_interval_unit!s}, ' - f'archived_at={self.archived_at!s}, ' - f'require_credit_card={self.require_credit_card!s}, ' - f'return_params={self.return_params!s}, ' - f'taxable={self.taxable!s}, ' - f'update_return_url={self.update_return_url!s}, ' - f'initial_charge_after_trial={self.initial_charge_after_trial!s}, ' - f'version_number={self.version_number!s}, ' - f'update_return_params={self.update_return_params!s}, ' - f'product_family={self.product_family!s}, ' - f'public_signup_pages={self.public_signup_pages!s}, ' - f'product_price_point_name={self.product_price_point_name!s}, ' - f'request_billing_address={self.request_billing_address!s}, ' - f'require_billing_address={self.require_billing_address!s}, ' - f'require_shipping_address={self.require_shipping_address!s}, ' - f'tax_code={self.tax_code!s}, ' - f'default_product_price_point_id={self.default_product_price_point_id!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'item_category={self.item_category!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'product_price_point_handle={self.product_price_point_handle!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!s}, ' + f'request_credit_card={(self.request_credit_card if hasattr(self, "request_credit_card") else None)!s}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!s}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'price_in_cents={(self.price_in_cents if hasattr(self, "price_in_cents") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' + f'initial_charge_in_cents={(self.initial_charge_in_cents if hasattr(self, "initial_charge_in_cents") else None)!s}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!s}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!s}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!s}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!s}, ' + f'require_credit_card={(self.require_credit_card if hasattr(self, "require_credit_card") else None)!s}, ' + f'return_params={(self.return_params if hasattr(self, "return_params") else None)!s}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!s}, ' + f'update_return_url={(self.update_return_url if hasattr(self, "update_return_url") else None)!s}, ' + f'initial_charge_after_trial={(self.initial_charge_after_trial if hasattr(self, "initial_charge_after_trial") else None)!s}, ' + f'version_number={(self.version_number if hasattr(self, "version_number") else None)!s}, ' + f'update_return_params={(self.update_return_params if hasattr(self, "update_return_params") else None)!s}, ' + f'product_family={(self.product_family if hasattr(self, "product_family") else None)!s}, ' + f'public_signup_pages={(self.public_signup_pages if hasattr(self, "public_signup_pages") else None)!s}, ' + f'product_price_point_name={(self.product_price_point_name if hasattr(self, "product_price_point_name") else None)!s}, ' + f'request_billing_address={(self.request_billing_address if hasattr(self, "request_billing_address") else None)!s}, ' + f'require_billing_address={(self.require_billing_address if hasattr(self, "require_billing_address") else None)!s}, ' + f'require_shipping_address={(self.require_shipping_address if hasattr(self, "require_shipping_address") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'default_product_price_point_id={(self.default_product_price_point_id if hasattr(self, "default_product_price_point_id") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'item_category={(self.item_category if hasattr(self, "item_category") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/product_family.py b/advancedbilling/models/product_family.py index d6ee3364..a5749095 100644 --- a/advancedbilling/models/product_family.py +++ b/advancedbilling/models/product_family.py @@ -124,22 +124,22 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'name={self.name!r}, ' - f'handle={self.handle!r}, ' - f'accounting_code={self.accounting_code!r}, ' - f'description={self.description!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'name={self.name!s}, ' - f'handle={self.handle!s}, ' - f'accounting_code={self.accounting_code!s}, ' - f'description={self.description!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/product_family_response.py b/advancedbilling/models/product_family_response.py index 6df658ae..e3ccbc62 100644 --- a/advancedbilling/models/product_family_response.py +++ b/advancedbilling/models/product_family_response.py @@ -73,10 +73,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'product_family={self.product_family!r}, ' + f'product_family={(self.product_family if hasattr(self, "product_family") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'product_family={self.product_family!s}, ' + f'product_family={(self.product_family if hasattr(self, "product_family") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/product_price_point.py b/advancedbilling/models/product_price_point.py index 8c850a04..19c43ad7 100644 --- a/advancedbilling/models/product_price_point.py +++ b/advancedbilling/models/product_price_point.py @@ -299,56 +299,56 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'name={self.name!r}, ' - f'handle={self.handle!r}, ' - f'price_in_cents={self.price_in_cents!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' - f'trial_price_in_cents={self.trial_price_in_cents!r}, ' - f'trial_interval={self.trial_interval!r}, ' - f'trial_interval_unit={self.trial_interval_unit!r}, ' - f'trial_type={self.trial_type!r}, ' - f'introductory_offer={self.introductory_offer!r}, ' - f'initial_charge_in_cents={self.initial_charge_in_cents!r}, ' - f'initial_charge_after_trial={self.initial_charge_after_trial!r}, ' - f'expiration_interval={self.expiration_interval!r}, ' - f'expiration_interval_unit={self.expiration_interval_unit!r}, ' - f'product_id={self.product_id!r}, ' - f'archived_at={self.archived_at!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'mtype={self.mtype!r}, ' - f'tax_included={self.tax_included!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'currency_prices={self.currency_prices!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'price_in_cents={(self.price_in_cents if hasattr(self, "price_in_cents") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!r}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!r}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!r}, ' + f'trial_type={(self.trial_type if hasattr(self, "trial_type") else None)!r}, ' + f'introductory_offer={(self.introductory_offer if hasattr(self, "introductory_offer") else None)!r}, ' + f'initial_charge_in_cents={(self.initial_charge_in_cents if hasattr(self, "initial_charge_in_cents") else None)!r}, ' + f'initial_charge_after_trial={(self.initial_charge_after_trial if hasattr(self, "initial_charge_after_trial") else None)!r}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!r}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!r}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'name={self.name!s}, ' - f'handle={self.handle!s}, ' - f'price_in_cents={self.price_in_cents!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' - f'trial_price_in_cents={self.trial_price_in_cents!s}, ' - f'trial_interval={self.trial_interval!s}, ' - f'trial_interval_unit={self.trial_interval_unit!s}, ' - f'trial_type={self.trial_type!s}, ' - f'introductory_offer={self.introductory_offer!s}, ' - f'initial_charge_in_cents={self.initial_charge_in_cents!s}, ' - f'initial_charge_after_trial={self.initial_charge_after_trial!s}, ' - f'expiration_interval={self.expiration_interval!s}, ' - f'expiration_interval_unit={self.expiration_interval_unit!s}, ' - f'product_id={self.product_id!s}, ' - f'archived_at={self.archived_at!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'mtype={self.mtype!s}, ' - f'tax_included={self.tax_included!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'currency_prices={self.currency_prices!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'price_in_cents={(self.price_in_cents if hasattr(self, "price_in_cents") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!s}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!s}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!s}, ' + f'trial_type={(self.trial_type if hasattr(self, "trial_type") else None)!s}, ' + f'introductory_offer={(self.introductory_offer if hasattr(self, "introductory_offer") else None)!s}, ' + f'initial_charge_in_cents={(self.initial_charge_in_cents if hasattr(self, "initial_charge_in_cents") else None)!s}, ' + f'initial_charge_after_trial={(self.initial_charge_after_trial if hasattr(self, "initial_charge_after_trial") else None)!s}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!s}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'mtype={(self.mtype if hasattr(self, "mtype") else None)!s}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'currency_prices={(self.currency_prices if hasattr(self, "currency_prices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/product_price_point_errors.py b/advancedbilling/models/product_price_point_errors.py index 079f8c7f..b913e2c6 100644 --- a/advancedbilling/models/product_price_point_errors.py +++ b/advancedbilling/models/product_price_point_errors.py @@ -111,20 +111,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'price_point={self.price_point!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' - f'name={self.name!r}, ' - f'price={self.price!r}, ' - f'price_in_cents={self.price_in_cents!r}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'price={(self.price if hasattr(self, "price") else None)!r}, ' + f'price_in_cents={(self.price_in_cents if hasattr(self, "price_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'price_point={self.price_point!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' - f'name={self.name!s}, ' - f'price={self.price!s}, ' - f'price_in_cents={self.price_in_cents!s}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'price={(self.price if hasattr(self, "price") else None)!s}, ' + f'price_in_cents={(self.price_in_cents if hasattr(self, "price_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/proforma_error.py b/advancedbilling/models/proforma_error.py index 9cf6c734..1c7ca088 100644 --- a/advancedbilling/models/proforma_error.py +++ b/advancedbilling/models/proforma_error.py @@ -73,10 +73,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'subscription={self.subscription!r}, ' + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'subscription={self.subscription!s}, ' + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/proforma_invoice.py b/advancedbilling/models/proforma_invoice.py index 4fbe471f..5454e501 100644 --- a/advancedbilling/models/proforma_invoice.py +++ b/advancedbilling/models/proforma_invoice.py @@ -420,80 +420,80 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'site_id={self.site_id!r}, ' - f'customer_id={self.customer_id!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'number={self.number!r}, ' - f'sequence_number={self.sequence_number!r}, ' - f'created_at={self.created_at!r}, ' - f'delivery_date={self.delivery_date!r}, ' - f'status={self.status!r}, ' - f'collection_method={self.collection_method!r}, ' - f'payment_instructions={self.payment_instructions!r}, ' - f'currency={self.currency!r}, ' - f'consolidation_level={self.consolidation_level!r}, ' - f'product_name={self.product_name!r}, ' - f'product_family_name={self.product_family_name!r}, ' - f'role={self.role!r}, ' - f'seller={self.seller!r}, ' - f'customer={self.customer!r}, ' - f'memo={self.memo!r}, ' - f'billing_address={self.billing_address!r}, ' - f'shipping_address={self.shipping_address!r}, ' - f'subtotal_amount={self.subtotal_amount!r}, ' - f'discount_amount={self.discount_amount!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'total_amount={self.total_amount!r}, ' - f'credit_amount={self.credit_amount!r}, ' - f'paid_amount={self.paid_amount!r}, ' - f'refund_amount={self.refund_amount!r}, ' - f'due_amount={self.due_amount!r}, ' - f'line_items={self.line_items!r}, ' - f'discounts={self.discounts!r}, ' - f'taxes={self.taxes!r}, ' - f'credits={self.credits!r}, ' - f'payments={self.payments!r}, ' - f'custom_fields={self.custom_fields!r}, ' - f'public_url={self.public_url!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'number={(self.number if hasattr(self, "number") else None)!r}, ' + f'sequence_number={(self.sequence_number if hasattr(self, "sequence_number") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'delivery_date={(self.delivery_date if hasattr(self, "delivery_date") else None)!r}, ' + f'status={(self.status if hasattr(self, "status") else None)!r}, ' + f'collection_method={(self.collection_method if hasattr(self, "collection_method") else None)!r}, ' + f'payment_instructions={(self.payment_instructions if hasattr(self, "payment_instructions") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'consolidation_level={(self.consolidation_level if hasattr(self, "consolidation_level") else None)!r}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!r}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!r}, ' + f'role={(self.role if hasattr(self, "role") else None)!r}, ' + f'seller={(self.seller if hasattr(self, "seller") else None)!r}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!r}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!r}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!r}, ' + f'credit_amount={(self.credit_amount if hasattr(self, "credit_amount") else None)!r}, ' + f'paid_amount={(self.paid_amount if hasattr(self, "paid_amount") else None)!r}, ' + f'refund_amount={(self.refund_amount if hasattr(self, "refund_amount") else None)!r}, ' + f'due_amount={(self.due_amount if hasattr(self, "due_amount") else None)!r}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!r}, ' + f'discounts={(self.discounts if hasattr(self, "discounts") else None)!r}, ' + f'taxes={(self.taxes if hasattr(self, "taxes") else None)!r}, ' + f'credits={(self.credits if hasattr(self, "credits") else None)!r}, ' + f'payments={(self.payments if hasattr(self, "payments") else None)!r}, ' + f'custom_fields={(self.custom_fields if hasattr(self, "custom_fields") else None)!r}, ' + f'public_url={(self.public_url if hasattr(self, "public_url") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'site_id={self.site_id!s}, ' - f'customer_id={self.customer_id!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'number={self.number!s}, ' - f'sequence_number={self.sequence_number!s}, ' - f'created_at={self.created_at!s}, ' - f'delivery_date={self.delivery_date!s}, ' - f'status={self.status!s}, ' - f'collection_method={self.collection_method!s}, ' - f'payment_instructions={self.payment_instructions!s}, ' - f'currency={self.currency!s}, ' - f'consolidation_level={self.consolidation_level!s}, ' - f'product_name={self.product_name!s}, ' - f'product_family_name={self.product_family_name!s}, ' - f'role={self.role!s}, ' - f'seller={self.seller!s}, ' - f'customer={self.customer!s}, ' - f'memo={self.memo!s}, ' - f'billing_address={self.billing_address!s}, ' - f'shipping_address={self.shipping_address!s}, ' - f'subtotal_amount={self.subtotal_amount!s}, ' - f'discount_amount={self.discount_amount!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'total_amount={self.total_amount!s}, ' - f'credit_amount={self.credit_amount!s}, ' - f'paid_amount={self.paid_amount!s}, ' - f'refund_amount={self.refund_amount!s}, ' - f'due_amount={self.due_amount!s}, ' - f'line_items={self.line_items!s}, ' - f'discounts={self.discounts!s}, ' - f'taxes={self.taxes!s}, ' - f'credits={self.credits!s}, ' - f'payments={self.payments!s}, ' - f'custom_fields={self.custom_fields!s}, ' - f'public_url={self.public_url!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'number={(self.number if hasattr(self, "number") else None)!s}, ' + f'sequence_number={(self.sequence_number if hasattr(self, "sequence_number") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'delivery_date={(self.delivery_date if hasattr(self, "delivery_date") else None)!s}, ' + f'status={(self.status if hasattr(self, "status") else None)!s}, ' + f'collection_method={(self.collection_method if hasattr(self, "collection_method") else None)!s}, ' + f'payment_instructions={(self.payment_instructions if hasattr(self, "payment_instructions") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'consolidation_level={(self.consolidation_level if hasattr(self, "consolidation_level") else None)!s}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!s}, ' + f'product_family_name={(self.product_family_name if hasattr(self, "product_family_name") else None)!s}, ' + f'role={(self.role if hasattr(self, "role") else None)!s}, ' + f'seller={(self.seller if hasattr(self, "seller") else None)!s}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'shipping_address={(self.shipping_address if hasattr(self, "shipping_address") else None)!s}, ' + f'subtotal_amount={(self.subtotal_amount if hasattr(self, "subtotal_amount") else None)!s}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'total_amount={(self.total_amount if hasattr(self, "total_amount") else None)!s}, ' + f'credit_amount={(self.credit_amount if hasattr(self, "credit_amount") else None)!s}, ' + f'paid_amount={(self.paid_amount if hasattr(self, "paid_amount") else None)!s}, ' + f'refund_amount={(self.refund_amount if hasattr(self, "refund_amount") else None)!s}, ' + f'due_amount={(self.due_amount if hasattr(self, "due_amount") else None)!s}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!s}, ' + f'discounts={(self.discounts if hasattr(self, "discounts") else None)!s}, ' + f'taxes={(self.taxes if hasattr(self, "taxes") else None)!s}, ' + f'credits={(self.credits if hasattr(self, "credits") else None)!s}, ' + f'payments={(self.payments if hasattr(self, "payments") else None)!s}, ' + f'custom_fields={(self.custom_fields if hasattr(self, "custom_fields") else None)!s}, ' + f'public_url={(self.public_url if hasattr(self, "public_url") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/proforma_invoice_credit.py b/advancedbilling/models/proforma_invoice_credit.py index 43cccd6e..94da34e3 100644 --- a/advancedbilling/models/proforma_invoice_credit.py +++ b/advancedbilling/models/proforma_invoice_credit.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'memo={self.memo!r}, ' - f'original_amount={self.original_amount!r}, ' - f'applied_amount={self.applied_amount!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!r}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'memo={self.memo!s}, ' - f'original_amount={self.original_amount!s}, ' - f'applied_amount={self.applied_amount!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!s}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/proforma_invoice_discount.py b/advancedbilling/models/proforma_invoice_discount.py index 2589db8f..b74a48b4 100644 --- a/advancedbilling/models/proforma_invoice_discount.py +++ b/advancedbilling/models/proforma_invoice_discount.py @@ -135,24 +135,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'title={self.title!r}, ' - f'code={self.code!r}, ' - f'source_type={self.source_type!r}, ' - f'discount_type={self.discount_type!r}, ' - f'eligible_amount={self.eligible_amount!r}, ' - f'discount_amount={self.discount_amount!r}, ' - f'line_item_breakouts={self.line_item_breakouts!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'title={(self.title if hasattr(self, "title") else None)!r}, ' + f'code={(self.code if hasattr(self, "code") else None)!r}, ' + f'source_type={(self.source_type if hasattr(self, "source_type") else None)!r}, ' + f'discount_type={(self.discount_type if hasattr(self, "discount_type") else None)!r}, ' + f'eligible_amount={(self.eligible_amount if hasattr(self, "eligible_amount") else None)!r}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!r}, ' + f'line_item_breakouts={(self.line_item_breakouts if hasattr(self, "line_item_breakouts") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'title={self.title!s}, ' - f'code={self.code!s}, ' - f'source_type={self.source_type!s}, ' - f'discount_type={self.discount_type!s}, ' - f'eligible_amount={self.eligible_amount!s}, ' - f'discount_amount={self.discount_amount!s}, ' - f'line_item_breakouts={self.line_item_breakouts!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'title={(self.title if hasattr(self, "title") else None)!s}, ' + f'code={(self.code if hasattr(self, "code") else None)!s}, ' + f'source_type={(self.source_type if hasattr(self, "source_type") else None)!s}, ' + f'discount_type={(self.discount_type if hasattr(self, "discount_type") else None)!s}, ' + f'eligible_amount={(self.eligible_amount if hasattr(self, "eligible_amount") else None)!s}, ' + f'discount_amount={(self.discount_amount if hasattr(self, "discount_amount") else None)!s}, ' + f'line_item_breakouts={(self.line_item_breakouts if hasattr(self, "line_item_breakouts") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/proforma_invoice_payment.py b/advancedbilling/models/proforma_invoice_payment.py index 02a780c5..3eb82995 100644 --- a/advancedbilling/models/proforma_invoice_payment.py +++ b/advancedbilling/models/proforma_invoice_payment.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'memo={self.memo!r}, ' - f'original_amount={self.original_amount!r}, ' - f'applied_amount={self.applied_amount!r}, ' - f'prepayment={self.prepayment!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!r}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!r}, ' + f'prepayment={(self.prepayment if hasattr(self, "prepayment") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'memo={self.memo!s}, ' - f'original_amount={self.original_amount!s}, ' - f'applied_amount={self.applied_amount!s}, ' - f'prepayment={self.prepayment!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!s}, ' + f'applied_amount={(self.applied_amount if hasattr(self, "applied_amount") else None)!s}, ' + f'prepayment={(self.prepayment if hasattr(self, "prepayment") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/proforma_invoice_tax.py b/advancedbilling/models/proforma_invoice_tax.py index 658a6b68..b060f4c8 100644 --- a/advancedbilling/models/proforma_invoice_tax.py +++ b/advancedbilling/models/proforma_invoice_tax.py @@ -126,22 +126,22 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'title={self.title!r}, ' - f'source_type={self.source_type!r}, ' - f'percentage={self.percentage!r}, ' - f'taxable_amount={self.taxable_amount!r}, ' - f'tax_amount={self.tax_amount!r}, ' - f'line_item_breakouts={self.line_item_breakouts!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'title={(self.title if hasattr(self, "title") else None)!r}, ' + f'source_type={(self.source_type if hasattr(self, "source_type") else None)!r}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!r}, ' + f'taxable_amount={(self.taxable_amount if hasattr(self, "taxable_amount") else None)!r}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!r}, ' + f'line_item_breakouts={(self.line_item_breakouts if hasattr(self, "line_item_breakouts") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'title={self.title!s}, ' - f'source_type={self.source_type!s}, ' - f'percentage={self.percentage!s}, ' - f'taxable_amount={self.taxable_amount!s}, ' - f'tax_amount={self.tax_amount!s}, ' - f'line_item_breakouts={self.line_item_breakouts!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'title={(self.title if hasattr(self, "title") else None)!s}, ' + f'source_type={(self.source_type if hasattr(self, "source_type") else None)!s}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!s}, ' + f'taxable_amount={(self.taxable_amount if hasattr(self, "taxable_amount") else None)!s}, ' + f'tax_amount={(self.tax_amount if hasattr(self, "tax_amount") else None)!s}, ' + f'line_item_breakouts={(self.line_item_breakouts if hasattr(self, "line_item_breakouts") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/proration.py b/advancedbilling/models/proration.py index 1cdb8091..729151e0 100644 --- a/advancedbilling/models/proration.py +++ b/advancedbilling/models/proration.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'preserve_period={self.preserve_period!r}, ' + f'preserve_period={(self.preserve_period if hasattr(self, "preserve_period") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'preserve_period={self.preserve_period!s}, ' + f'preserve_period={(self.preserve_period if hasattr(self, "preserve_period") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/public_key.py b/advancedbilling/models/public_key.py index d9176373..b0b870bc 100644 --- a/advancedbilling/models/public_key.py +++ b/advancedbilling/models/public_key.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'public_key={self.public_key!r}, ' - f'requires_security_token={self.requires_security_token!r}, ' - f'created_at={self.created_at!r}, ' + f'public_key={(self.public_key if hasattr(self, "public_key") else None)!r}, ' + f'requires_security_token={(self.requires_security_token if hasattr(self, "requires_security_token") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'public_key={self.public_key!s}, ' - f'requires_security_token={self.requires_security_token!s}, ' - f'created_at={self.created_at!s}, ' + f'public_key={(self.public_key if hasattr(self, "public_key") else None)!s}, ' + f'requires_security_token={(self.requires_security_token if hasattr(self, "requires_security_token") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/public_signup_page.py b/advancedbilling/models/public_signup_page.py index 95616280..1dd53b6a 100644 --- a/advancedbilling/models/public_signup_page.py +++ b/advancedbilling/models/public_signup_page.py @@ -103,16 +103,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'return_url={self.return_url!r}, ' - f'return_params={self.return_params!r}, ' - f'url={self.url!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'return_url={(self.return_url if hasattr(self, "return_url") else None)!r}, ' + f'return_params={(self.return_params if hasattr(self, "return_params") else None)!r}, ' + f'url={(self.url if hasattr(self, "url") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'return_url={self.return_url!s}, ' - f'return_params={self.return_params!s}, ' - f'url={self.url!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'return_url={(self.return_url if hasattr(self, "return_url") else None)!s}, ' + f'return_params={(self.return_params if hasattr(self, "return_params") else None)!s}, ' + f'url={(self.url if hasattr(self, "url") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/quantity_based_component.py b/advancedbilling/models/quantity_based_component.py index 47ae9c51..49b703f3 100644 --- a/advancedbilling/models/quantity_based_component.py +++ b/advancedbilling/models/quantity_based_component.py @@ -268,44 +268,44 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'name={self.name!r}, ' f'unit_name={self.unit_name!r}, ' - f'description={self.description!r}, ' - f'handle={self.handle!r}, ' - f'taxable={self.taxable!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!r}, ' f'pricing_scheme={self.pricing_scheme!r}, ' - f'prices={self.prices!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'price_points={self.price_points!r}, ' - f'unit_price={self.unit_price!r}, ' - f'tax_code={self.tax_code!r}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!r}, ' - f'recurring={self.recurring!r}, ' - f'display_on_hosted_page={self.display_on_hosted_page!r}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!r}, ' - f'public_signup_page_ids={self.public_signup_page_ids!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!r}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!r}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!r}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!r}, ' + f'public_signup_page_ids={(self.public_signup_page_ids if hasattr(self, "public_signup_page_ids") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'name={self.name!s}, ' f'unit_name={self.unit_name!s}, ' - f'description={self.description!s}, ' - f'handle={self.handle!s}, ' - f'taxable={self.taxable!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!s}, ' f'pricing_scheme={self.pricing_scheme!s}, ' - f'prices={self.prices!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'price_points={self.price_points!s}, ' - f'unit_price={self.unit_price!s}, ' - f'tax_code={self.tax_code!s}, ' - f'hide_date_range_on_invoice={self.hide_date_range_on_invoice!s}, ' - f'recurring={self.recurring!s}, ' - f'display_on_hosted_page={self.display_on_hosted_page!s}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!s}, ' - f'public_signup_page_ids={self.public_signup_page_ids!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'price_points={(self.price_points if hasattr(self, "price_points") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'hide_date_range_on_invoice={(self.hide_date_range_on_invoice if hasattr(self, "hide_date_range_on_invoice") else None)!s}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!s}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!s}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!s}, ' + f'public_signup_page_ids={(self.public_signup_page_ids if hasattr(self, "public_signup_page_ids") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/reactivate_subscription_group_request.py b/advancedbilling/models/reactivate_subscription_group_request.py index a4a6c2ac..1b085375 100644 --- a/advancedbilling/models/reactivate_subscription_group_request.py +++ b/advancedbilling/models/reactivate_subscription_group_request.py @@ -79,12 +79,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'resume={self.resume!r}, ' - f'resume_members={self.resume_members!r}, ' + f'resume={(self.resume if hasattr(self, "resume") else None)!r}, ' + f'resume_members={(self.resume_members if hasattr(self, "resume_members") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'resume={self.resume!s}, ' - f'resume_members={self.resume_members!s}, ' + f'resume={(self.resume if hasattr(self, "resume") else None)!s}, ' + f'resume_members={(self.resume_members if hasattr(self, "resume_members") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/reactivate_subscription_group_response.py b/advancedbilling/models/reactivate_subscription_group_response.py index b50f82f7..9d38edde 100644 --- a/advancedbilling/models/reactivate_subscription_group_response.py +++ b/advancedbilling/models/reactivate_subscription_group_response.py @@ -135,26 +135,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'scheme={self.scheme!r}, ' - f'customer_id={self.customer_id!r}, ' - f'payment_profile_id={self.payment_profile_id!r}, ' - f'subscription_ids={self.subscription_ids!r}, ' - f'primary_subscription_id={self.primary_subscription_id!r}, ' - f'next_assessment_at={self.next_assessment_at!r}, ' - f'state={self.state!r}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!r}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!r}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'scheme={self.scheme!s}, ' - f'customer_id={self.customer_id!s}, ' - f'payment_profile_id={self.payment_profile_id!s}, ' - f'subscription_ids={self.subscription_ids!s}, ' - f'primary_subscription_id={self.primary_subscription_id!s}, ' - f'next_assessment_at={self.next_assessment_at!s}, ' - f'state={self.state!s}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!s}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!s}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/reactivate_subscription_request.py b/advancedbilling/models/reactivate_subscription_request.py index ab3efa8f..73074d59 100644 --- a/advancedbilling/models/reactivate_subscription_request.py +++ b/advancedbilling/models/reactivate_subscription_request.py @@ -123,20 +123,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'calendar_billing={self.calendar_billing!r}, ' - f'include_trial={self.include_trial!r}, ' - f'preserve_balance={self.preserve_balance!r}, ' - f'coupon_code={self.coupon_code!r}, ' - f'use_credits_and_prepayments={self.use_credits_and_prepayments!r}, ' - f'resume={self.resume!r}, ' + f'calendar_billing={(self.calendar_billing if hasattr(self, "calendar_billing") else None)!r}, ' + f'include_trial={(self.include_trial if hasattr(self, "include_trial") else None)!r}, ' + f'preserve_balance={(self.preserve_balance if hasattr(self, "preserve_balance") else None)!r}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!r}, ' + f'use_credits_and_prepayments={(self.use_credits_and_prepayments if hasattr(self, "use_credits_and_prepayments") else None)!r}, ' + f'resume={(self.resume if hasattr(self, "resume") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'calendar_billing={self.calendar_billing!s}, ' - f'include_trial={self.include_trial!s}, ' - f'preserve_balance={self.preserve_balance!s}, ' - f'coupon_code={self.coupon_code!s}, ' - f'use_credits_and_prepayments={self.use_credits_and_prepayments!s}, ' - f'resume={self.resume!s}, ' + f'calendar_billing={(self.calendar_billing if hasattr(self, "calendar_billing") else None)!s}, ' + f'include_trial={(self.include_trial if hasattr(self, "include_trial") else None)!s}, ' + f'preserve_balance={(self.preserve_balance if hasattr(self, "preserve_balance") else None)!s}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!s}, ' + f'use_credits_and_prepayments={(self.use_credits_and_prepayments if hasattr(self, "use_credits_and_prepayments") else None)!s}, ' + f'resume={(self.resume if hasattr(self, "resume") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/reactivation_billing.py b/advancedbilling/models/reactivation_billing.py index b67a8e08..1e1d8ffb 100644 --- a/advancedbilling/models/reactivation_billing.py +++ b/advancedbilling/models/reactivation_billing.py @@ -100,10 +100,10 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'reactivation_charge={self.reactivation_charge!r}, ' + f'reactivation_charge={(self.reactivation_charge if hasattr(self, "reactivation_charge") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'reactivation_charge={self.reactivation_charge!s}, ' + f'reactivation_charge={(self.reactivation_charge if hasattr(self, "reactivation_charge") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/reason_code.py b/advancedbilling/models/reason_code.py index e828b6ae..159b60b7 100644 --- a/advancedbilling/models/reason_code.py +++ b/advancedbilling/models/reason_code.py @@ -119,22 +119,22 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'site_id={self.site_id!r}, ' - f'code={self.code!r}, ' - f'description={self.description!r}, ' - f'position={self.position!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!r}, ' + f'code={(self.code if hasattr(self, "code") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'position={(self.position if hasattr(self, "position") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'site_id={self.site_id!s}, ' - f'code={self.code!s}, ' - f'description={self.description!s}, ' - f'position={self.position!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!s}, ' + f'code={(self.code if hasattr(self, "code") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'position={(self.position if hasattr(self, "position") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/record_payment_response.py b/advancedbilling/models/record_payment_response.py index 507c6b73..70a8a8bd 100644 --- a/advancedbilling/models/record_payment_response.py +++ b/advancedbilling/models/record_payment_response.py @@ -94,12 +94,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'paid_invoices={self.paid_invoices!r}, ' - f'prepayment={self.prepayment!r}, ' + f'paid_invoices={(self.paid_invoices if hasattr(self, "paid_invoices") else None)!r}, ' + f'prepayment={(self.prepayment if hasattr(self, "prepayment") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'paid_invoices={self.paid_invoices!s}, ' - f'prepayment={self.prepayment!s}, ' + f'paid_invoices={(self.paid_invoices if hasattr(self, "paid_invoices") else None)!s}, ' + f'prepayment={(self.prepayment if hasattr(self, "prepayment") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/referral_code.py b/advancedbilling/models/referral_code.py index e4dcd7ad..b7ac269c 100644 --- a/advancedbilling/models/referral_code.py +++ b/advancedbilling/models/referral_code.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'site_id={self.site_id!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'code={self.code!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'code={(self.code if hasattr(self, "code") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'site_id={self.site_id!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'code={self.code!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'code={(self.code if hasattr(self, "code") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/referral_validation_response.py b/advancedbilling/models/referral_validation_response.py index a02ede93..1ec23874 100644 --- a/advancedbilling/models/referral_validation_response.py +++ b/advancedbilling/models/referral_validation_response.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'referral_code={self.referral_code!r}, ' + f'referral_code={(self.referral_code if hasattr(self, "referral_code") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'referral_code={self.referral_code!s}, ' + f'referral_code={(self.referral_code if hasattr(self, "referral_code") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/refund_consolidated_invoice.py b/advancedbilling/models/refund_consolidated_invoice.py index 2829c0e1..439f29ca 100644 --- a/advancedbilling/models/refund_consolidated_invoice.py +++ b/advancedbilling/models/refund_consolidated_invoice.py @@ -147,9 +147,9 @@ def __repr__(self): f'memo={self.memo!r}, ' f'payment_id={self.payment_id!r}, ' f'segment_uids={self.segment_uids!r}, ' - f'external={self.external!r}, ' - f'apply_credit={self.apply_credit!r}, ' - f'amount={self.amount!r}, ' + f'external={(self.external if hasattr(self, "external") else None)!r}, ' + f'apply_credit={(self.apply_credit if hasattr(self, "apply_credit") else None)!r}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): @@ -157,7 +157,7 @@ def __str__(self): f'memo={self.memo!s}, ' f'payment_id={self.payment_id!s}, ' f'segment_uids={self.segment_uids!s}, ' - f'external={self.external!s}, ' - f'apply_credit={self.apply_credit!s}, ' - f'amount={self.amount!s}, ' + f'external={(self.external if hasattr(self, "external") else None)!s}, ' + f'apply_credit={(self.apply_credit if hasattr(self, "apply_credit") else None)!s}, ' + f'amount={(self.amount if hasattr(self, "amount") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/refund_invoice.py b/advancedbilling/models/refund_invoice.py index 15944159..9232ec7b 100644 --- a/advancedbilling/models/refund_invoice.py +++ b/advancedbilling/models/refund_invoice.py @@ -148,9 +148,9 @@ def __repr__(self): f'amount={self.amount!r}, ' f'memo={self.memo!r}, ' f'payment_id={self.payment_id!r}, ' - f'external={self.external!r}, ' - f'apply_credit={self.apply_credit!r}, ' - f'void_invoice={self.void_invoice!r}, ' + f'external={(self.external if hasattr(self, "external") else None)!r}, ' + f'apply_credit={(self.apply_credit if hasattr(self, "apply_credit") else None)!r}, ' + f'void_invoice={(self.void_invoice if hasattr(self, "void_invoice") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): @@ -158,7 +158,7 @@ def __str__(self): f'amount={self.amount!s}, ' f'memo={self.memo!s}, ' f'payment_id={self.payment_id!s}, ' - f'external={self.external!s}, ' - f'apply_credit={self.apply_credit!s}, ' - f'void_invoice={self.void_invoice!s}, ' + f'external={(self.external if hasattr(self, "external") else None)!s}, ' + f'apply_credit={(self.apply_credit if hasattr(self, "apply_credit") else None)!s}, ' + f'void_invoice={(self.void_invoice if hasattr(self, "void_invoice") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/refund_invoice_event_data.py b/advancedbilling/models/refund_invoice_event_data.py index adab5580..f8d78f2c 100644 --- a/advancedbilling/models/refund_invoice_event_data.py +++ b/advancedbilling/models/refund_invoice_event_data.py @@ -186,10 +186,10 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' f'apply_credit={self.apply_credit!r}, ' - f'consolidation_level={self.consolidation_level!r}, ' + f'consolidation_level={(self.consolidation_level if hasattr(self, "consolidation_level") else None)!r}, ' f'credit_note_attributes={self.credit_note_attributes!r}, ' - f'memo={self.memo!r}, ' - f'original_amount={self.original_amount!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!r}, ' f'payment_id={self.payment_id!r}, ' f'refund_amount={self.refund_amount!r}, ' f'refund_id={self.refund_id!r}, ' @@ -199,10 +199,10 @@ def __repr__(self): def __str__(self): return (f'{self.__class__.__name__}(' f'apply_credit={self.apply_credit!s}, ' - f'consolidation_level={self.consolidation_level!s}, ' + f'consolidation_level={(self.consolidation_level if hasattr(self, "consolidation_level") else None)!s}, ' f'credit_note_attributes={self.credit_note_attributes!s}, ' - f'memo={self.memo!s}, ' - f'original_amount={self.original_amount!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!s}, ' f'payment_id={self.payment_id!s}, ' f'refund_amount={self.refund_amount!s}, ' f'refund_id={self.refund_id!s}, ' diff --git a/advancedbilling/models/refund_prepayment.py b/advancedbilling/models/refund_prepayment.py index 5730403e..50432758 100644 --- a/advancedbilling/models/refund_prepayment.py +++ b/advancedbilling/models/refund_prepayment.py @@ -135,7 +135,7 @@ def __repr__(self): f'amount_in_cents={self.amount_in_cents!r}, ' f'amount={self.amount!r}, ' f'memo={self.memo!r}, ' - f'external={self.external!r}, ' + f'external={(self.external if hasattr(self, "external") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): @@ -143,5 +143,5 @@ def __str__(self): f'amount_in_cents={self.amount_in_cents!s}, ' f'amount={self.amount!s}, ' f'memo={self.memo!s}, ' - f'external={self.external!s}, ' + f'external={(self.external if hasattr(self, "external") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/refund_prepayment_base_refund_error.py b/advancedbilling/models/refund_prepayment_base_refund_error.py index 7a783424..b2a6ad12 100644 --- a/advancedbilling/models/refund_prepayment_base_refund_error.py +++ b/advancedbilling/models/refund_prepayment_base_refund_error.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'refund={self.refund!r}, ' + f'refund={(self.refund if hasattr(self, "refund") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'refund={self.refund!s}, ' + f'refund={(self.refund if hasattr(self, "refund") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/remove_payment_event_data.py b/advancedbilling/models/remove_payment_event_data.py index 97798768..ce356fbb 100644 --- a/advancedbilling/models/remove_payment_event_data.py +++ b/advancedbilling/models/remove_payment_event_data.py @@ -161,7 +161,7 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'transaction_id={self.transaction_id!r}, ' f'memo={self.memo!r}, ' - f'original_amount={self.original_amount!r}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!r}, ' f'applied_amount={self.applied_amount!r}, ' f'transaction_time={self.transaction_time!r}, ' f'payment_method={self.payment_method!r}, ' @@ -172,7 +172,7 @@ def __str__(self): return (f'{self.__class__.__name__}(' f'transaction_id={self.transaction_id!s}, ' f'memo={self.memo!s}, ' - f'original_amount={self.original_amount!s}, ' + f'original_amount={(self.original_amount if hasattr(self, "original_amount") else None)!s}, ' f'applied_amount={self.applied_amount!s}, ' f'transaction_time={self.transaction_time!s}, ' f'payment_method={self.payment_method!s}, ' diff --git a/advancedbilling/models/renewal_preview.py b/advancedbilling/models/renewal_preview.py index 81dac6e8..caeb7642 100644 --- a/advancedbilling/models/renewal_preview.py +++ b/advancedbilling/models/renewal_preview.py @@ -153,26 +153,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'next_assessment_at={self.next_assessment_at!r}, ' - f'subtotal_in_cents={self.subtotal_in_cents!r}, ' - f'total_tax_in_cents={self.total_tax_in_cents!r}, ' - f'total_discount_in_cents={self.total_discount_in_cents!r}, ' - f'total_in_cents={self.total_in_cents!r}, ' - f'existing_balance_in_cents={self.existing_balance_in_cents!r}, ' - f'total_amount_due_in_cents={self.total_amount_due_in_cents!r}, ' - f'uncalculated_taxes={self.uncalculated_taxes!r}, ' - f'line_items={self.line_items!r}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!r}, ' + f'subtotal_in_cents={(self.subtotal_in_cents if hasattr(self, "subtotal_in_cents") else None)!r}, ' + f'total_tax_in_cents={(self.total_tax_in_cents if hasattr(self, "total_tax_in_cents") else None)!r}, ' + f'total_discount_in_cents={(self.total_discount_in_cents if hasattr(self, "total_discount_in_cents") else None)!r}, ' + f'total_in_cents={(self.total_in_cents if hasattr(self, "total_in_cents") else None)!r}, ' + f'existing_balance_in_cents={(self.existing_balance_in_cents if hasattr(self, "existing_balance_in_cents") else None)!r}, ' + f'total_amount_due_in_cents={(self.total_amount_due_in_cents if hasattr(self, "total_amount_due_in_cents") else None)!r}, ' + f'uncalculated_taxes={(self.uncalculated_taxes if hasattr(self, "uncalculated_taxes") else None)!r}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'next_assessment_at={self.next_assessment_at!s}, ' - f'subtotal_in_cents={self.subtotal_in_cents!s}, ' - f'total_tax_in_cents={self.total_tax_in_cents!s}, ' - f'total_discount_in_cents={self.total_discount_in_cents!s}, ' - f'total_in_cents={self.total_in_cents!s}, ' - f'existing_balance_in_cents={self.existing_balance_in_cents!s}, ' - f'total_amount_due_in_cents={self.total_amount_due_in_cents!s}, ' - f'uncalculated_taxes={self.uncalculated_taxes!s}, ' - f'line_items={self.line_items!s}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!s}, ' + f'subtotal_in_cents={(self.subtotal_in_cents if hasattr(self, "subtotal_in_cents") else None)!s}, ' + f'total_tax_in_cents={(self.total_tax_in_cents if hasattr(self, "total_tax_in_cents") else None)!s}, ' + f'total_discount_in_cents={(self.total_discount_in_cents if hasattr(self, "total_discount_in_cents") else None)!s}, ' + f'total_in_cents={(self.total_in_cents if hasattr(self, "total_in_cents") else None)!s}, ' + f'existing_balance_in_cents={(self.existing_balance_in_cents if hasattr(self, "existing_balance_in_cents") else None)!s}, ' + f'total_amount_due_in_cents={(self.total_amount_due_in_cents if hasattr(self, "total_amount_due_in_cents") else None)!s}, ' + f'uncalculated_taxes={(self.uncalculated_taxes if hasattr(self, "uncalculated_taxes") else None)!s}, ' + f'line_items={(self.line_items if hasattr(self, "line_items") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/renewal_preview_component.py b/advancedbilling/models/renewal_preview_component.py index 68de8579..49759b67 100644 --- a/advancedbilling/models/renewal_preview_component.py +++ b/advancedbilling/models/renewal_preview_component.py @@ -97,14 +97,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'quantity={self.quantity!r}, ' - f'price_point_id={self.price_point_id!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'quantity={self.quantity!s}, ' - f'price_point_id={self.price_point_id!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/renewal_preview_line_item.py b/advancedbilling/models/renewal_preview_line_item.py index f4498a0c..b518d7bd 100644 --- a/advancedbilling/models/renewal_preview_line_item.py +++ b/advancedbilling/models/renewal_preview_line_item.py @@ -176,36 +176,36 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'transaction_type={self.transaction_type!r}, ' - f'kind={self.kind!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'memo={self.memo!r}, ' - f'discount_amount_in_cents={self.discount_amount_in_cents!r}, ' - f'taxable_amount_in_cents={self.taxable_amount_in_cents!r}, ' - f'product_id={self.product_id!r}, ' - f'product_name={self.product_name!r}, ' - f'component_id={self.component_id!r}, ' - f'component_handle={self.component_handle!r}, ' - f'component_name={self.component_name!r}, ' - f'product_handle={self.product_handle!r}, ' - f'period_range_start={self.period_range_start!r}, ' - f'period_range_end={self.period_range_end!r}, ' + f'transaction_type={(self.transaction_type if hasattr(self, "transaction_type") else None)!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'discount_amount_in_cents={(self.discount_amount_in_cents if hasattr(self, "discount_amount_in_cents") else None)!r}, ' + f'taxable_amount_in_cents={(self.taxable_amount_in_cents if hasattr(self, "taxable_amount_in_cents") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!r}, ' + f'component_name={(self.component_name if hasattr(self, "component_name") else None)!r}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!r}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!r}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'transaction_type={self.transaction_type!s}, ' - f'kind={self.kind!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'memo={self.memo!s}, ' - f'discount_amount_in_cents={self.discount_amount_in_cents!s}, ' - f'taxable_amount_in_cents={self.taxable_amount_in_cents!s}, ' - f'product_id={self.product_id!s}, ' - f'product_name={self.product_name!s}, ' - f'component_id={self.component_id!s}, ' - f'component_handle={self.component_handle!s}, ' - f'component_name={self.component_name!s}, ' - f'product_handle={self.product_handle!s}, ' - f'period_range_start={self.period_range_start!s}, ' - f'period_range_end={self.period_range_end!s}, ' + f'transaction_type={(self.transaction_type if hasattr(self, "transaction_type") else None)!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'discount_amount_in_cents={(self.discount_amount_in_cents if hasattr(self, "discount_amount_in_cents") else None)!s}, ' + f'taxable_amount_in_cents={(self.taxable_amount_in_cents if hasattr(self, "taxable_amount_in_cents") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_name={(self.product_name if hasattr(self, "product_name") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!s}, ' + f'component_name={(self.component_name if hasattr(self, "component_name") else None)!s}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!s}, ' + f'period_range_start={(self.period_range_start if hasattr(self, "period_range_start") else None)!s}, ' + f'period_range_end={(self.period_range_end if hasattr(self, "period_range_end") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/renewal_preview_request.py b/advancedbilling/models/renewal_preview_request.py index 89f76c06..42147fcd 100644 --- a/advancedbilling/models/renewal_preview_request.py +++ b/advancedbilling/models/renewal_preview_request.py @@ -81,10 +81,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'components={self.components!r}, ' + f'components={(self.components if hasattr(self, "components") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'components={self.components!s}, ' + f'components={(self.components if hasattr(self, "components") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/replay_webhooks_response.py b/advancedbilling/models/replay_webhooks_response.py index 3c44c63a..b870a1fe 100644 --- a/advancedbilling/models/replay_webhooks_response.py +++ b/advancedbilling/models/replay_webhooks_response.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'status={self.status!r}, ' + f'status={(self.status if hasattr(self, "status") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'status={self.status!s}, ' + f'status={(self.status if hasattr(self, "status") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/resent_invitation.py b/advancedbilling/models/resent_invitation.py index 0f795ab1..ef251642 100644 --- a/advancedbilling/models/resent_invitation.py +++ b/advancedbilling/models/resent_invitation.py @@ -112,20 +112,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'last_sent_at={self.last_sent_at!r}, ' - f'last_accepted_at={self.last_accepted_at!r}, ' - f'send_invite_link_text={self.send_invite_link_text!r}, ' - f'uninvited_count={self.uninvited_count!r}, ' - f'last_invite_sent_at={self.last_invite_sent_at!r}, ' - f'last_invite_accepted_at={self.last_invite_accepted_at!r}, ' + f'last_sent_at={(self.last_sent_at if hasattr(self, "last_sent_at") else None)!r}, ' + f'last_accepted_at={(self.last_accepted_at if hasattr(self, "last_accepted_at") else None)!r}, ' + f'send_invite_link_text={(self.send_invite_link_text if hasattr(self, "send_invite_link_text") else None)!r}, ' + f'uninvited_count={(self.uninvited_count if hasattr(self, "uninvited_count") else None)!r}, ' + f'last_invite_sent_at={(self.last_invite_sent_at if hasattr(self, "last_invite_sent_at") else None)!r}, ' + f'last_invite_accepted_at={(self.last_invite_accepted_at if hasattr(self, "last_invite_accepted_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'last_sent_at={self.last_sent_at!s}, ' - f'last_accepted_at={self.last_accepted_at!s}, ' - f'send_invite_link_text={self.send_invite_link_text!s}, ' - f'uninvited_count={self.uninvited_count!s}, ' - f'last_invite_sent_at={self.last_invite_sent_at!s}, ' - f'last_invite_accepted_at={self.last_invite_accepted_at!s}, ' + f'last_sent_at={(self.last_sent_at if hasattr(self, "last_sent_at") else None)!s}, ' + f'last_accepted_at={(self.last_accepted_at if hasattr(self, "last_accepted_at") else None)!s}, ' + f'send_invite_link_text={(self.send_invite_link_text if hasattr(self, "send_invite_link_text") else None)!s}, ' + f'uninvited_count={(self.uninvited_count if hasattr(self, "uninvited_count") else None)!s}, ' + f'last_invite_sent_at={(self.last_invite_sent_at if hasattr(self, "last_invite_sent_at") else None)!s}, ' + f'last_invite_accepted_at={(self.last_invite_accepted_at if hasattr(self, "last_invite_accepted_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/resume_options.py b/advancedbilling/models/resume_options.py index 0059f460..96313adb 100644 --- a/advancedbilling/models/resume_options.py +++ b/advancedbilling/models/resume_options.py @@ -106,12 +106,12 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'require_resume={self.require_resume!r}, ' - f'forgive_balance={self.forgive_balance!r}, ' + f'require_resume={(self.require_resume if hasattr(self, "require_resume") else None)!r}, ' + f'forgive_balance={(self.forgive_balance if hasattr(self, "forgive_balance") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'require_resume={self.require_resume!s}, ' - f'forgive_balance={self.forgive_balance!s}, ' + f'require_resume={(self.require_resume if hasattr(self, "require_resume") else None)!s}, ' + f'forgive_balance={(self.forgive_balance if hasattr(self, "forgive_balance") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/revoked_invitation.py b/advancedbilling/models/revoked_invitation.py index 6b32a719..0d3cdb12 100644 --- a/advancedbilling/models/revoked_invitation.py +++ b/advancedbilling/models/revoked_invitation.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'last_sent_at={self.last_sent_at!r}, ' - f'last_accepted_at={self.last_accepted_at!r}, ' - f'uninvited_count={self.uninvited_count!r}, ' + f'last_sent_at={(self.last_sent_at if hasattr(self, "last_sent_at") else None)!r}, ' + f'last_accepted_at={(self.last_accepted_at if hasattr(self, "last_accepted_at") else None)!r}, ' + f'uninvited_count={(self.uninvited_count if hasattr(self, "uninvited_count") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'last_sent_at={self.last_sent_at!s}, ' - f'last_accepted_at={self.last_accepted_at!s}, ' - f'uninvited_count={self.uninvited_count!s}, ' + f'last_sent_at={(self.last_sent_at if hasattr(self, "last_sent_at") else None)!s}, ' + f'last_accepted_at={(self.last_accepted_at if hasattr(self, "last_accepted_at") else None)!s}, ' + f'uninvited_count={(self.uninvited_count if hasattr(self, "uninvited_count") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/sale_rep.py b/advancedbilling/models/sale_rep.py index 489c1216..b751a675 100644 --- a/advancedbilling/models/sale_rep.py +++ b/advancedbilling/models/sale_rep.py @@ -109,18 +109,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'full_name={self.full_name!r}, ' - f'subscriptions_count={self.subscriptions_count!r}, ' - f'test_mode={self.test_mode!r}, ' - f'subscriptions={self.subscriptions!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'full_name={(self.full_name if hasattr(self, "full_name") else None)!r}, ' + f'subscriptions_count={(self.subscriptions_count if hasattr(self, "subscriptions_count") else None)!r}, ' + f'test_mode={(self.test_mode if hasattr(self, "test_mode") else None)!r}, ' + f'subscriptions={(self.subscriptions if hasattr(self, "subscriptions") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'full_name={self.full_name!s}, ' - f'subscriptions_count={self.subscriptions_count!s}, ' - f'test_mode={self.test_mode!s}, ' - f'subscriptions={self.subscriptions!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'full_name={(self.full_name if hasattr(self, "full_name") else None)!s}, ' + f'subscriptions_count={(self.subscriptions_count if hasattr(self, "subscriptions_count") else None)!s}, ' + f'test_mode={(self.test_mode if hasattr(self, "test_mode") else None)!s}, ' + f'subscriptions={(self.subscriptions if hasattr(self, "subscriptions") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/sale_rep_item_mrr.py b/advancedbilling/models/sale_rep_item_mrr.py index 601dd230..d37057e2 100644 --- a/advancedbilling/models/sale_rep_item_mrr.py +++ b/advancedbilling/models/sale_rep_item_mrr.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'mrr={self.mrr!r}, ' - f'usage={self.usage!r}, ' - f'recurring={self.recurring!r}, ' + f'mrr={(self.mrr if hasattr(self, "mrr") else None)!r}, ' + f'usage={(self.usage if hasattr(self, "usage") else None)!r}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'mrr={self.mrr!s}, ' - f'usage={self.usage!s}, ' - f'recurring={self.recurring!s}, ' + f'mrr={(self.mrr if hasattr(self, "mrr") else None)!s}, ' + f'usage={(self.usage if hasattr(self, "usage") else None)!s}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/sale_rep_settings.py b/advancedbilling/models/sale_rep_settings.py index 38b9e765..3af0a845 100644 --- a/advancedbilling/models/sale_rep_settings.py +++ b/advancedbilling/models/sale_rep_settings.py @@ -119,22 +119,22 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'customer_name={self.customer_name!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'site_link={self.site_link!r}, ' - f'site_name={self.site_name!r}, ' - f'subscription_mrr={self.subscription_mrr!r}, ' - f'sales_rep_id={self.sales_rep_id!r}, ' - f'sales_rep_name={self.sales_rep_name!r}, ' + f'customer_name={(self.customer_name if hasattr(self, "customer_name") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'site_link={(self.site_link if hasattr(self, "site_link") else None)!r}, ' + f'site_name={(self.site_name if hasattr(self, "site_name") else None)!r}, ' + f'subscription_mrr={(self.subscription_mrr if hasattr(self, "subscription_mrr") else None)!r}, ' + f'sales_rep_id={(self.sales_rep_id if hasattr(self, "sales_rep_id") else None)!r}, ' + f'sales_rep_name={(self.sales_rep_name if hasattr(self, "sales_rep_name") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'customer_name={self.customer_name!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'site_link={self.site_link!s}, ' - f'site_name={self.site_name!s}, ' - f'subscription_mrr={self.subscription_mrr!s}, ' - f'sales_rep_id={self.sales_rep_id!s}, ' - f'sales_rep_name={self.sales_rep_name!s}, ' + f'customer_name={(self.customer_name if hasattr(self, "customer_name") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'site_link={(self.site_link if hasattr(self, "site_link") else None)!s}, ' + f'site_name={(self.site_name if hasattr(self, "site_name") else None)!s}, ' + f'subscription_mrr={(self.subscription_mrr if hasattr(self, "subscription_mrr") else None)!s}, ' + f'sales_rep_id={(self.sales_rep_id if hasattr(self, "sales_rep_id") else None)!s}, ' + f'sales_rep_name={(self.sales_rep_name if hasattr(self, "sales_rep_name") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/sale_rep_subscription.py b/advancedbilling/models/sale_rep_subscription.py index c0f45bcb..e4ef2522 100644 --- a/advancedbilling/models/sale_rep_subscription.py +++ b/advancedbilling/models/sale_rep_subscription.py @@ -147,28 +147,28 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'site_name={self.site_name!r}, ' - f'subscription_url={self.subscription_url!r}, ' - f'customer_name={self.customer_name!r}, ' - f'created_at={self.created_at!r}, ' - f'mrr={self.mrr!r}, ' - f'usage={self.usage!r}, ' - f'recurring={self.recurring!r}, ' - f'last_payment={self.last_payment!r}, ' - f'churn_date={self.churn_date!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'site_name={(self.site_name if hasattr(self, "site_name") else None)!r}, ' + f'subscription_url={(self.subscription_url if hasattr(self, "subscription_url") else None)!r}, ' + f'customer_name={(self.customer_name if hasattr(self, "customer_name") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'mrr={(self.mrr if hasattr(self, "mrr") else None)!r}, ' + f'usage={(self.usage if hasattr(self, "usage") else None)!r}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!r}, ' + f'last_payment={(self.last_payment if hasattr(self, "last_payment") else None)!r}, ' + f'churn_date={(self.churn_date if hasattr(self, "churn_date") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'site_name={self.site_name!s}, ' - f'subscription_url={self.subscription_url!s}, ' - f'customer_name={self.customer_name!s}, ' - f'created_at={self.created_at!s}, ' - f'mrr={self.mrr!s}, ' - f'usage={self.usage!s}, ' - f'recurring={self.recurring!s}, ' - f'last_payment={self.last_payment!s}, ' - f'churn_date={self.churn_date!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'site_name={(self.site_name if hasattr(self, "site_name") else None)!s}, ' + f'subscription_url={(self.subscription_url if hasattr(self, "subscription_url") else None)!s}, ' + f'customer_name={(self.customer_name if hasattr(self, "customer_name") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'mrr={(self.mrr if hasattr(self, "mrr") else None)!s}, ' + f'usage={(self.usage if hasattr(self, "usage") else None)!s}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!s}, ' + f'last_payment={(self.last_payment if hasattr(self, "last_payment") else None)!s}, ' + f'churn_date={(self.churn_date if hasattr(self, "churn_date") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/segment.py b/advancedbilling/models/segment.py index d4a52a82..01d2e753 100644 --- a/advancedbilling/models/segment.py +++ b/advancedbilling/models/segment.py @@ -173,32 +173,32 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'component_id={self.component_id!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'event_based_billing_metric_id={self.event_based_billing_metric_id!r}, ' - f'pricing_scheme={self.pricing_scheme!r}, ' - f'segment_property_1_value={self.segment_property_1_value!r}, ' - f'segment_property_2_value={self.segment_property_2_value!r}, ' - f'segment_property_3_value={self.segment_property_3_value!r}, ' - f'segment_property_4_value={self.segment_property_4_value!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'prices={self.prices!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'event_based_billing_metric_id={(self.event_based_billing_metric_id if hasattr(self, "event_based_billing_metric_id") else None)!r}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!r}, ' + f'segment_property_1_value={(self.segment_property_1_value if hasattr(self, "segment_property_1_value") else None)!r}, ' + f'segment_property_2_value={(self.segment_property_2_value if hasattr(self, "segment_property_2_value") else None)!r}, ' + f'segment_property_3_value={(self.segment_property_3_value if hasattr(self, "segment_property_3_value") else None)!r}, ' + f'segment_property_4_value={(self.segment_property_4_value if hasattr(self, "segment_property_4_value") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'component_id={self.component_id!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'event_based_billing_metric_id={self.event_based_billing_metric_id!s}, ' - f'pricing_scheme={self.pricing_scheme!s}, ' - f'segment_property_1_value={self.segment_property_1_value!s}, ' - f'segment_property_2_value={self.segment_property_2_value!s}, ' - f'segment_property_3_value={self.segment_property_3_value!s}, ' - f'segment_property_4_value={self.segment_property_4_value!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'prices={self.prices!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'event_based_billing_metric_id={(self.event_based_billing_metric_id if hasattr(self, "event_based_billing_metric_id") else None)!s}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!s}, ' + f'segment_property_1_value={(self.segment_property_1_value if hasattr(self, "segment_property_1_value") else None)!s}, ' + f'segment_property_2_value={(self.segment_property_2_value if hasattr(self, "segment_property_2_value") else None)!s}, ' + f'segment_property_3_value={(self.segment_property_3_value if hasattr(self, "segment_property_3_value") else None)!s}, ' + f'segment_property_4_value={(self.segment_property_4_value if hasattr(self, "segment_property_4_value") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/segment_price.py b/advancedbilling/models/segment_price.py index 1ef0cb36..dcc6920a 100644 --- a/advancedbilling/models/segment_price.py +++ b/advancedbilling/models/segment_price.py @@ -153,24 +153,24 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'component_id={self.component_id!r}, ' - f'starting_quantity={self.starting_quantity!r}, ' - f'ending_quantity={self.ending_quantity!r}, ' - f'unit_price={self.unit_price!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'formatted_unit_price={self.formatted_unit_price!r}, ' - f'segment_id={self.segment_id!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!r}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'formatted_unit_price={(self.formatted_unit_price if hasattr(self, "formatted_unit_price") else None)!r}, ' + f'segment_id={(self.segment_id if hasattr(self, "segment_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'component_id={self.component_id!s}, ' - f'starting_quantity={self.starting_quantity!s}, ' - f'ending_quantity={self.ending_quantity!s}, ' - f'unit_price={self.unit_price!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'formatted_unit_price={self.formatted_unit_price!s}, ' - f'segment_id={self.segment_id!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!s}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'formatted_unit_price={(self.formatted_unit_price if hasattr(self, "formatted_unit_price") else None)!s}, ' + f'segment_id={(self.segment_id if hasattr(self, "segment_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/segment_response.py b/advancedbilling/models/segment_response.py index cc8aeda6..542b0dda 100644 --- a/advancedbilling/models/segment_response.py +++ b/advancedbilling/models/segment_response.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'segment={self.segment!r}, ' + f'segment={(self.segment if hasattr(self, "segment") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'segment={self.segment!s}, ' + f'segment={(self.segment if hasattr(self, "segment") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/send_invoice_request.py b/advancedbilling/models/send_invoice_request.py index 0806f7de..b2142b22 100644 --- a/advancedbilling/models/send_invoice_request.py +++ b/advancedbilling/models/send_invoice_request.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'recipient_emails={self.recipient_emails!r}, ' - f'cc_recipient_emails={self.cc_recipient_emails!r}, ' - f'bcc_recipient_emails={self.bcc_recipient_emails!r}, ' + f'recipient_emails={(self.recipient_emails if hasattr(self, "recipient_emails") else None)!r}, ' + f'cc_recipient_emails={(self.cc_recipient_emails if hasattr(self, "cc_recipient_emails") else None)!r}, ' + f'bcc_recipient_emails={(self.bcc_recipient_emails if hasattr(self, "bcc_recipient_emails") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'recipient_emails={self.recipient_emails!s}, ' - f'cc_recipient_emails={self.cc_recipient_emails!s}, ' - f'bcc_recipient_emails={self.bcc_recipient_emails!s}, ' + f'recipient_emails={(self.recipient_emails if hasattr(self, "recipient_emails") else None)!s}, ' + f'cc_recipient_emails={(self.cc_recipient_emails if hasattr(self, "cc_recipient_emails") else None)!s}, ' + f'bcc_recipient_emails={(self.bcc_recipient_emails if hasattr(self, "bcc_recipient_emails") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/service_credit.py b/advancedbilling/models/service_credit.py index 8d86af4e..40fae2d4 100644 --- a/advancedbilling/models/service_credit.py +++ b/advancedbilling/models/service_credit.py @@ -103,18 +103,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'ending_balance_in_cents={self.ending_balance_in_cents!r}, ' - f'entry_type={self.entry_type!r}, ' - f'memo={self.memo!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!r}, ' + f'entry_type={(self.entry_type if hasattr(self, "entry_type") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'ending_balance_in_cents={self.ending_balance_in_cents!s}, ' - f'entry_type={self.entry_type!s}, ' - f'memo={self.memo!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!s}, ' + f'entry_type={(self.entry_type if hasattr(self, "entry_type") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/service_credit_1.py b/advancedbilling/models/service_credit_1.py new file mode 100644 index 00000000..bcdce1db --- /dev/null +++ b/advancedbilling/models/service_credit_1.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- + +""" +advanced_billing + +This file was automatically generated for Maxio by APIMATIC v3.0 ( + https://www.apimatic.io ). +""" +from advancedbilling.api_helper import APIHelper + + +class ServiceCredit1(object): + + """Implementation of the 'Service Credit1' model. + + Attributes: + id (int): The model property of type int. + amount_in_cents (int): The amount in cents of the entry + ending_balance_in_cents (int): The new balance for the credit account + entry_type (ServiceCreditType): The type of entry + memo (str): The memo attached to the entry + invoice_uid (str): The invoice uid associated with the entry. Only + present for debit entries + remaining_balance_in_cents (int): The remaining balance for the entry + created_at (datetime): The date and time the entry was created + additional_properties (Dict[str, object]): The additional properties + for the model. + + """ + + # Create a mapping from Model property names to API property names + _names = { + "id": 'id', + "amount_in_cents": 'amount_in_cents', + "ending_balance_in_cents": 'ending_balance_in_cents', + "entry_type": 'entry_type', + "memo": 'memo', + "invoice_uid": 'invoice_uid', + "remaining_balance_in_cents": 'remaining_balance_in_cents', + "created_at": 'created_at' + } + + _optionals = [ + 'id', + 'amount_in_cents', + 'ending_balance_in_cents', + 'entry_type', + 'memo', + 'invoice_uid', + 'remaining_balance_in_cents', + 'created_at', + ] + + _nullables = [ + 'invoice_uid', + ] + + def __init__(self, + id=APIHelper.SKIP, + amount_in_cents=APIHelper.SKIP, + ending_balance_in_cents=APIHelper.SKIP, + entry_type=APIHelper.SKIP, + memo=APIHelper.SKIP, + invoice_uid=APIHelper.SKIP, + remaining_balance_in_cents=APIHelper.SKIP, + created_at=APIHelper.SKIP, + additional_properties=None): + """Constructor for the ServiceCredit1 class""" + + # Initialize members of the class + if id is not APIHelper.SKIP: + self.id = id + if amount_in_cents is not APIHelper.SKIP: + self.amount_in_cents = amount_in_cents + if ending_balance_in_cents is not APIHelper.SKIP: + self.ending_balance_in_cents = ending_balance_in_cents + if entry_type is not APIHelper.SKIP: + self.entry_type = entry_type + if memo is not APIHelper.SKIP: + self.memo = memo + if invoice_uid is not APIHelper.SKIP: + self.invoice_uid = invoice_uid + if remaining_balance_in_cents is not APIHelper.SKIP: + self.remaining_balance_in_cents = remaining_balance_in_cents + if created_at is not APIHelper.SKIP: + self.created_at = APIHelper.apply_datetime_converter(created_at, APIHelper.RFC3339DateTime) if created_at else None + + # Add additional model properties to the instance + if additional_properties is None: + additional_properties = {} + self.additional_properties = additional_properties + + @classmethod + def from_dictionary(cls, + dictionary): + """Creates an instance of this model from a dictionary + + Args: + dictionary (dictionary): A dictionary representation of the object + as obtained from the deserialization of the server's response. The + keys MUST match property names in the API description. + + Returns: + object: An instance of this structure class. + + """ + + if not isinstance(dictionary, dict) or dictionary is None: + return None + + # Extract variables from the dictionary + id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP + amount_in_cents = dictionary.get("amount_in_cents") if dictionary.get("amount_in_cents") else APIHelper.SKIP + ending_balance_in_cents = dictionary.get("ending_balance_in_cents") if dictionary.get("ending_balance_in_cents") else APIHelper.SKIP + entry_type = dictionary.get("entry_type") if dictionary.get("entry_type") else APIHelper.SKIP + memo = dictionary.get("memo") if dictionary.get("memo") else APIHelper.SKIP + invoice_uid = dictionary.get("invoice_uid") if "invoice_uid" in dictionary.keys() else APIHelper.SKIP + remaining_balance_in_cents = dictionary.get("remaining_balance_in_cents") if dictionary.get("remaining_balance_in_cents") else APIHelper.SKIP + created_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("created_at")).datetime if dictionary.get("created_at") else APIHelper.SKIP + # Clean out expected properties from dictionary + additional_properties = {k: v for k, v in dictionary.items() if k not in cls._names.values()} + # Return an object of this model + return cls(id, + amount_in_cents, + ending_balance_in_cents, + entry_type, + memo, + invoice_uid, + remaining_balance_in_cents, + created_at, + additional_properties) + + def __repr__(self): + return (f'{self.__class__.__name__}(' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!r}, ' + f'entry_type={(self.entry_type if hasattr(self, "entry_type") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'invoice_uid={(self.invoice_uid if hasattr(self, "invoice_uid") else None)!r}, ' + f'remaining_balance_in_cents={(self.remaining_balance_in_cents if hasattr(self, "remaining_balance_in_cents") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'additional_properties={self.additional_properties!r})') + + def __str__(self): + return (f'{self.__class__.__name__}(' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!s}, ' + f'entry_type={(self.entry_type if hasattr(self, "entry_type") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'invoice_uid={(self.invoice_uid if hasattr(self, "invoice_uid") else None)!s}, ' + f'remaining_balance_in_cents={(self.remaining_balance_in_cents if hasattr(self, "remaining_balance_in_cents") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/signup_proforma_preview.py b/advancedbilling/models/signup_proforma_preview.py index 7904ea32..f364a4c7 100644 --- a/advancedbilling/models/signup_proforma_preview.py +++ b/advancedbilling/models/signup_proforma_preview.py @@ -82,12 +82,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'current_proforma_invoice={self.current_proforma_invoice!r}, ' - f'next_proforma_invoice={self.next_proforma_invoice!r}, ' + f'current_proforma_invoice={(self.current_proforma_invoice if hasattr(self, "current_proforma_invoice") else None)!r}, ' + f'next_proforma_invoice={(self.next_proforma_invoice if hasattr(self, "next_proforma_invoice") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'current_proforma_invoice={self.current_proforma_invoice!s}, ' - f'next_proforma_invoice={self.next_proforma_invoice!s}, ' + f'current_proforma_invoice={(self.current_proforma_invoice if hasattr(self, "current_proforma_invoice") else None)!s}, ' + f'next_proforma_invoice={(self.next_proforma_invoice if hasattr(self, "next_proforma_invoice") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/site.py b/advancedbilling/models/site.py index 73ab58f5..6a3c97e4 100644 --- a/advancedbilling/models/site.py +++ b/advancedbilling/models/site.py @@ -209,42 +209,42 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'name={self.name!r}, ' - f'subdomain={self.subdomain!r}, ' - f'currency={self.currency!r}, ' - f'seller_id={self.seller_id!r}, ' - f'non_primary_currencies={self.non_primary_currencies!r}, ' - f'relationship_invoicing_enabled={self.relationship_invoicing_enabled!r}, ' - f'schedule_subscription_cancellation_enabled={self.schedule_subscription_cancellation_enabled!r}, ' - f'customer_hierarchy_enabled={self.customer_hierarchy_enabled!r}, ' - f'whopays_enabled={self.whopays_enabled!r}, ' - f'whopays_default_payer={self.whopays_default_payer!r}, ' - f'allocation_settings={self.allocation_settings!r}, ' - f'default_payment_collection_method={self.default_payment_collection_method!r}, ' - f'organization_address={self.organization_address!r}, ' - f'tax_configuration={self.tax_configuration!r}, ' - f'net_terms={self.net_terms!r}, ' - f'test={self.test!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'subdomain={(self.subdomain if hasattr(self, "subdomain") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'seller_id={(self.seller_id if hasattr(self, "seller_id") else None)!r}, ' + f'non_primary_currencies={(self.non_primary_currencies if hasattr(self, "non_primary_currencies") else None)!r}, ' + f'relationship_invoicing_enabled={(self.relationship_invoicing_enabled if hasattr(self, "relationship_invoicing_enabled") else None)!r}, ' + f'schedule_subscription_cancellation_enabled={(self.schedule_subscription_cancellation_enabled if hasattr(self, "schedule_subscription_cancellation_enabled") else None)!r}, ' + f'customer_hierarchy_enabled={(self.customer_hierarchy_enabled if hasattr(self, "customer_hierarchy_enabled") else None)!r}, ' + f'whopays_enabled={(self.whopays_enabled if hasattr(self, "whopays_enabled") else None)!r}, ' + f'whopays_default_payer={(self.whopays_default_payer if hasattr(self, "whopays_default_payer") else None)!r}, ' + f'allocation_settings={(self.allocation_settings if hasattr(self, "allocation_settings") else None)!r}, ' + f'default_payment_collection_method={(self.default_payment_collection_method if hasattr(self, "default_payment_collection_method") else None)!r}, ' + f'organization_address={(self.organization_address if hasattr(self, "organization_address") else None)!r}, ' + f'tax_configuration={(self.tax_configuration if hasattr(self, "tax_configuration") else None)!r}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!r}, ' + f'test={(self.test if hasattr(self, "test") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'name={self.name!s}, ' - f'subdomain={self.subdomain!s}, ' - f'currency={self.currency!s}, ' - f'seller_id={self.seller_id!s}, ' - f'non_primary_currencies={self.non_primary_currencies!s}, ' - f'relationship_invoicing_enabled={self.relationship_invoicing_enabled!s}, ' - f'schedule_subscription_cancellation_enabled={self.schedule_subscription_cancellation_enabled!s}, ' - f'customer_hierarchy_enabled={self.customer_hierarchy_enabled!s}, ' - f'whopays_enabled={self.whopays_enabled!s}, ' - f'whopays_default_payer={self.whopays_default_payer!s}, ' - f'allocation_settings={self.allocation_settings!s}, ' - f'default_payment_collection_method={self.default_payment_collection_method!s}, ' - f'organization_address={self.organization_address!s}, ' - f'tax_configuration={self.tax_configuration!s}, ' - f'net_terms={self.net_terms!s}, ' - f'test={self.test!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'subdomain={(self.subdomain if hasattr(self, "subdomain") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'seller_id={(self.seller_id if hasattr(self, "seller_id") else None)!s}, ' + f'non_primary_currencies={(self.non_primary_currencies if hasattr(self, "non_primary_currencies") else None)!s}, ' + f'relationship_invoicing_enabled={(self.relationship_invoicing_enabled if hasattr(self, "relationship_invoicing_enabled") else None)!s}, ' + f'schedule_subscription_cancellation_enabled={(self.schedule_subscription_cancellation_enabled if hasattr(self, "schedule_subscription_cancellation_enabled") else None)!s}, ' + f'customer_hierarchy_enabled={(self.customer_hierarchy_enabled if hasattr(self, "customer_hierarchy_enabled") else None)!s}, ' + f'whopays_enabled={(self.whopays_enabled if hasattr(self, "whopays_enabled") else None)!s}, ' + f'whopays_default_payer={(self.whopays_default_payer if hasattr(self, "whopays_default_payer") else None)!s}, ' + f'allocation_settings={(self.allocation_settings if hasattr(self, "allocation_settings") else None)!s}, ' + f'default_payment_collection_method={(self.default_payment_collection_method if hasattr(self, "default_payment_collection_method") else None)!s}, ' + f'organization_address={(self.organization_address if hasattr(self, "organization_address") else None)!s}, ' + f'tax_configuration={(self.tax_configuration if hasattr(self, "tax_configuration") else None)!s}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!s}, ' + f'test={(self.test if hasattr(self, "test") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/site_statistics.py b/advancedbilling/models/site_statistics.py index 3305cd57..75e003ed 100644 --- a/advancedbilling/models/site_statistics.py +++ b/advancedbilling/models/site_statistics.py @@ -151,30 +151,30 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'total_subscriptions={self.total_subscriptions!r}, ' - f'subscriptions_today={self.subscriptions_today!r}, ' - f'total_revenue={self.total_revenue!r}, ' - f'revenue_today={self.revenue_today!r}, ' - f'revenue_this_month={self.revenue_this_month!r}, ' - f'revenue_this_year={self.revenue_this_year!r}, ' - f'total_canceled_subscriptions={self.total_canceled_subscriptions!r}, ' - f'total_active_subscriptions={self.total_active_subscriptions!r}, ' - f'total_past_due_subscriptions={self.total_past_due_subscriptions!r}, ' - f'total_unpaid_subscriptions={self.total_unpaid_subscriptions!r}, ' - f'total_dunning_subscriptions={self.total_dunning_subscriptions!r}, ' + f'total_subscriptions={(self.total_subscriptions if hasattr(self, "total_subscriptions") else None)!r}, ' + f'subscriptions_today={(self.subscriptions_today if hasattr(self, "subscriptions_today") else None)!r}, ' + f'total_revenue={(self.total_revenue if hasattr(self, "total_revenue") else None)!r}, ' + f'revenue_today={(self.revenue_today if hasattr(self, "revenue_today") else None)!r}, ' + f'revenue_this_month={(self.revenue_this_month if hasattr(self, "revenue_this_month") else None)!r}, ' + f'revenue_this_year={(self.revenue_this_year if hasattr(self, "revenue_this_year") else None)!r}, ' + f'total_canceled_subscriptions={(self.total_canceled_subscriptions if hasattr(self, "total_canceled_subscriptions") else None)!r}, ' + f'total_active_subscriptions={(self.total_active_subscriptions if hasattr(self, "total_active_subscriptions") else None)!r}, ' + f'total_past_due_subscriptions={(self.total_past_due_subscriptions if hasattr(self, "total_past_due_subscriptions") else None)!r}, ' + f'total_unpaid_subscriptions={(self.total_unpaid_subscriptions if hasattr(self, "total_unpaid_subscriptions") else None)!r}, ' + f'total_dunning_subscriptions={(self.total_dunning_subscriptions if hasattr(self, "total_dunning_subscriptions") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'total_subscriptions={self.total_subscriptions!s}, ' - f'subscriptions_today={self.subscriptions_today!s}, ' - f'total_revenue={self.total_revenue!s}, ' - f'revenue_today={self.revenue_today!s}, ' - f'revenue_this_month={self.revenue_this_month!s}, ' - f'revenue_this_year={self.revenue_this_year!s}, ' - f'total_canceled_subscriptions={self.total_canceled_subscriptions!s}, ' - f'total_active_subscriptions={self.total_active_subscriptions!s}, ' - f'total_past_due_subscriptions={self.total_past_due_subscriptions!s}, ' - f'total_unpaid_subscriptions={self.total_unpaid_subscriptions!s}, ' - f'total_dunning_subscriptions={self.total_dunning_subscriptions!s}, ' + f'total_subscriptions={(self.total_subscriptions if hasattr(self, "total_subscriptions") else None)!s}, ' + f'subscriptions_today={(self.subscriptions_today if hasattr(self, "subscriptions_today") else None)!s}, ' + f'total_revenue={(self.total_revenue if hasattr(self, "total_revenue") else None)!s}, ' + f'revenue_today={(self.revenue_today if hasattr(self, "revenue_today") else None)!s}, ' + f'revenue_this_month={(self.revenue_this_month if hasattr(self, "revenue_this_month") else None)!s}, ' + f'revenue_this_year={(self.revenue_this_year if hasattr(self, "revenue_this_year") else None)!s}, ' + f'total_canceled_subscriptions={(self.total_canceled_subscriptions if hasattr(self, "total_canceled_subscriptions") else None)!s}, ' + f'total_active_subscriptions={(self.total_active_subscriptions if hasattr(self, "total_active_subscriptions") else None)!s}, ' + f'total_past_due_subscriptions={(self.total_past_due_subscriptions if hasattr(self, "total_past_due_subscriptions") else None)!s}, ' + f'total_unpaid_subscriptions={(self.total_unpaid_subscriptions if hasattr(self, "total_unpaid_subscriptions") else None)!s}, ' + f'total_dunning_subscriptions={(self.total_dunning_subscriptions if hasattr(self, "total_dunning_subscriptions") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/site_summary.py b/advancedbilling/models/site_summary.py index 575540bc..e72e7e51 100644 --- a/advancedbilling/models/site_summary.py +++ b/advancedbilling/models/site_summary.py @@ -104,18 +104,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'seller_name={self.seller_name!r}, ' - f'site_name={self.site_name!r}, ' - f'site_id={self.site_id!r}, ' - f'site_currency={self.site_currency!r}, ' - f'stats={self.stats!r}, ' + f'seller_name={(self.seller_name if hasattr(self, "seller_name") else None)!r}, ' + f'site_name={(self.site_name if hasattr(self, "site_name") else None)!r}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!r}, ' + f'site_currency={(self.site_currency if hasattr(self, "site_currency") else None)!r}, ' + f'stats={(self.stats if hasattr(self, "stats") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'seller_name={self.seller_name!s}, ' - f'site_name={self.site_name!s}, ' - f'site_id={self.site_id!s}, ' - f'site_currency={self.site_currency!s}, ' - f'stats={self.stats!s}, ' + f'seller_name={(self.seller_name if hasattr(self, "seller_name") else None)!s}, ' + f'site_name={(self.site_name if hasattr(self, "site_name") else None)!s}, ' + f'site_id={(self.site_id if hasattr(self, "site_id") else None)!s}, ' + f'site_currency={(self.site_currency if hasattr(self, "site_currency") else None)!s}, ' + f'stats={(self.stats if hasattr(self, "stats") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription.py b/advancedbilling/models/subscription.py index fe80c543..343a7a5b 100644 --- a/advancedbilling/models/subscription.py +++ b/advancedbilling/models/subscription.py @@ -800,132 +800,132 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'state={self.state!r}, ' - f'balance_in_cents={self.balance_in_cents!r}, ' - f'total_revenue_in_cents={self.total_revenue_in_cents!r}, ' - f'product_price_in_cents={self.product_price_in_cents!r}, ' - f'product_version_number={self.product_version_number!r}, ' - f'current_period_ends_at={self.current_period_ends_at!r}, ' - f'next_assessment_at={self.next_assessment_at!r}, ' - f'trial_started_at={self.trial_started_at!r}, ' - f'trial_ended_at={self.trial_ended_at!r}, ' - f'activated_at={self.activated_at!r}, ' - f'expires_at={self.expires_at!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'cancellation_message={self.cancellation_message!r}, ' - f'cancellation_method={self.cancellation_method!r}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!r}, ' - f'canceled_at={self.canceled_at!r}, ' - f'current_period_started_at={self.current_period_started_at!r}, ' - f'previous_state={self.previous_state!r}, ' - f'signup_payment_id={self.signup_payment_id!r}, ' - f'signup_revenue={self.signup_revenue!r}, ' - f'delayed_cancel_at={self.delayed_cancel_at!r}, ' - f'coupon_code={self.coupon_code!r}, ' - f'snap_day={self.snap_day!r}, ' - f'payment_collection_method={self.payment_collection_method!r}, ' - f'customer={self.customer!r}, ' - f'product={self.product!r}, ' - f'credit_card={self.credit_card!r}, ' - f'group={self.group!r}, ' - f'bank_account={self.bank_account!r}, ' - f'payment_type={self.payment_type!r}, ' - f'referral_code={self.referral_code!r}, ' - f'next_product_id={self.next_product_id!r}, ' - f'next_product_handle={self.next_product_handle!r}, ' - f'coupon_use_count={self.coupon_use_count!r}, ' - f'coupon_uses_allowed={self.coupon_uses_allowed!r}, ' - f'reason_code={self.reason_code!r}, ' - f'automatically_resume_at={self.automatically_resume_at!r}, ' - f'coupon_codes={self.coupon_codes!r}, ' - f'offer_id={self.offer_id!r}, ' - f'payer_id={self.payer_id!r}, ' - f'current_billing_amount_in_cents={self.current_billing_amount_in_cents!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'product_price_point_type={self.product_price_point_type!r}, ' - f'next_product_price_point_id={self.next_product_price_point_id!r}, ' - f'net_terms={self.net_terms!r}, ' - f'stored_credential_transaction_id={self.stored_credential_transaction_id!r}, ' - f'reference={self.reference!r}, ' - f'on_hold_at={self.on_hold_at!r}, ' - f'prepaid_dunning={self.prepaid_dunning!r}, ' - f'coupons={self.coupons!r}, ' - f'dunning_communication_delay_enabled={self.dunning_communication_delay_enabled!r}, ' - f'dunning_communication_delay_time_zone={self.dunning_communication_delay_time_zone!r}, ' - f'receives_invoice_emails={self.receives_invoice_emails!r}, ' - f'locale={self.locale!r}, ' - f'currency={self.currency!r}, ' - f'scheduled_cancellation_at={self.scheduled_cancellation_at!r}, ' - f'credit_balance_in_cents={self.credit_balance_in_cents!r}, ' - f'prepayment_balance_in_cents={self.prepayment_balance_in_cents!r}, ' - f'prepaid_configuration={self.prepaid_configuration!r}, ' - f'self_service_page_token={self.self_service_page_token!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'balance_in_cents={(self.balance_in_cents if hasattr(self, "balance_in_cents") else None)!r}, ' + f'total_revenue_in_cents={(self.total_revenue_in_cents if hasattr(self, "total_revenue_in_cents") else None)!r}, ' + f'product_price_in_cents={(self.product_price_in_cents if hasattr(self, "product_price_in_cents") else None)!r}, ' + f'product_version_number={(self.product_version_number if hasattr(self, "product_version_number") else None)!r}, ' + f'current_period_ends_at={(self.current_period_ends_at if hasattr(self, "current_period_ends_at") else None)!r}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!r}, ' + f'trial_started_at={(self.trial_started_at if hasattr(self, "trial_started_at") else None)!r}, ' + f'trial_ended_at={(self.trial_ended_at if hasattr(self, "trial_ended_at") else None)!r}, ' + f'activated_at={(self.activated_at if hasattr(self, "activated_at") else None)!r}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'cancellation_message={(self.cancellation_message if hasattr(self, "cancellation_message") else None)!r}, ' + f'cancellation_method={(self.cancellation_method if hasattr(self, "cancellation_method") else None)!r}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!r}, ' + f'canceled_at={(self.canceled_at if hasattr(self, "canceled_at") else None)!r}, ' + f'current_period_started_at={(self.current_period_started_at if hasattr(self, "current_period_started_at") else None)!r}, ' + f'previous_state={(self.previous_state if hasattr(self, "previous_state") else None)!r}, ' + f'signup_payment_id={(self.signup_payment_id if hasattr(self, "signup_payment_id") else None)!r}, ' + f'signup_revenue={(self.signup_revenue if hasattr(self, "signup_revenue") else None)!r}, ' + f'delayed_cancel_at={(self.delayed_cancel_at if hasattr(self, "delayed_cancel_at") else None)!r}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!r}, ' + f'snap_day={(self.snap_day if hasattr(self, "snap_day") else None)!r}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!r}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!r}, ' + f'product={(self.product if hasattr(self, "product") else None)!r}, ' + f'credit_card={(self.credit_card if hasattr(self, "credit_card") else None)!r}, ' + f'group={(self.group if hasattr(self, "group") else None)!r}, ' + f'bank_account={(self.bank_account if hasattr(self, "bank_account") else None)!r}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!r}, ' + f'referral_code={(self.referral_code if hasattr(self, "referral_code") else None)!r}, ' + f'next_product_id={(self.next_product_id if hasattr(self, "next_product_id") else None)!r}, ' + f'next_product_handle={(self.next_product_handle if hasattr(self, "next_product_handle") else None)!r}, ' + f'coupon_use_count={(self.coupon_use_count if hasattr(self, "coupon_use_count") else None)!r}, ' + f'coupon_uses_allowed={(self.coupon_uses_allowed if hasattr(self, "coupon_uses_allowed") else None)!r}, ' + f'reason_code={(self.reason_code if hasattr(self, "reason_code") else None)!r}, ' + f'automatically_resume_at={(self.automatically_resume_at if hasattr(self, "automatically_resume_at") else None)!r}, ' + f'coupon_codes={(self.coupon_codes if hasattr(self, "coupon_codes") else None)!r}, ' + f'offer_id={(self.offer_id if hasattr(self, "offer_id") else None)!r}, ' + f'payer_id={(self.payer_id if hasattr(self, "payer_id") else None)!r}, ' + f'current_billing_amount_in_cents={(self.current_billing_amount_in_cents if hasattr(self, "current_billing_amount_in_cents") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'product_price_point_type={(self.product_price_point_type if hasattr(self, "product_price_point_type") else None)!r}, ' + f'next_product_price_point_id={(self.next_product_price_point_id if hasattr(self, "next_product_price_point_id") else None)!r}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!r}, ' + f'stored_credential_transaction_id={(self.stored_credential_transaction_id if hasattr(self, "stored_credential_transaction_id") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'on_hold_at={(self.on_hold_at if hasattr(self, "on_hold_at") else None)!r}, ' + f'prepaid_dunning={(self.prepaid_dunning if hasattr(self, "prepaid_dunning") else None)!r}, ' + f'coupons={(self.coupons if hasattr(self, "coupons") else None)!r}, ' + f'dunning_communication_delay_enabled={(self.dunning_communication_delay_enabled if hasattr(self, "dunning_communication_delay_enabled") else None)!r}, ' + f'dunning_communication_delay_time_zone={(self.dunning_communication_delay_time_zone if hasattr(self, "dunning_communication_delay_time_zone") else None)!r}, ' + f'receives_invoice_emails={(self.receives_invoice_emails if hasattr(self, "receives_invoice_emails") else None)!r}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'scheduled_cancellation_at={(self.scheduled_cancellation_at if hasattr(self, "scheduled_cancellation_at") else None)!r}, ' + f'credit_balance_in_cents={(self.credit_balance_in_cents if hasattr(self, "credit_balance_in_cents") else None)!r}, ' + f'prepayment_balance_in_cents={(self.prepayment_balance_in_cents if hasattr(self, "prepayment_balance_in_cents") else None)!r}, ' + f'prepaid_configuration={(self.prepaid_configuration if hasattr(self, "prepaid_configuration") else None)!r}, ' + f'self_service_page_token={(self.self_service_page_token if hasattr(self, "self_service_page_token") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'state={self.state!s}, ' - f'balance_in_cents={self.balance_in_cents!s}, ' - f'total_revenue_in_cents={self.total_revenue_in_cents!s}, ' - f'product_price_in_cents={self.product_price_in_cents!s}, ' - f'product_version_number={self.product_version_number!s}, ' - f'current_period_ends_at={self.current_period_ends_at!s}, ' - f'next_assessment_at={self.next_assessment_at!s}, ' - f'trial_started_at={self.trial_started_at!s}, ' - f'trial_ended_at={self.trial_ended_at!s}, ' - f'activated_at={self.activated_at!s}, ' - f'expires_at={self.expires_at!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'cancellation_message={self.cancellation_message!s}, ' - f'cancellation_method={self.cancellation_method!s}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!s}, ' - f'canceled_at={self.canceled_at!s}, ' - f'current_period_started_at={self.current_period_started_at!s}, ' - f'previous_state={self.previous_state!s}, ' - f'signup_payment_id={self.signup_payment_id!s}, ' - f'signup_revenue={self.signup_revenue!s}, ' - f'delayed_cancel_at={self.delayed_cancel_at!s}, ' - f'coupon_code={self.coupon_code!s}, ' - f'snap_day={self.snap_day!s}, ' - f'payment_collection_method={self.payment_collection_method!s}, ' - f'customer={self.customer!s}, ' - f'product={self.product!s}, ' - f'credit_card={self.credit_card!s}, ' - f'group={self.group!s}, ' - f'bank_account={self.bank_account!s}, ' - f'payment_type={self.payment_type!s}, ' - f'referral_code={self.referral_code!s}, ' - f'next_product_id={self.next_product_id!s}, ' - f'next_product_handle={self.next_product_handle!s}, ' - f'coupon_use_count={self.coupon_use_count!s}, ' - f'coupon_uses_allowed={self.coupon_uses_allowed!s}, ' - f'reason_code={self.reason_code!s}, ' - f'automatically_resume_at={self.automatically_resume_at!s}, ' - f'coupon_codes={self.coupon_codes!s}, ' - f'offer_id={self.offer_id!s}, ' - f'payer_id={self.payer_id!s}, ' - f'current_billing_amount_in_cents={self.current_billing_amount_in_cents!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'product_price_point_type={self.product_price_point_type!s}, ' - f'next_product_price_point_id={self.next_product_price_point_id!s}, ' - f'net_terms={self.net_terms!s}, ' - f'stored_credential_transaction_id={self.stored_credential_transaction_id!s}, ' - f'reference={self.reference!s}, ' - f'on_hold_at={self.on_hold_at!s}, ' - f'prepaid_dunning={self.prepaid_dunning!s}, ' - f'coupons={self.coupons!s}, ' - f'dunning_communication_delay_enabled={self.dunning_communication_delay_enabled!s}, ' - f'dunning_communication_delay_time_zone={self.dunning_communication_delay_time_zone!s}, ' - f'receives_invoice_emails={self.receives_invoice_emails!s}, ' - f'locale={self.locale!s}, ' - f'currency={self.currency!s}, ' - f'scheduled_cancellation_at={self.scheduled_cancellation_at!s}, ' - f'credit_balance_in_cents={self.credit_balance_in_cents!s}, ' - f'prepayment_balance_in_cents={self.prepayment_balance_in_cents!s}, ' - f'prepaid_configuration={self.prepaid_configuration!s}, ' - f'self_service_page_token={self.self_service_page_token!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'balance_in_cents={(self.balance_in_cents if hasattr(self, "balance_in_cents") else None)!s}, ' + f'total_revenue_in_cents={(self.total_revenue_in_cents if hasattr(self, "total_revenue_in_cents") else None)!s}, ' + f'product_price_in_cents={(self.product_price_in_cents if hasattr(self, "product_price_in_cents") else None)!s}, ' + f'product_version_number={(self.product_version_number if hasattr(self, "product_version_number") else None)!s}, ' + f'current_period_ends_at={(self.current_period_ends_at if hasattr(self, "current_period_ends_at") else None)!s}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!s}, ' + f'trial_started_at={(self.trial_started_at if hasattr(self, "trial_started_at") else None)!s}, ' + f'trial_ended_at={(self.trial_ended_at if hasattr(self, "trial_ended_at") else None)!s}, ' + f'activated_at={(self.activated_at if hasattr(self, "activated_at") else None)!s}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'cancellation_message={(self.cancellation_message if hasattr(self, "cancellation_message") else None)!s}, ' + f'cancellation_method={(self.cancellation_method if hasattr(self, "cancellation_method") else None)!s}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!s}, ' + f'canceled_at={(self.canceled_at if hasattr(self, "canceled_at") else None)!s}, ' + f'current_period_started_at={(self.current_period_started_at if hasattr(self, "current_period_started_at") else None)!s}, ' + f'previous_state={(self.previous_state if hasattr(self, "previous_state") else None)!s}, ' + f'signup_payment_id={(self.signup_payment_id if hasattr(self, "signup_payment_id") else None)!s}, ' + f'signup_revenue={(self.signup_revenue if hasattr(self, "signup_revenue") else None)!s}, ' + f'delayed_cancel_at={(self.delayed_cancel_at if hasattr(self, "delayed_cancel_at") else None)!s}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!s}, ' + f'snap_day={(self.snap_day if hasattr(self, "snap_day") else None)!s}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!s}, ' + f'customer={(self.customer if hasattr(self, "customer") else None)!s}, ' + f'product={(self.product if hasattr(self, "product") else None)!s}, ' + f'credit_card={(self.credit_card if hasattr(self, "credit_card") else None)!s}, ' + f'group={(self.group if hasattr(self, "group") else None)!s}, ' + f'bank_account={(self.bank_account if hasattr(self, "bank_account") else None)!s}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!s}, ' + f'referral_code={(self.referral_code if hasattr(self, "referral_code") else None)!s}, ' + f'next_product_id={(self.next_product_id if hasattr(self, "next_product_id") else None)!s}, ' + f'next_product_handle={(self.next_product_handle if hasattr(self, "next_product_handle") else None)!s}, ' + f'coupon_use_count={(self.coupon_use_count if hasattr(self, "coupon_use_count") else None)!s}, ' + f'coupon_uses_allowed={(self.coupon_uses_allowed if hasattr(self, "coupon_uses_allowed") else None)!s}, ' + f'reason_code={(self.reason_code if hasattr(self, "reason_code") else None)!s}, ' + f'automatically_resume_at={(self.automatically_resume_at if hasattr(self, "automatically_resume_at") else None)!s}, ' + f'coupon_codes={(self.coupon_codes if hasattr(self, "coupon_codes") else None)!s}, ' + f'offer_id={(self.offer_id if hasattr(self, "offer_id") else None)!s}, ' + f'payer_id={(self.payer_id if hasattr(self, "payer_id") else None)!s}, ' + f'current_billing_amount_in_cents={(self.current_billing_amount_in_cents if hasattr(self, "current_billing_amount_in_cents") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'product_price_point_type={(self.product_price_point_type if hasattr(self, "product_price_point_type") else None)!s}, ' + f'next_product_price_point_id={(self.next_product_price_point_id if hasattr(self, "next_product_price_point_id") else None)!s}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!s}, ' + f'stored_credential_transaction_id={(self.stored_credential_transaction_id if hasattr(self, "stored_credential_transaction_id") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'on_hold_at={(self.on_hold_at if hasattr(self, "on_hold_at") else None)!s}, ' + f'prepaid_dunning={(self.prepaid_dunning if hasattr(self, "prepaid_dunning") else None)!s}, ' + f'coupons={(self.coupons if hasattr(self, "coupons") else None)!s}, ' + f'dunning_communication_delay_enabled={(self.dunning_communication_delay_enabled if hasattr(self, "dunning_communication_delay_enabled") else None)!s}, ' + f'dunning_communication_delay_time_zone={(self.dunning_communication_delay_time_zone if hasattr(self, "dunning_communication_delay_time_zone") else None)!s}, ' + f'receives_invoice_emails={(self.receives_invoice_emails if hasattr(self, "receives_invoice_emails") else None)!s}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'scheduled_cancellation_at={(self.scheduled_cancellation_at if hasattr(self, "scheduled_cancellation_at") else None)!s}, ' + f'credit_balance_in_cents={(self.credit_balance_in_cents if hasattr(self, "credit_balance_in_cents") else None)!s}, ' + f'prepayment_balance_in_cents={(self.prepayment_balance_in_cents if hasattr(self, "prepayment_balance_in_cents") else None)!s}, ' + f'prepaid_configuration={(self.prepaid_configuration if hasattr(self, "prepaid_configuration") else None)!s}, ' + f'self_service_page_token={(self.self_service_page_token if hasattr(self, "self_service_page_token") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_component.py b/advancedbilling/models/subscription_component.py index 3b62d729..9d51eb41 100644 --- a/advancedbilling/models/subscription_component.py +++ b/advancedbilling/models/subscription_component.py @@ -362,72 +362,72 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'name={self.name!r}, ' - f'kind={self.kind!r}, ' - f'unit_name={self.unit_name!r}, ' - f'enabled={self.enabled!r}, ' - f'unit_balance={self.unit_balance!r}, ' - f'currency={self.currency!r}, ' - f'allocated_quantity={self.allocated_quantity!r}, ' - f'pricing_scheme={self.pricing_scheme!r}, ' - f'component_id={self.component_id!r}, ' - f'component_handle={self.component_handle!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'recurring={self.recurring!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' - f'downgrade_credit={self.downgrade_credit!r}, ' - f'archived_at={self.archived_at!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'price_point_handle={self.price_point_handle!r}, ' - f'price_point_type={self.price_point_type!r}, ' - f'price_point_name={self.price_point_name!r}, ' - f'product_family_id={self.product_family_id!r}, ' - f'product_family_handle={self.product_family_handle!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'description={self.description!r}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!r}, ' - f'subscription={self.subscription!r}, ' - f'historic_usages={self.historic_usages!r}, ' - f'display_on_hosted_page={self.display_on_hosted_page!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' + f'unit_name={(self.unit_name if hasattr(self, "unit_name") else None)!r}, ' + f'enabled={(self.enabled if hasattr(self, "enabled") else None)!r}, ' + f'unit_balance={(self.unit_balance if hasattr(self, "unit_balance") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'allocated_quantity={(self.allocated_quantity if hasattr(self, "allocated_quantity") else None)!r}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!r}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'price_point_handle={(self.price_point_handle if hasattr(self, "price_point_handle") else None)!r}, ' + f'price_point_type={(self.price_point_type if hasattr(self, "price_point_type") else None)!r}, ' + f'price_point_name={(self.price_point_name if hasattr(self, "price_point_name") else None)!r}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!r}, ' + f'product_family_handle={(self.product_family_handle if hasattr(self, "product_family_handle") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!r}, ' + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!r}, ' + f'historic_usages={(self.historic_usages if hasattr(self, "historic_usages") else None)!r}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'name={self.name!s}, ' - f'kind={self.kind!s}, ' - f'unit_name={self.unit_name!s}, ' - f'enabled={self.enabled!s}, ' - f'unit_balance={self.unit_balance!s}, ' - f'currency={self.currency!s}, ' - f'allocated_quantity={self.allocated_quantity!s}, ' - f'pricing_scheme={self.pricing_scheme!s}, ' - f'component_id={self.component_id!s}, ' - f'component_handle={self.component_handle!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'recurring={self.recurring!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' - f'downgrade_credit={self.downgrade_credit!s}, ' - f'archived_at={self.archived_at!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'price_point_handle={self.price_point_handle!s}, ' - f'price_point_type={self.price_point_type!s}, ' - f'price_point_name={self.price_point_name!s}, ' - f'product_family_id={self.product_family_id!s}, ' - f'product_family_handle={self.product_family_handle!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'description={self.description!s}, ' - f'allow_fractional_quantities={self.allow_fractional_quantities!s}, ' - f'subscription={self.subscription!s}, ' - f'historic_usages={self.historic_usages!s}, ' - f'display_on_hosted_page={self.display_on_hosted_page!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' + f'unit_name={(self.unit_name if hasattr(self, "unit_name") else None)!s}, ' + f'enabled={(self.enabled if hasattr(self, "enabled") else None)!s}, ' + f'unit_balance={(self.unit_balance if hasattr(self, "unit_balance") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'allocated_quantity={(self.allocated_quantity if hasattr(self, "allocated_quantity") else None)!s}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' + f'downgrade_credit={(self.downgrade_credit if hasattr(self, "downgrade_credit") else None)!s}, ' + f'archived_at={(self.archived_at if hasattr(self, "archived_at") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'price_point_handle={(self.price_point_handle if hasattr(self, "price_point_handle") else None)!s}, ' + f'price_point_type={(self.price_point_type if hasattr(self, "price_point_type") else None)!s}, ' + f'price_point_name={(self.price_point_name if hasattr(self, "price_point_name") else None)!s}, ' + f'product_family_id={(self.product_family_id if hasattr(self, "product_family_id") else None)!s}, ' + f'product_family_handle={(self.product_family_handle if hasattr(self, "product_family_handle") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'allow_fractional_quantities={(self.allow_fractional_quantities if hasattr(self, "allow_fractional_quantities") else None)!s}, ' + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!s}, ' + f'historic_usages={(self.historic_usages if hasattr(self, "historic_usages") else None)!s}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_component_allocation_error_item.py b/advancedbilling/models/subscription_component_allocation_error_item.py index 01166ba1..c04d6743 100644 --- a/advancedbilling/models/subscription_component_allocation_error_item.py +++ b/advancedbilling/models/subscription_component_allocation_error_item.py @@ -79,12 +79,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'kind={self.kind!r}, ' - f'message={self.message!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' + f'message={(self.message if hasattr(self, "message") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'kind={self.kind!s}, ' - f'message={self.message!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' + f'message={(self.message if hasattr(self, "message") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_component_response.py b/advancedbilling/models/subscription_component_response.py index 5f9c75f2..d878fc91 100644 --- a/advancedbilling/models/subscription_component_response.py +++ b/advancedbilling/models/subscription_component_response.py @@ -73,10 +73,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'component={self.component!r}, ' + f'component={(self.component if hasattr(self, "component") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component={self.component!s}, ' + f'component={(self.component if hasattr(self, "component") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_component_subscription.py b/advancedbilling/models/subscription_component_subscription.py index 9b8caf0c..c45f0a75 100644 --- a/advancedbilling/models/subscription_component_subscription.py +++ b/advancedbilling/models/subscription_component_subscription.py @@ -168,12 +168,12 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'state={self.state!r}, ' - f'updated_at={self.updated_at!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'state={self.state!s}, ' - f'updated_at={self.updated_at!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_custom_price.py b/advancedbilling/models/subscription_custom_price.py index 3c717b0f..4406252f 100644 --- a/advancedbilling/models/subscription_custom_price.py +++ b/advancedbilling/models/subscription_custom_price.py @@ -203,34 +203,34 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!r}, ' - f'handle={self.handle!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' f'price_in_cents={self.price_in_cents!r}, ' f'interval={self.interval!r}, ' f'interval_unit={self.interval_unit!r}, ' - f'trial_price_in_cents={self.trial_price_in_cents!r}, ' - f'trial_interval={self.trial_interval!r}, ' - f'trial_interval_unit={self.trial_interval_unit!r}, ' - f'initial_charge_in_cents={self.initial_charge_in_cents!r}, ' - f'initial_charge_after_trial={self.initial_charge_after_trial!r}, ' - f'expiration_interval={self.expiration_interval!r}, ' - f'expiration_interval_unit={self.expiration_interval_unit!r}, ' - f'tax_included={self.tax_included!r}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!r}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!r}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!r}, ' + f'initial_charge_in_cents={(self.initial_charge_in_cents if hasattr(self, "initial_charge_in_cents") else None)!r}, ' + f'initial_charge_after_trial={(self.initial_charge_after_trial if hasattr(self, "initial_charge_after_trial") else None)!r}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!r}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!r}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!s}, ' - f'handle={self.handle!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' f'price_in_cents={self.price_in_cents!s}, ' f'interval={self.interval!s}, ' f'interval_unit={self.interval_unit!s}, ' - f'trial_price_in_cents={self.trial_price_in_cents!s}, ' - f'trial_interval={self.trial_interval!s}, ' - f'trial_interval_unit={self.trial_interval_unit!s}, ' - f'initial_charge_in_cents={self.initial_charge_in_cents!s}, ' - f'initial_charge_after_trial={self.initial_charge_after_trial!s}, ' - f'expiration_interval={self.expiration_interval!s}, ' - f'expiration_interval_unit={self.expiration_interval_unit!s}, ' - f'tax_included={self.tax_included!s}, ' + f'trial_price_in_cents={(self.trial_price_in_cents if hasattr(self, "trial_price_in_cents") else None)!s}, ' + f'trial_interval={(self.trial_interval if hasattr(self, "trial_interval") else None)!s}, ' + f'trial_interval_unit={(self.trial_interval_unit if hasattr(self, "trial_interval_unit") else None)!s}, ' + f'initial_charge_in_cents={(self.initial_charge_in_cents if hasattr(self, "initial_charge_in_cents") else None)!s}, ' + f'initial_charge_after_trial={(self.initial_charge_after_trial if hasattr(self, "initial_charge_after_trial") else None)!s}, ' + f'expiration_interval={(self.expiration_interval if hasattr(self, "expiration_interval") else None)!s}, ' + f'expiration_interval_unit={(self.expiration_interval_unit if hasattr(self, "expiration_interval_unit") else None)!s}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_filter.py b/advancedbilling/models/subscription_filter.py index eac1d6f0..b4c89210 100644 --- a/advancedbilling/models/subscription_filter.py +++ b/advancedbilling/models/subscription_filter.py @@ -147,20 +147,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'states={self.states!r}, ' - f'date_field={self.date_field!r}, ' - f'start_date={self.start_date!r}, ' - f'end_date={self.end_date!r}, ' - f'start_datetime={self.start_datetime!r}, ' - f'end_datetime={self.end_datetime!r}, ' + f'states={(self.states if hasattr(self, "states") else None)!r}, ' + f'date_field={(self.date_field if hasattr(self, "date_field") else None)!r}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!r}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!r}, ' + f'start_datetime={(self.start_datetime if hasattr(self, "start_datetime") else None)!r}, ' + f'end_datetime={(self.end_datetime if hasattr(self, "end_datetime") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'states={self.states!s}, ' - f'date_field={self.date_field!s}, ' - f'start_date={self.start_date!s}, ' - f'end_date={self.end_date!s}, ' - f'start_datetime={self.start_datetime!s}, ' - f'end_datetime={self.end_datetime!s}, ' + f'states={(self.states if hasattr(self, "states") else None)!s}, ' + f'date_field={(self.date_field if hasattr(self, "date_field") else None)!s}, ' + f'start_date={(self.start_date if hasattr(self, "start_date") else None)!s}, ' + f'end_date={(self.end_date if hasattr(self, "end_date") else None)!s}, ' + f'start_datetime={(self.start_datetime if hasattr(self, "start_datetime") else None)!s}, ' + f'end_datetime={(self.end_datetime if hasattr(self, "end_datetime") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group.py b/advancedbilling/models/subscription_group.py index 15e75766..c1253344 100644 --- a/advancedbilling/models/subscription_group.py +++ b/advancedbilling/models/subscription_group.py @@ -109,18 +109,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'customer_id={self.customer_id!r}, ' - f'payment_profile={self.payment_profile!r}, ' - f'payment_collection_method={self.payment_collection_method!r}, ' - f'subscription_ids={self.subscription_ids!r}, ' - f'created_at={self.created_at!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'payment_profile={(self.payment_profile if hasattr(self, "payment_profile") else None)!r}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!r}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'customer_id={self.customer_id!s}, ' - f'payment_profile={self.payment_profile!s}, ' - f'payment_collection_method={self.payment_collection_method!s}, ' - f'subscription_ids={self.subscription_ids!s}, ' - f'created_at={self.created_at!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'payment_profile={(self.payment_profile if hasattr(self, "payment_profile") else None)!s}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!s}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_balances.py b/advancedbilling/models/subscription_group_balances.py index a207c0af..356337db 100644 --- a/advancedbilling/models/subscription_group_balances.py +++ b/advancedbilling/models/subscription_group_balances.py @@ -100,16 +100,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'prepayments={self.prepayments!r}, ' - f'service_credits={self.service_credits!r}, ' - f'open_invoices={self.open_invoices!r}, ' - f'pending_discounts={self.pending_discounts!r}, ' + f'prepayments={(self.prepayments if hasattr(self, "prepayments") else None)!r}, ' + f'service_credits={(self.service_credits if hasattr(self, "service_credits") else None)!r}, ' + f'open_invoices={(self.open_invoices if hasattr(self, "open_invoices") else None)!r}, ' + f'pending_discounts={(self.pending_discounts if hasattr(self, "pending_discounts") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'prepayments={self.prepayments!s}, ' - f'service_credits={self.service_credits!s}, ' - f'open_invoices={self.open_invoices!s}, ' - f'pending_discounts={self.pending_discounts!s}, ' + f'prepayments={(self.prepayments if hasattr(self, "prepayments") else None)!s}, ' + f'service_credits={(self.service_credits if hasattr(self, "service_credits") else None)!s}, ' + f'open_invoices={(self.open_invoices if hasattr(self, "open_invoices") else None)!s}, ' + f'pending_discounts={(self.pending_discounts if hasattr(self, "pending_discounts") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_bank_account.py b/advancedbilling/models/subscription_group_bank_account.py index 4e470f31..d274627c 100644 --- a/advancedbilling/models/subscription_group_bank_account.py +++ b/advancedbilling/models/subscription_group_bank_account.py @@ -224,40 +224,40 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'bank_name={self.bank_name!r}, ' - f'bank_account_number={self.bank_account_number!r}, ' - f'bank_routing_number={self.bank_routing_number!r}, ' - f'bank_iban={self.bank_iban!r}, ' - f'bank_branch_code={self.bank_branch_code!r}, ' - f'bank_account_type={self.bank_account_type!r}, ' - f'bank_account_holder_type={self.bank_account_holder_type!r}, ' - f'payment_type={self.payment_type!r}, ' - f'billing_address={self.billing_address!r}, ' - f'billing_city={self.billing_city!r}, ' - f'billing_state={self.billing_state!r}, ' - f'billing_zip={self.billing_zip!r}, ' - f'billing_country={self.billing_country!r}, ' - f'chargify_token={self.chargify_token!r}, ' - f'current_vault={self.current_vault!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' + f'bank_name={(self.bank_name if hasattr(self, "bank_name") else None)!r}, ' + f'bank_account_number={(self.bank_account_number if hasattr(self, "bank_account_number") else None)!r}, ' + f'bank_routing_number={(self.bank_routing_number if hasattr(self, "bank_routing_number") else None)!r}, ' + f'bank_iban={(self.bank_iban if hasattr(self, "bank_iban") else None)!r}, ' + f'bank_branch_code={(self.bank_branch_code if hasattr(self, "bank_branch_code") else None)!r}, ' + f'bank_account_type={(self.bank_account_type if hasattr(self, "bank_account_type") else None)!r}, ' + f'bank_account_holder_type={(self.bank_account_holder_type if hasattr(self, "bank_account_holder_type") else None)!r}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!r}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!r}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!r}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!r}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'bank_name={self.bank_name!s}, ' - f'bank_account_number={self.bank_account_number!s}, ' - f'bank_routing_number={self.bank_routing_number!s}, ' - f'bank_iban={self.bank_iban!s}, ' - f'bank_branch_code={self.bank_branch_code!s}, ' - f'bank_account_type={self.bank_account_type!s}, ' - f'bank_account_holder_type={self.bank_account_holder_type!s}, ' - f'payment_type={self.payment_type!s}, ' - f'billing_address={self.billing_address!s}, ' - f'billing_city={self.billing_city!s}, ' - f'billing_state={self.billing_state!s}, ' - f'billing_zip={self.billing_zip!s}, ' - f'billing_country={self.billing_country!s}, ' - f'chargify_token={self.chargify_token!s}, ' - f'current_vault={self.current_vault!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' + f'bank_name={(self.bank_name if hasattr(self, "bank_name") else None)!s}, ' + f'bank_account_number={(self.bank_account_number if hasattr(self, "bank_account_number") else None)!s}, ' + f'bank_routing_number={(self.bank_routing_number if hasattr(self, "bank_routing_number") else None)!s}, ' + f'bank_iban={(self.bank_iban if hasattr(self, "bank_iban") else None)!s}, ' + f'bank_branch_code={(self.bank_branch_code if hasattr(self, "bank_branch_code") else None)!s}, ' + f'bank_account_type={(self.bank_account_type if hasattr(self, "bank_account_type") else None)!s}, ' + f'bank_account_holder_type={(self.bank_account_holder_type if hasattr(self, "bank_account_holder_type") else None)!s}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!s}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!s}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!s}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!s}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_component_custom_price.py b/advancedbilling/models/subscription_group_component_custom_price.py index 9d77951f..c574c0ae 100644 --- a/advancedbilling/models/subscription_group_component_custom_price.py +++ b/advancedbilling/models/subscription_group_component_custom_price.py @@ -126,14 +126,14 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'pricing_scheme={self.pricing_scheme!r}, ' - f'prices={self.prices!r}, ' - f'overage_pricing={self.overage_pricing!r}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' + f'overage_pricing={(self.overage_pricing if hasattr(self, "overage_pricing") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'pricing_scheme={self.pricing_scheme!s}, ' - f'prices={self.prices!s}, ' - f'overage_pricing={self.overage_pricing!s}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' + f'overage_pricing={(self.overage_pricing if hasattr(self, "overage_pricing") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_credit_card.py b/advancedbilling/models/subscription_group_credit_card.py index 3ceabf72..f371b8ad 100644 --- a/advancedbilling/models/subscription_group_credit_card.py +++ b/advancedbilling/models/subscription_group_credit_card.py @@ -14,12 +14,6 @@ class SubscriptionGroupCreditCard(object): """Implementation of the 'Subscription Group Credit Card' model. Attributes: - full_number (str | int | None): The model property of type str | int | - None. - expiration_month (str | int | None): The model property of type str | - int | None. - expiration_year (str | int | None): The model property of type str | - int | None. chargify_token (str): The model property of type str. vault_token (str): The model property of type str. current_vault (CreditCardVault): The vault that stores the payment @@ -33,6 +27,12 @@ class SubscriptionGroupCreditCard(object): billing_state (str): The model property of type str. billing_zip (str): The model property of type str. billing_country (str): The model property of type str. + full_number (str | int | None): The model property of type str | int | + None. + expiration_month (str | int | None): The model property of type str | + int | None. + expiration_year (str | int | None): The model property of type str | + int | None. last_four (str): The model property of type str. card_type (CardType): The type of card used. customer_vault_token (str): The model property of type str. @@ -45,9 +45,6 @@ class SubscriptionGroupCreditCard(object): # Create a mapping from Model property names to API property names _names = { - "full_number": 'full_number', - "expiration_month": 'expiration_month', - "expiration_year": 'expiration_year', "chargify_token": 'chargify_token', "vault_token": 'vault_token', "current_vault": 'current_vault', @@ -60,6 +57,9 @@ class SubscriptionGroupCreditCard(object): "billing_state": 'billing_state', "billing_zip": 'billing_zip', "billing_country": 'billing_country', + "full_number": 'full_number', + "expiration_month": 'expiration_month', + "expiration_year": 'expiration_year', "last_four": 'last_four', "card_type": 'card_type', "customer_vault_token": 'customer_vault_token', @@ -68,9 +68,6 @@ class SubscriptionGroupCreditCard(object): } _optionals = [ - 'full_number', - 'expiration_month', - 'expiration_year', 'chargify_token', 'vault_token', 'current_vault', @@ -83,6 +80,9 @@ class SubscriptionGroupCreditCard(object): 'billing_state', 'billing_zip', 'billing_country', + 'full_number', + 'expiration_month', + 'expiration_year', 'last_four', 'card_type', 'customer_vault_token', @@ -91,9 +91,6 @@ class SubscriptionGroupCreditCard(object): ] def __init__(self, - full_number=APIHelper.SKIP, - expiration_month=APIHelper.SKIP, - expiration_year=APIHelper.SKIP, chargify_token=APIHelper.SKIP, vault_token=APIHelper.SKIP, current_vault=APIHelper.SKIP, @@ -106,6 +103,9 @@ def __init__(self, billing_state=APIHelper.SKIP, billing_zip=APIHelper.SKIP, billing_country=APIHelper.SKIP, + full_number=APIHelper.SKIP, + expiration_month=APIHelper.SKIP, + expiration_year=APIHelper.SKIP, last_four=APIHelper.SKIP, card_type=APIHelper.SKIP, customer_vault_token=APIHelper.SKIP, @@ -115,12 +115,6 @@ def __init__(self, """Constructor for the SubscriptionGroupCreditCard class""" # Initialize members of the class - if full_number is not APIHelper.SKIP: - self.full_number = full_number - if expiration_month is not APIHelper.SKIP: - self.expiration_month = expiration_month - if expiration_year is not APIHelper.SKIP: - self.expiration_year = expiration_year if chargify_token is not APIHelper.SKIP: self.chargify_token = chargify_token if vault_token is not APIHelper.SKIP: @@ -145,6 +139,12 @@ def __init__(self, self.billing_zip = billing_zip if billing_country is not APIHelper.SKIP: self.billing_country = billing_country + if full_number is not APIHelper.SKIP: + self.full_number = full_number + if expiration_month is not APIHelper.SKIP: + self.expiration_month = expiration_month + if expiration_year is not APIHelper.SKIP: + self.expiration_year = expiration_year if last_four is not APIHelper.SKIP: self.last_four = last_four if card_type is not APIHelper.SKIP: @@ -181,9 +181,6 @@ def from_dictionary(cls, return None # Extract variables from the dictionary - full_number = APIHelper.deserialize_union_type(UnionTypeLookUp.get('SubscriptionGroupCreditCardFullNumber'), dictionary.get('full_number'), False) if dictionary.get('full_number') is not None else APIHelper.SKIP - expiration_month = APIHelper.deserialize_union_type(UnionTypeLookUp.get('SubscriptionGroupCreditCardExpirationMonth'), dictionary.get('expiration_month'), False) if dictionary.get('expiration_month') is not None else APIHelper.SKIP - expiration_year = APIHelper.deserialize_union_type(UnionTypeLookUp.get('SubscriptionGroupCreditCardExpirationYear'), dictionary.get('expiration_year'), False) if dictionary.get('expiration_year') is not None else APIHelper.SKIP chargify_token = dictionary.get("chargify_token") if dictionary.get("chargify_token") else APIHelper.SKIP vault_token = dictionary.get("vault_token") if dictionary.get("vault_token") else APIHelper.SKIP current_vault = dictionary.get("current_vault") if dictionary.get("current_vault") else APIHelper.SKIP @@ -196,6 +193,9 @@ def from_dictionary(cls, billing_state = dictionary.get("billing_state") if dictionary.get("billing_state") else APIHelper.SKIP billing_zip = dictionary.get("billing_zip") if dictionary.get("billing_zip") else APIHelper.SKIP billing_country = dictionary.get("billing_country") if dictionary.get("billing_country") else APIHelper.SKIP + full_number = APIHelper.deserialize_union_type(UnionTypeLookUp.get('SubscriptionGroupCreditCardFullNumber'), dictionary.get('full_number'), False) if dictionary.get('full_number') is not None else APIHelper.SKIP + expiration_month = APIHelper.deserialize_union_type(UnionTypeLookUp.get('SubscriptionGroupCreditCardExpirationMonth'), dictionary.get('expiration_month'), False) if dictionary.get('expiration_month') is not None else APIHelper.SKIP + expiration_year = APIHelper.deserialize_union_type(UnionTypeLookUp.get('SubscriptionGroupCreditCardExpirationYear'), dictionary.get('expiration_year'), False) if dictionary.get('expiration_year') is not None else APIHelper.SKIP last_four = dictionary.get("last_four") if dictionary.get("last_four") else APIHelper.SKIP card_type = dictionary.get("card_type") if dictionary.get("card_type") else APIHelper.SKIP customer_vault_token = dictionary.get("customer_vault_token") if dictionary.get("customer_vault_token") else APIHelper.SKIP @@ -204,10 +204,7 @@ def from_dictionary(cls, # Clean out expected properties from dictionary additional_properties = {k: v for k, v in dictionary.items() if k not in cls._names.values()} # Return an object of this model - return cls(full_number, - expiration_month, - expiration_year, - chargify_token, + return cls(chargify_token, vault_token, current_vault, gateway_handle, @@ -219,6 +216,9 @@ def from_dictionary(cls, billing_state, billing_zip, billing_country, + full_number, + expiration_month, + expiration_year, last_four, card_type, customer_vault_token, @@ -250,48 +250,48 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'full_number={self.full_number!r}, ' - f'expiration_month={self.expiration_month!r}, ' - f'expiration_year={self.expiration_year!r}, ' - f'chargify_token={self.chargify_token!r}, ' - f'vault_token={self.vault_token!r}, ' - f'current_vault={self.current_vault!r}, ' - f'gateway_handle={self.gateway_handle!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'billing_address={self.billing_address!r}, ' - f'billing_address_2={self.billing_address_2!r}, ' - f'billing_city={self.billing_city!r}, ' - f'billing_state={self.billing_state!r}, ' - f'billing_zip={self.billing_zip!r}, ' - f'billing_country={self.billing_country!r}, ' - f'last_four={self.last_four!r}, ' - f'card_type={self.card_type!r}, ' - f'customer_vault_token={self.customer_vault_token!r}, ' - f'cvv={self.cvv!r}, ' - f'payment_type={self.payment_type!r}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!r}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!r}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!r}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!r}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!r}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!r}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!r}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!r}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!r}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!r}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!r}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!r}, ' + f'cvv={(self.cvv if hasattr(self, "cvv") else None)!r}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'full_number={self.full_number!s}, ' - f'expiration_month={self.expiration_month!s}, ' - f'expiration_year={self.expiration_year!s}, ' - f'chargify_token={self.chargify_token!s}, ' - f'vault_token={self.vault_token!s}, ' - f'current_vault={self.current_vault!s}, ' - f'gateway_handle={self.gateway_handle!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'billing_address={self.billing_address!s}, ' - f'billing_address_2={self.billing_address_2!s}, ' - f'billing_city={self.billing_city!s}, ' - f'billing_state={self.billing_state!s}, ' - f'billing_zip={self.billing_zip!s}, ' - f'billing_country={self.billing_country!s}, ' - f'last_four={self.last_four!s}, ' - f'card_type={self.card_type!s}, ' - f'customer_vault_token={self.customer_vault_token!s}, ' - f'cvv={self.cvv!s}, ' - f'payment_type={self.payment_type!s}, ' + f'chargify_token={(self.chargify_token if hasattr(self, "chargify_token") else None)!s}, ' + f'vault_token={(self.vault_token if hasattr(self, "vault_token") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'gateway_handle={(self.gateway_handle if hasattr(self, "gateway_handle") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!s}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!s}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!s}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!s}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!s}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!s}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!s}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!s}, ' + f'last_four={(self.last_four if hasattr(self, "last_four") else None)!s}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!s}, ' + f'customer_vault_token={(self.customer_vault_token if hasattr(self, "customer_vault_token") else None)!s}, ' + f'cvv={(self.cvv if hasattr(self, "cvv") else None)!s}, ' + f'payment_type={(self.payment_type if hasattr(self, "payment_type") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_customer.py b/advancedbilling/models/subscription_group_customer.py index 849cba8c..f245e74a 100644 --- a/advancedbilling/models/subscription_group_customer.py +++ b/advancedbilling/models/subscription_group_customer.py @@ -103,18 +103,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'organization={self.organization!r}, ' - f'email={self.email!r}, ' - f'reference={self.reference!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!r}, ' + f'email={(self.email if hasattr(self, "email") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'organization={self.organization!s}, ' - f'email={self.email!s}, ' - f'reference={self.reference!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!s}, ' + f'email={(self.email if hasattr(self, "email") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_item.py b/advancedbilling/models/subscription_group_item.py index fe6f3a4d..cd9dbdce 100644 --- a/advancedbilling/models/subscription_group_item.py +++ b/advancedbilling/models/subscription_group_item.py @@ -149,28 +149,28 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'reference={self.reference!r}, ' - f'product_id={self.product_id!r}, ' - f'product_handle={self.product_handle!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'product_price_point_handle={self.product_price_point_handle!r}, ' - f'currency={self.currency!r}, ' - f'coupon_code={self.coupon_code!r}, ' - f'total_revenue_in_cents={self.total_revenue_in_cents!r}, ' - f'balance_in_cents={self.balance_in_cents!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!r}, ' + f'total_revenue_in_cents={(self.total_revenue_in_cents if hasattr(self, "total_revenue_in_cents") else None)!r}, ' + f'balance_in_cents={(self.balance_in_cents if hasattr(self, "balance_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'reference={self.reference!s}, ' - f'product_id={self.product_id!s}, ' - f'product_handle={self.product_handle!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'product_price_point_handle={self.product_price_point_handle!s}, ' - f'currency={self.currency!s}, ' - f'coupon_code={self.coupon_code!s}, ' - f'total_revenue_in_cents={self.total_revenue_in_cents!s}, ' - f'balance_in_cents={self.balance_in_cents!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'coupon_code={(self.coupon_code if hasattr(self, "coupon_code") else None)!s}, ' + f'total_revenue_in_cents={(self.total_revenue_in_cents if hasattr(self, "total_revenue_in_cents") else None)!s}, ' + f'balance_in_cents={(self.balance_in_cents if hasattr(self, "balance_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_payment_profile.py b/advancedbilling/models/subscription_group_payment_profile.py index 3f23b28c..5e9f1367 100644 --- a/advancedbilling/models/subscription_group_payment_profile.py +++ b/advancedbilling/models/subscription_group_payment_profile.py @@ -95,16 +95,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'masked_card_number={self.masked_card_number!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'masked_card_number={self.masked_card_number!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'masked_card_number={(self.masked_card_number if hasattr(self, "masked_card_number") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_prepayment_response.py b/advancedbilling/models/subscription_group_prepayment_response.py index ab53ad21..959277fb 100644 --- a/advancedbilling/models/subscription_group_prepayment_response.py +++ b/advancedbilling/models/subscription_group_prepayment_response.py @@ -108,18 +108,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'ending_balance_in_cents={self.ending_balance_in_cents!r}, ' - f'entry_type={self.entry_type!r}, ' - f'memo={self.memo!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!r}, ' + f'entry_type={(self.entry_type if hasattr(self, "entry_type") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'ending_balance_in_cents={self.ending_balance_in_cents!s}, ' - f'entry_type={self.entry_type!s}, ' - f'memo={self.memo!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'ending_balance_in_cents={(self.ending_balance_in_cents if hasattr(self, "ending_balance_in_cents") else None)!s}, ' + f'entry_type={(self.entry_type if hasattr(self, "entry_type") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_signup.py b/advancedbilling/models/subscription_group_signup.py index 7a907a06..41bbde8f 100644 --- a/advancedbilling/models/subscription_group_signup.py +++ b/advancedbilling/models/subscription_group_signup.py @@ -139,24 +139,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'payment_profile_id={self.payment_profile_id!r}, ' - f'payer_id={self.payer_id!r}, ' - f'payer_reference={self.payer_reference!r}, ' - f'payment_collection_method={self.payment_collection_method!r}, ' - f'payer_attributes={self.payer_attributes!r}, ' - f'credit_card_attributes={self.credit_card_attributes!r}, ' - f'bank_account_attributes={self.bank_account_attributes!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' + f'payer_id={(self.payer_id if hasattr(self, "payer_id") else None)!r}, ' + f'payer_reference={(self.payer_reference if hasattr(self, "payer_reference") else None)!r}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!r}, ' + f'payer_attributes={(self.payer_attributes if hasattr(self, "payer_attributes") else None)!r}, ' + f'credit_card_attributes={(self.credit_card_attributes if hasattr(self, "credit_card_attributes") else None)!r}, ' + f'bank_account_attributes={(self.bank_account_attributes if hasattr(self, "bank_account_attributes") else None)!r}, ' f'subscriptions={self.subscriptions!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'payment_profile_id={self.payment_profile_id!s}, ' - f'payer_id={self.payer_id!s}, ' - f'payer_reference={self.payer_reference!s}, ' - f'payment_collection_method={self.payment_collection_method!s}, ' - f'payer_attributes={self.payer_attributes!s}, ' - f'credit_card_attributes={self.credit_card_attributes!s}, ' - f'bank_account_attributes={self.bank_account_attributes!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' + f'payer_id={(self.payer_id if hasattr(self, "payer_id") else None)!s}, ' + f'payer_reference={(self.payer_reference if hasattr(self, "payer_reference") else None)!s}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!s}, ' + f'payer_attributes={(self.payer_attributes if hasattr(self, "payer_attributes") else None)!s}, ' + f'credit_card_attributes={(self.credit_card_attributes if hasattr(self, "credit_card_attributes") else None)!s}, ' + f'bank_account_attributes={(self.bank_account_attributes if hasattr(self, "bank_account_attributes") else None)!s}, ' f'subscriptions={self.subscriptions!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_signup_component.py b/advancedbilling/models/subscription_group_signup_component.py index a8faeb7c..7ecc6569 100644 --- a/advancedbilling/models/subscription_group_signup_component.py +++ b/advancedbilling/models/subscription_group_signup_component.py @@ -133,18 +133,18 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'allocated_quantity={self.allocated_quantity!r}, ' - f'unit_balance={self.unit_balance!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'custom_price={self.custom_price!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'allocated_quantity={(self.allocated_quantity if hasattr(self, "allocated_quantity") else None)!r}, ' + f'unit_balance={(self.unit_balance if hasattr(self, "unit_balance") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'allocated_quantity={self.allocated_quantity!s}, ' - f'unit_balance={self.unit_balance!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'custom_price={self.custom_price!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'allocated_quantity={(self.allocated_quantity if hasattr(self, "allocated_quantity") else None)!s}, ' + f'unit_balance={(self.unit_balance if hasattr(self, "unit_balance") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_signup_error.py b/advancedbilling/models/subscription_group_signup_error.py index 699987f7..6aaadc47 100644 --- a/advancedbilling/models/subscription_group_signup_error.py +++ b/advancedbilling/models/subscription_group_signup_error.py @@ -115,20 +115,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'subscriptions={self.subscriptions!r}, ' - f'payer_reference={self.payer_reference!r}, ' - f'payer={self.payer!r}, ' - f'subscription_group={self.subscription_group!r}, ' - f'payment_profile_id={self.payment_profile_id!r}, ' - f'payer_id={self.payer_id!r}, ' + f'subscriptions={(self.subscriptions if hasattr(self, "subscriptions") else None)!r}, ' + f'payer_reference={(self.payer_reference if hasattr(self, "payer_reference") else None)!r}, ' + f'payer={(self.payer if hasattr(self, "payer") else None)!r}, ' + f'subscription_group={(self.subscription_group if hasattr(self, "subscription_group") else None)!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' + f'payer_id={(self.payer_id if hasattr(self, "payer_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'subscriptions={self.subscriptions!s}, ' - f'payer_reference={self.payer_reference!s}, ' - f'payer={self.payer!s}, ' - f'subscription_group={self.subscription_group!s}, ' - f'payment_profile_id={self.payment_profile_id!s}, ' - f'payer_id={self.payer_id!s}, ' + f'subscriptions={(self.subscriptions if hasattr(self, "subscriptions") else None)!s}, ' + f'payer_reference={(self.payer_reference if hasattr(self, "payer_reference") else None)!s}, ' + f'payer={(self.payer if hasattr(self, "payer") else None)!s}, ' + f'subscription_group={(self.subscription_group if hasattr(self, "subscription_group") else None)!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' + f'payer_id={(self.payer_id if hasattr(self, "payer_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_signup_failure_data.py b/advancedbilling/models/subscription_group_signup_failure_data.py index e511a407..c8a6cb2a 100644 --- a/advancedbilling/models/subscription_group_signup_failure_data.py +++ b/advancedbilling/models/subscription_group_signup_failure_data.py @@ -161,24 +161,24 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'payer_id={self.payer_id!r}, ' - f'payer_reference={self.payer_reference!r}, ' - f'payment_profile_id={self.payment_profile_id!r}, ' - f'payment_collection_method={self.payment_collection_method!r}, ' - f'payer_attributes={self.payer_attributes!r}, ' - f'credit_card_attributes={self.credit_card_attributes!r}, ' - f'bank_account_attributes={self.bank_account_attributes!r}, ' - f'subscriptions={self.subscriptions!r}, ' + f'payer_id={(self.payer_id if hasattr(self, "payer_id") else None)!r}, ' + f'payer_reference={(self.payer_reference if hasattr(self, "payer_reference") else None)!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!r}, ' + f'payer_attributes={(self.payer_attributes if hasattr(self, "payer_attributes") else None)!r}, ' + f'credit_card_attributes={(self.credit_card_attributes if hasattr(self, "credit_card_attributes") else None)!r}, ' + f'bank_account_attributes={(self.bank_account_attributes if hasattr(self, "bank_account_attributes") else None)!r}, ' + f'subscriptions={(self.subscriptions if hasattr(self, "subscriptions") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'payer_id={self.payer_id!s}, ' - f'payer_reference={self.payer_reference!s}, ' - f'payment_profile_id={self.payment_profile_id!s}, ' - f'payment_collection_method={self.payment_collection_method!s}, ' - f'payer_attributes={self.payer_attributes!s}, ' - f'credit_card_attributes={self.credit_card_attributes!s}, ' - f'bank_account_attributes={self.bank_account_attributes!s}, ' - f'subscriptions={self.subscriptions!s}, ' + f'payer_id={(self.payer_id if hasattr(self, "payer_id") else None)!s}, ' + f'payer_reference={(self.payer_reference if hasattr(self, "payer_reference") else None)!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!s}, ' + f'payer_attributes={(self.payer_attributes if hasattr(self, "payer_attributes") else None)!s}, ' + f'credit_card_attributes={(self.credit_card_attributes if hasattr(self, "credit_card_attributes") else None)!s}, ' + f'bank_account_attributes={(self.bank_account_attributes if hasattr(self, "bank_account_attributes") else None)!s}, ' + f'subscriptions={(self.subscriptions if hasattr(self, "subscriptions") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_signup_item.py b/advancedbilling/models/subscription_group_signup_item.py index 9cc2c573..9dbd60c8 100644 --- a/advancedbilling/models/subscription_group_signup_item.py +++ b/advancedbilling/models/subscription_group_signup_item.py @@ -218,34 +218,34 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'product_handle={self.product_handle!r}, ' - f'product_id={self.product_id!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'product_price_point_handle={self.product_price_point_handle!r}, ' - f'offer_id={self.offer_id!r}, ' - f'reference={self.reference!r}, ' - f'primary={self.primary!r}, ' - f'currency={self.currency!r}, ' - f'coupon_codes={self.coupon_codes!r}, ' - f'components={self.components!r}, ' - f'custom_price={self.custom_price!r}, ' - f'calendar_billing={self.calendar_billing!r}, ' - f'metafields={self.metafields!r}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!r}, ' + f'offer_id={(self.offer_id if hasattr(self, "offer_id") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'primary={(self.primary if hasattr(self, "primary") else None)!r}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!r}, ' + f'coupon_codes={(self.coupon_codes if hasattr(self, "coupon_codes") else None)!r}, ' + f'components={(self.components if hasattr(self, "components") else None)!r}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!r}, ' + f'calendar_billing={(self.calendar_billing if hasattr(self, "calendar_billing") else None)!r}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'product_handle={self.product_handle!s}, ' - f'product_id={self.product_id!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'product_price_point_handle={self.product_price_point_handle!s}, ' - f'offer_id={self.offer_id!s}, ' - f'reference={self.reference!s}, ' - f'primary={self.primary!s}, ' - f'currency={self.currency!s}, ' - f'coupon_codes={self.coupon_codes!s}, ' - f'components={self.components!s}, ' - f'custom_price={self.custom_price!s}, ' - f'calendar_billing={self.calendar_billing!s}, ' - f'metafields={self.metafields!s}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!s}, ' + f'offer_id={(self.offer_id if hasattr(self, "offer_id") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'primary={(self.primary if hasattr(self, "primary") else None)!s}, ' + f'currency={(self.currency if hasattr(self, "currency") else None)!s}, ' + f'coupon_codes={(self.coupon_codes if hasattr(self, "coupon_codes") else None)!s}, ' + f'components={(self.components if hasattr(self, "components") else None)!s}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!s}, ' + f'calendar_billing={(self.calendar_billing if hasattr(self, "calendar_billing") else None)!s}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_signup_response.py b/advancedbilling/models/subscription_group_signup_response.py index 517c249c..d2403284 100644 --- a/advancedbilling/models/subscription_group_signup_response.py +++ b/advancedbilling/models/subscription_group_signup_response.py @@ -225,30 +225,30 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!r}, ' - f'scheme={self.scheme!r}, ' - f'customer_id={self.customer_id!r}, ' - f'payment_profile_id={self.payment_profile_id!r}, ' - f'subscription_ids={self.subscription_ids!r}, ' - f'primary_subscription_id={self.primary_subscription_id!r}, ' - f'next_assessment_at={self.next_assessment_at!r}, ' - f'state={self.state!r}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!r}, ' - f'subscriptions={self.subscriptions!r}, ' - f'payment_collection_method={self.payment_collection_method!r}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!r}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!r}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!r}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!r}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!r}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!r}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!r}, ' + f'subscriptions={(self.subscriptions if hasattr(self, "subscriptions") else None)!r}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'uid={self.uid!s}, ' - f'scheme={self.scheme!s}, ' - f'customer_id={self.customer_id!s}, ' - f'payment_profile_id={self.payment_profile_id!s}, ' - f'subscription_ids={self.subscription_ids!s}, ' - f'primary_subscription_id={self.primary_subscription_id!s}, ' - f'next_assessment_at={self.next_assessment_at!s}, ' - f'state={self.state!s}, ' - f'cancel_at_end_of_period={self.cancel_at_end_of_period!s}, ' - f'subscriptions={self.subscriptions!s}, ' - f'payment_collection_method={self.payment_collection_method!s}, ' + f'uid={(self.uid if hasattr(self, "uid") else None)!s}, ' + f'scheme={(self.scheme if hasattr(self, "scheme") else None)!s}, ' + f'customer_id={(self.customer_id if hasattr(self, "customer_id") else None)!s}, ' + f'payment_profile_id={(self.payment_profile_id if hasattr(self, "payment_profile_id") else None)!s}, ' + f'subscription_ids={(self.subscription_ids if hasattr(self, "subscription_ids") else None)!s}, ' + f'primary_subscription_id={(self.primary_subscription_id if hasattr(self, "primary_subscription_id") else None)!s}, ' + f'next_assessment_at={(self.next_assessment_at if hasattr(self, "next_assessment_at") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'cancel_at_end_of_period={(self.cancel_at_end_of_period if hasattr(self, "cancel_at_end_of_period") else None)!s}, ' + f'subscriptions={(self.subscriptions if hasattr(self, "subscriptions") else None)!s}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_subscription_error.py b/advancedbilling/models/subscription_group_subscription_error.py index 7f3b6c15..9938c640 100644 --- a/advancedbilling/models/subscription_group_subscription_error.py +++ b/advancedbilling/models/subscription_group_subscription_error.py @@ -134,24 +134,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'product={self.product!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'payment_profile={self.payment_profile!r}, ' - f'payment_profile_chargify_token={self.payment_profile_chargify_token!r}, ' - f'base={self.base!r}, ' - f'payment_profile_expiration_month={self.payment_profile_expiration_month!r}, ' - f'payment_profile_expiration_year={self.payment_profile_expiration_year!r}, ' - f'payment_profile_full_number={self.payment_profile_full_number!r}, ' + f'product={(self.product if hasattr(self, "product") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'payment_profile={(self.payment_profile if hasattr(self, "payment_profile") else None)!r}, ' + f'payment_profile_chargify_token={(self.payment_profile_chargify_token if hasattr(self, "payment_profile_chargify_token") else None)!r}, ' + f'base={(self.base if hasattr(self, "base") else None)!r}, ' + f'payment_profile_expiration_month={(self.payment_profile_expiration_month if hasattr(self, "payment_profile_expiration_month") else None)!r}, ' + f'payment_profile_expiration_year={(self.payment_profile_expiration_year if hasattr(self, "payment_profile_expiration_year") else None)!r}, ' + f'payment_profile_full_number={(self.payment_profile_full_number if hasattr(self, "payment_profile_full_number") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'product={self.product!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'payment_profile={self.payment_profile!s}, ' - f'payment_profile_chargify_token={self.payment_profile_chargify_token!s}, ' - f'base={self.base!s}, ' - f'payment_profile_expiration_month={self.payment_profile_expiration_month!s}, ' - f'payment_profile_expiration_year={self.payment_profile_expiration_year!s}, ' - f'payment_profile_full_number={self.payment_profile_full_number!s}, ' + f'product={(self.product if hasattr(self, "product") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'payment_profile={(self.payment_profile if hasattr(self, "payment_profile") else None)!s}, ' + f'payment_profile_chargify_token={(self.payment_profile_chargify_token if hasattr(self, "payment_profile_chargify_token") else None)!s}, ' + f'base={(self.base if hasattr(self, "base") else None)!s}, ' + f'payment_profile_expiration_month={(self.payment_profile_expiration_month if hasattr(self, "payment_profile_expiration_month") else None)!s}, ' + f'payment_profile_expiration_year={(self.payment_profile_expiration_year if hasattr(self, "payment_profile_expiration_year") else None)!s}, ' + f'payment_profile_full_number={(self.payment_profile_full_number if hasattr(self, "payment_profile_full_number") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_group_update_error.py b/advancedbilling/models/subscription_group_update_error.py index a48f2400..fd49b1a9 100644 --- a/advancedbilling/models/subscription_group_update_error.py +++ b/advancedbilling/models/subscription_group_update_error.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'members={self.members!r}, ' + f'members={(self.members if hasattr(self, "members") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'members={self.members!s}, ' + f'members={(self.members if hasattr(self, "members") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_included_coupon.py b/advancedbilling/models/subscription_included_coupon.py index cb58f44d..09b947c5 100644 --- a/advancedbilling/models/subscription_included_coupon.py +++ b/advancedbilling/models/subscription_included_coupon.py @@ -125,22 +125,22 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'code={self.code!r}, ' - f'use_count={self.use_count!r}, ' - f'uses_allowed={self.uses_allowed!r}, ' - f'expires_at={self.expires_at!r}, ' - f'recurring={self.recurring!r}, ' - f'amount_in_cents={self.amount_in_cents!r}, ' - f'percentage={self.percentage!r}, ' + f'code={(self.code if hasattr(self, "code") else None)!r}, ' + f'use_count={(self.use_count if hasattr(self, "use_count") else None)!r}, ' + f'uses_allowed={(self.uses_allowed if hasattr(self, "uses_allowed") else None)!r}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!r}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!r}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!r}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'code={self.code!s}, ' - f'use_count={self.use_count!s}, ' - f'uses_allowed={self.uses_allowed!s}, ' - f'expires_at={self.expires_at!s}, ' - f'recurring={self.recurring!s}, ' - f'amount_in_cents={self.amount_in_cents!s}, ' - f'percentage={self.percentage!s}, ' + f'code={(self.code if hasattr(self, "code") else None)!s}, ' + f'use_count={(self.use_count if hasattr(self, "use_count") else None)!s}, ' + f'uses_allowed={(self.uses_allowed if hasattr(self, "uses_allowed") else None)!s}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!s}, ' + f'recurring={(self.recurring if hasattr(self, "recurring") else None)!s}, ' + f'amount_in_cents={(self.amount_in_cents if hasattr(self, "amount_in_cents") else None)!s}, ' + f'percentage={(self.percentage if hasattr(self, "percentage") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_migration_preview.py b/advancedbilling/models/subscription_migration_preview.py index 5b1083db..483f21c6 100644 --- a/advancedbilling/models/subscription_migration_preview.py +++ b/advancedbilling/models/subscription_migration_preview.py @@ -101,16 +101,16 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'prorated_adjustment_in_cents={self.prorated_adjustment_in_cents!r}, ' - f'charge_in_cents={self.charge_in_cents!r}, ' - f'payment_due_in_cents={self.payment_due_in_cents!r}, ' - f'credit_applied_in_cents={self.credit_applied_in_cents!r}, ' + f'prorated_adjustment_in_cents={(self.prorated_adjustment_in_cents if hasattr(self, "prorated_adjustment_in_cents") else None)!r}, ' + f'charge_in_cents={(self.charge_in_cents if hasattr(self, "charge_in_cents") else None)!r}, ' + f'payment_due_in_cents={(self.payment_due_in_cents if hasattr(self, "payment_due_in_cents") else None)!r}, ' + f'credit_applied_in_cents={(self.credit_applied_in_cents if hasattr(self, "credit_applied_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'prorated_adjustment_in_cents={self.prorated_adjustment_in_cents!s}, ' - f'charge_in_cents={self.charge_in_cents!s}, ' - f'payment_due_in_cents={self.payment_due_in_cents!s}, ' - f'credit_applied_in_cents={self.credit_applied_in_cents!s}, ' + f'prorated_adjustment_in_cents={(self.prorated_adjustment_in_cents if hasattr(self, "prorated_adjustment_in_cents") else None)!s}, ' + f'charge_in_cents={(self.charge_in_cents if hasattr(self, "charge_in_cents") else None)!s}, ' + f'payment_due_in_cents={(self.payment_due_in_cents if hasattr(self, "payment_due_in_cents") else None)!s}, ' + f'credit_applied_in_cents={(self.credit_applied_in_cents if hasattr(self, "credit_applied_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_migration_preview_options.py b/advancedbilling/models/subscription_migration_preview_options.py index cbaf4c57..6722d7db 100644 --- a/advancedbilling/models/subscription_migration_preview_options.py +++ b/advancedbilling/models/subscription_migration_preview_options.py @@ -163,28 +163,28 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'product_id={self.product_id!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'include_trial={self.include_trial!r}, ' - f'include_initial_charge={self.include_initial_charge!r}, ' - f'include_coupons={self.include_coupons!r}, ' - f'preserve_period={self.preserve_period!r}, ' - f'product_handle={self.product_handle!r}, ' - f'product_price_point_handle={self.product_price_point_handle!r}, ' - f'proration={self.proration!r}, ' - f'proration_date={self.proration_date!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'include_trial={(self.include_trial if hasattr(self, "include_trial") else None)!r}, ' + f'include_initial_charge={(self.include_initial_charge if hasattr(self, "include_initial_charge") else None)!r}, ' + f'include_coupons={(self.include_coupons if hasattr(self, "include_coupons") else None)!r}, ' + f'preserve_period={(self.preserve_period if hasattr(self, "preserve_period") else None)!r}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!r}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!r}, ' + f'proration={(self.proration if hasattr(self, "proration") else None)!r}, ' + f'proration_date={(self.proration_date if hasattr(self, "proration_date") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'product_id={self.product_id!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'include_trial={self.include_trial!s}, ' - f'include_initial_charge={self.include_initial_charge!s}, ' - f'include_coupons={self.include_coupons!s}, ' - f'preserve_period={self.preserve_period!s}, ' - f'product_handle={self.product_handle!s}, ' - f'product_price_point_handle={self.product_price_point_handle!s}, ' - f'proration={self.proration!s}, ' - f'proration_date={self.proration_date!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'include_trial={(self.include_trial if hasattr(self, "include_trial") else None)!s}, ' + f'include_initial_charge={(self.include_initial_charge if hasattr(self, "include_initial_charge") else None)!s}, ' + f'include_coupons={(self.include_coupons if hasattr(self, "include_coupons") else None)!s}, ' + f'preserve_period={(self.preserve_period if hasattr(self, "preserve_period") else None)!s}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!s}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!s}, ' + f'proration={(self.proration if hasattr(self, "proration") else None)!s}, ' + f'proration_date={(self.proration_date if hasattr(self, "proration_date") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_mrr.py b/advancedbilling/models/subscription_mrr.py index 55b7f807..2901449a 100644 --- a/advancedbilling/models/subscription_mrr.py +++ b/advancedbilling/models/subscription_mrr.py @@ -87,12 +87,12 @@ def __repr__(self): return (f'{self.__class__.__name__}(' f'subscription_id={self.subscription_id!r}, ' f'mrr_amount_in_cents={self.mrr_amount_in_cents!r}, ' - f'breakouts={self.breakouts!r}, ' + f'breakouts={(self.breakouts if hasattr(self, "breakouts") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'subscription_id={self.subscription_id!s}, ' f'mrr_amount_in_cents={self.mrr_amount_in_cents!s}, ' - f'breakouts={self.breakouts!s}, ' + f'breakouts={(self.breakouts if hasattr(self, "breakouts") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_note.py b/advancedbilling/models/subscription_note.py index 5eb40f92..9ea52536 100644 --- a/advancedbilling/models/subscription_note.py +++ b/advancedbilling/models/subscription_note.py @@ -111,20 +111,20 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'body={self.body!r}, ' - f'subscription_id={self.subscription_id!r}, ' - f'created_at={self.created_at!r}, ' - f'updated_at={self.updated_at!r}, ' - f'sticky={self.sticky!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'body={(self.body if hasattr(self, "body") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!r}, ' + f'sticky={(self.sticky if hasattr(self, "sticky") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'body={self.body!s}, ' - f'subscription_id={self.subscription_id!s}, ' - f'created_at={self.created_at!s}, ' - f'updated_at={self.updated_at!s}, ' - f'sticky={self.sticky!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'body={(self.body if hasattr(self, "body") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'updated_at={(self.updated_at if hasattr(self, "updated_at") else None)!s}, ' + f'sticky={(self.sticky if hasattr(self, "sticky") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_preview.py b/advancedbilling/models/subscription_preview.py index 6b1b9e74..ecb7dda5 100644 --- a/advancedbilling/models/subscription_preview.py +++ b/advancedbilling/models/subscription_preview.py @@ -82,12 +82,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'current_billing_manifest={self.current_billing_manifest!r}, ' - f'next_billing_manifest={self.next_billing_manifest!r}, ' + f'current_billing_manifest={(self.current_billing_manifest if hasattr(self, "current_billing_manifest") else None)!r}, ' + f'next_billing_manifest={(self.next_billing_manifest if hasattr(self, "next_billing_manifest") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'current_billing_manifest={self.current_billing_manifest!s}, ' - f'next_billing_manifest={self.next_billing_manifest!s}, ' + f'current_billing_manifest={(self.current_billing_manifest if hasattr(self, "current_billing_manifest") else None)!s}, ' + f'next_billing_manifest={(self.next_billing_manifest if hasattr(self, "next_billing_manifest") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_product_migration.py b/advancedbilling/models/subscription_product_migration.py index 6dfcae42..b3a8cf5d 100644 --- a/advancedbilling/models/subscription_product_migration.py +++ b/advancedbilling/models/subscription_product_migration.py @@ -154,26 +154,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'product_id={self.product_id!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'include_trial={self.include_trial!r}, ' - f'include_initial_charge={self.include_initial_charge!r}, ' - f'include_coupons={self.include_coupons!r}, ' - f'preserve_period={self.preserve_period!r}, ' - f'product_handle={self.product_handle!r}, ' - f'product_price_point_handle={self.product_price_point_handle!r}, ' - f'proration={self.proration!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'include_trial={(self.include_trial if hasattr(self, "include_trial") else None)!r}, ' + f'include_initial_charge={(self.include_initial_charge if hasattr(self, "include_initial_charge") else None)!r}, ' + f'include_coupons={(self.include_coupons if hasattr(self, "include_coupons") else None)!r}, ' + f'preserve_period={(self.preserve_period if hasattr(self, "preserve_period") else None)!r}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!r}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!r}, ' + f'proration={(self.proration if hasattr(self, "proration") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'product_id={self.product_id!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'include_trial={self.include_trial!s}, ' - f'include_initial_charge={self.include_initial_charge!s}, ' - f'include_coupons={self.include_coupons!s}, ' - f'preserve_period={self.preserve_period!s}, ' - f'product_handle={self.product_handle!s}, ' - f'product_price_point_handle={self.product_price_point_handle!s}, ' - f'proration={self.proration!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'include_trial={(self.include_trial if hasattr(self, "include_trial") else None)!s}, ' + f'include_initial_charge={(self.include_initial_charge if hasattr(self, "include_initial_charge") else None)!s}, ' + f'include_coupons={(self.include_coupons if hasattr(self, "include_coupons") else None)!s}, ' + f'preserve_period={(self.preserve_period if hasattr(self, "preserve_period") else None)!s}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!s}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!s}, ' + f'proration={(self.proration if hasattr(self, "proration") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/subscription_response.py b/advancedbilling/models/subscription_response.py index 430253da..5ef9a3c7 100644 --- a/advancedbilling/models/subscription_response.py +++ b/advancedbilling/models/subscription_response.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'subscription={self.subscription!r}, ' + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'subscription={self.subscription!s}, ' + f'subscription={(self.subscription if hasattr(self, "subscription") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/tax_configuration.py b/advancedbilling/models/tax_configuration.py index 0a6c6950..8d8e4694 100644 --- a/advancedbilling/models/tax_configuration.py +++ b/advancedbilling/models/tax_configuration.py @@ -91,14 +91,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'kind={self.kind!r}, ' - f'destination_address={self.destination_address!r}, ' - f'fully_configured={self.fully_configured!r}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!r}, ' + f'destination_address={(self.destination_address if hasattr(self, "destination_address") else None)!r}, ' + f'fully_configured={(self.fully_configured if hasattr(self, "fully_configured") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'kind={self.kind!s}, ' - f'destination_address={self.destination_address!s}, ' - f'fully_configured={self.fully_configured!s}, ' + f'kind={(self.kind if hasattr(self, "kind") else None)!s}, ' + f'destination_address={(self.destination_address if hasattr(self, "destination_address") else None)!s}, ' + f'fully_configured={(self.fully_configured if hasattr(self, "fully_configured") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_allocation_expiration_date.py b/advancedbilling/models/update_allocation_expiration_date.py index 30a9057e..a6eac6c5 100644 --- a/advancedbilling/models/update_allocation_expiration_date.py +++ b/advancedbilling/models/update_allocation_expiration_date.py @@ -73,10 +73,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'allocation={self.allocation!r}, ' + f'allocation={(self.allocation if hasattr(self, "allocation") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'allocation={self.allocation!s}, ' + f'allocation={(self.allocation if hasattr(self, "allocation") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_component.py b/advancedbilling/models/update_component.py index ae6b5b5a..b4e79891 100644 --- a/advancedbilling/models/update_component.py +++ b/advancedbilling/models/update_component.py @@ -152,26 +152,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'handle={self.handle!r}, ' - f'name={self.name!r}, ' - f'description={self.description!r}, ' - f'accounting_code={self.accounting_code!r}, ' - f'taxable={self.taxable!r}, ' - f'tax_code={self.tax_code!r}, ' - f'item_category={self.item_category!r}, ' - f'display_on_hosted_page={self.display_on_hosted_page!r}, ' - f'upgrade_charge={self.upgrade_charge!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!r}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!r}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!r}, ' + f'item_category={(self.item_category if hasattr(self, "item_category") else None)!r}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!r}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'handle={self.handle!s}, ' - f'name={self.name!s}, ' - f'description={self.description!s}, ' - f'accounting_code={self.accounting_code!s}, ' - f'taxable={self.taxable!s}, ' - f'tax_code={self.tax_code!s}, ' - f'item_category={self.item_category!s}, ' - f'display_on_hosted_page={self.display_on_hosted_page!s}, ' - f'upgrade_charge={self.upgrade_charge!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'accounting_code={(self.accounting_code if hasattr(self, "accounting_code") else None)!s}, ' + f'taxable={(self.taxable if hasattr(self, "taxable") else None)!s}, ' + f'tax_code={(self.tax_code if hasattr(self, "tax_code") else None)!s}, ' + f'item_category={(self.item_category if hasattr(self, "item_category") else None)!s}, ' + f'display_on_hosted_page={(self.display_on_hosted_page if hasattr(self, "display_on_hosted_page") else None)!s}, ' + f'upgrade_charge={(self.upgrade_charge if hasattr(self, "upgrade_charge") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_component_price_point.py b/advancedbilling/models/update_component_price_point.py index 9ce073a2..166a9f4a 100644 --- a/advancedbilling/models/update_component_price_point.py +++ b/advancedbilling/models/update_component_price_point.py @@ -147,24 +147,24 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!r}, ' - f'handle={self.handle!r}, ' - f'pricing_scheme={self.pricing_scheme!r}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!r}, ' - f'tax_included={self.tax_included!r}, ' - f'interval={self.interval!r}, ' - f'interval_unit={self.interval_unit!r}, ' - f'prices={self.prices!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!r}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!r}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!r}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!r}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'name={self.name!s}, ' - f'handle={self.handle!s}, ' - f'pricing_scheme={self.pricing_scheme!s}, ' - f'use_site_exchange_rate={self.use_site_exchange_rate!s}, ' - f'tax_included={self.tax_included!s}, ' - f'interval={self.interval!s}, ' - f'interval_unit={self.interval_unit!s}, ' - f'prices={self.prices!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'pricing_scheme={(self.pricing_scheme if hasattr(self, "pricing_scheme") else None)!s}, ' + f'use_site_exchange_rate={(self.use_site_exchange_rate if hasattr(self, "use_site_exchange_rate") else None)!s}, ' + f'tax_included={(self.tax_included if hasattr(self, "tax_included") else None)!s}, ' + f'interval={(self.interval if hasattr(self, "interval") else None)!s}, ' + f'interval_unit={(self.interval_unit if hasattr(self, "interval_unit") else None)!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_component_price_point_request.py b/advancedbilling/models/update_component_price_point_request.py index f00afb72..4efc9e6e 100644 --- a/advancedbilling/models/update_component_price_point_request.py +++ b/advancedbilling/models/update_component_price_point_request.py @@ -73,10 +73,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'price_point={self.price_point!r}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'price_point={self.price_point!s}, ' + f'price_point={(self.price_point if hasattr(self, "price_point") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_customer.py b/advancedbilling/models/update_customer.py index 372f1ea6..8c8b99d6 100644 --- a/advancedbilling/models/update_customer.py +++ b/advancedbilling/models/update_customer.py @@ -230,48 +230,48 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'email={self.email!r}, ' - f'cc_emails={self.cc_emails!r}, ' - f'organization={self.organization!r}, ' - f'reference={self.reference!r}, ' - f'address={self.address!r}, ' - f'address_2={self.address_2!r}, ' - f'city={self.city!r}, ' - f'state={self.state!r}, ' - f'zip={self.zip!r}, ' - f'country={self.country!r}, ' - f'phone={self.phone!r}, ' - f'locale={self.locale!r}, ' - f'vat_number={self.vat_number!r}, ' - f'tax_exempt={self.tax_exempt!r}, ' - f'tax_exempt_reason={self.tax_exempt_reason!r}, ' - f'parent_id={self.parent_id!r}, ' - f'verified={self.verified!r}, ' - f'salesforce_id={self.salesforce_id!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'email={(self.email if hasattr(self, "email") else None)!r}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!r}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'address={(self.address if hasattr(self, "address") else None)!r}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!r}, ' + f'city={(self.city if hasattr(self, "city") else None)!r}, ' + f'state={(self.state if hasattr(self, "state") else None)!r}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!r}, ' + f'country={(self.country if hasattr(self, "country") else None)!r}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!r}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!r}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!r}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!r}, ' + f'tax_exempt_reason={(self.tax_exempt_reason if hasattr(self, "tax_exempt_reason") else None)!r}, ' + f'parent_id={(self.parent_id if hasattr(self, "parent_id") else None)!r}, ' + f'verified={(self.verified if hasattr(self, "verified") else None)!r}, ' + f'salesforce_id={(self.salesforce_id if hasattr(self, "salesforce_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'email={self.email!s}, ' - f'cc_emails={self.cc_emails!s}, ' - f'organization={self.organization!s}, ' - f'reference={self.reference!s}, ' - f'address={self.address!s}, ' - f'address_2={self.address_2!s}, ' - f'city={self.city!s}, ' - f'state={self.state!s}, ' - f'zip={self.zip!s}, ' - f'country={self.country!s}, ' - f'phone={self.phone!s}, ' - f'locale={self.locale!s}, ' - f'vat_number={self.vat_number!s}, ' - f'tax_exempt={self.tax_exempt!s}, ' - f'tax_exempt_reason={self.tax_exempt_reason!s}, ' - f'parent_id={self.parent_id!s}, ' - f'verified={self.verified!s}, ' - f'salesforce_id={self.salesforce_id!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'email={(self.email if hasattr(self, "email") else None)!s}, ' + f'cc_emails={(self.cc_emails if hasattr(self, "cc_emails") else None)!s}, ' + f'organization={(self.organization if hasattr(self, "organization") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'address={(self.address if hasattr(self, "address") else None)!s}, ' + f'address_2={(self.address_2 if hasattr(self, "address_2") else None)!s}, ' + f'city={(self.city if hasattr(self, "city") else None)!s}, ' + f'state={(self.state if hasattr(self, "state") else None)!s}, ' + f'zip={(self.zip if hasattr(self, "zip") else None)!s}, ' + f'country={(self.country if hasattr(self, "country") else None)!s}, ' + f'phone={(self.phone if hasattr(self, "phone") else None)!s}, ' + f'locale={(self.locale if hasattr(self, "locale") else None)!s}, ' + f'vat_number={(self.vat_number if hasattr(self, "vat_number") else None)!s}, ' + f'tax_exempt={(self.tax_exempt if hasattr(self, "tax_exempt") else None)!s}, ' + f'tax_exempt_reason={(self.tax_exempt_reason if hasattr(self, "tax_exempt_reason") else None)!s}, ' + f'parent_id={(self.parent_id if hasattr(self, "parent_id") else None)!s}, ' + f'verified={(self.verified if hasattr(self, "verified") else None)!s}, ' + f'salesforce_id={(self.salesforce_id if hasattr(self, "salesforce_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_metadata.py b/advancedbilling/models/update_metadata.py index 0e5dbab5..aba9583b 100644 --- a/advancedbilling/models/update_metadata.py +++ b/advancedbilling/models/update_metadata.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'current_name={self.current_name!r}, ' - f'name={self.name!r}, ' - f'value={self.value!r}, ' + f'current_name={(self.current_name if hasattr(self, "current_name") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'value={(self.value if hasattr(self, "value") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'current_name={self.current_name!s}, ' - f'name={self.name!s}, ' - f'value={self.value!s}, ' + f'current_name={(self.current_name if hasattr(self, "current_name") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'value={(self.value if hasattr(self, "value") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_metadata_request.py b/advancedbilling/models/update_metadata_request.py index 9cb17766..c256748e 100644 --- a/advancedbilling/models/update_metadata_request.py +++ b/advancedbilling/models/update_metadata_request.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'metadata={self.metadata!r}, ' + f'metadata={(self.metadata if hasattr(self, "metadata") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'metadata={self.metadata!s}, ' + f'metadata={(self.metadata if hasattr(self, "metadata") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_metafield.py b/advancedbilling/models/update_metafield.py index 9ba4fbb4..4c6f7ced 100644 --- a/advancedbilling/models/update_metafield.py +++ b/advancedbilling/models/update_metafield.py @@ -133,18 +133,18 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'current_name={self.current_name!r}, ' - f'name={self.name!r}, ' - f'scope={self.scope!r}, ' - f'input_type={self.input_type!r}, ' - f'enum={self.enum!r}, ' + f'current_name={(self.current_name if hasattr(self, "current_name") else None)!r}, ' + f'name={(self.name if hasattr(self, "name") else None)!r}, ' + f'scope={(self.scope if hasattr(self, "scope") else None)!r}, ' + f'input_type={(self.input_type if hasattr(self, "input_type") else None)!r}, ' + f'enum={(self.enum if hasattr(self, "enum") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'current_name={self.current_name!s}, ' - f'name={self.name!s}, ' - f'scope={self.scope!s}, ' - f'input_type={self.input_type!s}, ' - f'enum={self.enum!s}, ' + f'current_name={(self.current_name if hasattr(self, "current_name") else None)!s}, ' + f'name={(self.name if hasattr(self, "name") else None)!s}, ' + f'scope={(self.scope if hasattr(self, "scope") else None)!s}, ' + f'input_type={(self.input_type if hasattr(self, "input_type") else None)!s}, ' + f'enum={(self.enum if hasattr(self, "enum") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_metafields_request.py b/advancedbilling/models/update_metafields_request.py index 487b497c..ebe1dfbe 100644 --- a/advancedbilling/models/update_metafields_request.py +++ b/advancedbilling/models/update_metafields_request.py @@ -73,10 +73,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'metafields={self.metafields!r}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'metafields={self.metafields!s}, ' + f'metafields={(self.metafields if hasattr(self, "metafields") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_payment_profile.py b/advancedbilling/models/update_payment_profile.py index a58ebfc1..06f796db 100644 --- a/advancedbilling/models/update_payment_profile.py +++ b/advancedbilling/models/update_payment_profile.py @@ -193,34 +193,34 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!r}, ' - f'last_name={self.last_name!r}, ' - f'full_number={self.full_number!r}, ' - f'card_type={self.card_type!r}, ' - f'expiration_month={self.expiration_month!r}, ' - f'expiration_year={self.expiration_year!r}, ' - f'current_vault={self.current_vault!r}, ' - f'billing_address={self.billing_address!r}, ' - f'billing_city={self.billing_city!r}, ' - f'billing_state={self.billing_state!r}, ' - f'billing_zip={self.billing_zip!r}, ' - f'billing_country={self.billing_country!r}, ' - f'billing_address_2={self.billing_address_2!r}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!r}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!r}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!r}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!r}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!r}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!r}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!r}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!r}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!r}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!r}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!r}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!r}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'first_name={self.first_name!s}, ' - f'last_name={self.last_name!s}, ' - f'full_number={self.full_number!s}, ' - f'card_type={self.card_type!s}, ' - f'expiration_month={self.expiration_month!s}, ' - f'expiration_year={self.expiration_year!s}, ' - f'current_vault={self.current_vault!s}, ' - f'billing_address={self.billing_address!s}, ' - f'billing_city={self.billing_city!s}, ' - f'billing_state={self.billing_state!s}, ' - f'billing_zip={self.billing_zip!s}, ' - f'billing_country={self.billing_country!s}, ' - f'billing_address_2={self.billing_address_2!s}, ' + f'first_name={(self.first_name if hasattr(self, "first_name") else None)!s}, ' + f'last_name={(self.last_name if hasattr(self, "last_name") else None)!s}, ' + f'full_number={(self.full_number if hasattr(self, "full_number") else None)!s}, ' + f'card_type={(self.card_type if hasattr(self, "card_type") else None)!s}, ' + f'expiration_month={(self.expiration_month if hasattr(self, "expiration_month") else None)!s}, ' + f'expiration_year={(self.expiration_year if hasattr(self, "expiration_year") else None)!s}, ' + f'current_vault={(self.current_vault if hasattr(self, "current_vault") else None)!s}, ' + f'billing_address={(self.billing_address if hasattr(self, "billing_address") else None)!s}, ' + f'billing_city={(self.billing_city if hasattr(self, "billing_city") else None)!s}, ' + f'billing_state={(self.billing_state if hasattr(self, "billing_state") else None)!s}, ' + f'billing_zip={(self.billing_zip if hasattr(self, "billing_zip") else None)!s}, ' + f'billing_country={(self.billing_country if hasattr(self, "billing_country") else None)!s}, ' + f'billing_address_2={(self.billing_address_2 if hasattr(self, "billing_address_2") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_price.py b/advancedbilling/models/update_price.py index 4176809f..bcecbb71 100644 --- a/advancedbilling/models/update_price.py +++ b/advancedbilling/models/update_price.py @@ -107,18 +107,18 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'ending_quantity={self.ending_quantity!r}, ' - f'unit_price={self.unit_price!r}, ' - f'destroy={self.destroy!r}, ' - f'starting_quantity={self.starting_quantity!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!r}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!r}, ' + f'destroy={(self.destroy if hasattr(self, "destroy") else None)!r}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'ending_quantity={self.ending_quantity!s}, ' - f'unit_price={self.unit_price!s}, ' - f'destroy={self.destroy!s}, ' - f'starting_quantity={self.starting_quantity!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'ending_quantity={(self.ending_quantity if hasattr(self, "ending_quantity") else None)!s}, ' + f'unit_price={(self.unit_price if hasattr(self, "unit_price") else None)!s}, ' + f'destroy={(self.destroy if hasattr(self, "destroy") else None)!s}, ' + f'starting_quantity={(self.starting_quantity if hasattr(self, "starting_quantity") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_product_price_point.py b/advancedbilling/models/update_product_price_point.py index b2c98c1a..34b38277 100644 --- a/advancedbilling/models/update_product_price_point.py +++ b/advancedbilling/models/update_product_price_point.py @@ -79,12 +79,12 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'handle={self.handle!r}, ' - f'price_in_cents={self.price_in_cents!r}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!r}, ' + f'price_in_cents={(self.price_in_cents if hasattr(self, "price_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'handle={self.handle!s}, ' - f'price_in_cents={self.price_in_cents!s}, ' + f'handle={(self.handle if hasattr(self, "handle") else None)!s}, ' + f'price_in_cents={(self.price_in_cents if hasattr(self, "price_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_reason_code.py b/advancedbilling/models/update_reason_code.py index 752e9835..9983df4f 100644 --- a/advancedbilling/models/update_reason_code.py +++ b/advancedbilling/models/update_reason_code.py @@ -87,14 +87,14 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'code={self.code!r}, ' - f'description={self.description!r}, ' - f'position={self.position!r}, ' + f'code={(self.code if hasattr(self, "code") else None)!r}, ' + f'description={(self.description if hasattr(self, "description") else None)!r}, ' + f'position={(self.position if hasattr(self, "position") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'code={self.code!s}, ' - f'description={self.description!s}, ' - f'position={self.position!s}, ' + f'code={(self.code if hasattr(self, "code") else None)!s}, ' + f'description={(self.description if hasattr(self, "description") else None)!s}, ' + f'position={(self.position if hasattr(self, "position") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_segment.py b/advancedbilling/models/update_segment.py index be64042f..fe610347 100644 --- a/advancedbilling/models/update_segment.py +++ b/advancedbilling/models/update_segment.py @@ -87,11 +87,11 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' f'pricing_scheme={self.pricing_scheme!r}, ' - f'prices={self.prices!r}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' f'pricing_scheme={self.pricing_scheme!s}, ' - f'prices={self.prices!s}, ' + f'prices={(self.prices if hasattr(self, "prices") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_subscription.py b/advancedbilling/models/update_subscription.py index fec821a8..a22d64a6 100644 --- a/advancedbilling/models/update_subscription.py +++ b/advancedbilling/models/update_subscription.py @@ -29,7 +29,36 @@ class UpdateSubscription(object): next_product_price_point_id (str): The model property of type str. snap_day (SnapDay | int | None): Use for subscriptions with product eligible for calendar billing only. Value can be 1-28 or 'end'. + initial_billing_at (datetime): (Optional) Set this attribute to a + future date/time to update a subscription in the Awaiting Signup + Date state, to Awaiting Signup. In the Awaiting Signup state, a + subscription behaves like any other. It can be canceled, allocated + to, or have its billing date changed. etc. When the + `initial_billing_at` date hits, the subscription will transition + to the expected state. If the product has a trial, the + subscription will enter a trial, otherwise it will go active. + Setup fees will be respected either before or after the trial, as + configured on the price point. If the payment is due at the + initial_billing_at and it fails the subscription will be + immediately canceled. You can omit the initial_billing_at date to + activate the subscription immediately. See the [subscription + import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213- + Advanced-Billing-Subscription-Imports#date-format) documentation + for more information about Date/Time formats. + defer_signup (bool): (Optional) Set this attribute to true to move the + subscription from Awaiting Signup, to Awaiting Signup Date. Use + this when you want to update a subscription that has an unknown + initial billing date. When the first billing date is known, update + a subscription to set the `initial_billing_at` date. The + subscription moves to the awaiting signup with a scheduled initial + billing date. You can omit the initial_billing_at date to activate + the subscription immediately. See [Subscription + States](https://maxio-chargify.zendesk.com/hc/en-us/articles/540422 + 2005773-Subscription-States) for more information. next_billing_at (datetime): The model property of type datetime. + expires_at (datetime): Timestamp giving the expiration date of this + subscription (if any). You may manually change the expiration date + at any point during a subscription period. payment_collection_method (str): The model property of type str. receives_invoice_emails (bool): The model property of type bool. net_terms (str | int | None): The model property of type str | int | @@ -65,7 +94,10 @@ class UpdateSubscription(object): "next_product_id": 'next_product_id', "next_product_price_point_id": 'next_product_price_point_id', "snap_day": 'snap_day', + "initial_billing_at": 'initial_billing_at', + "defer_signup": 'defer_signup', "next_billing_at": 'next_billing_at', + "expires_at": 'expires_at', "payment_collection_method": 'payment_collection_method', "receives_invoice_emails": 'receives_invoice_emails', "net_terms": 'net_terms', @@ -87,7 +119,10 @@ class UpdateSubscription(object): 'next_product_id', 'next_product_price_point_id', 'snap_day', + 'initial_billing_at', + 'defer_signup', 'next_billing_at', + 'expires_at', 'payment_collection_method', 'receives_invoice_emails', 'net_terms', @@ -113,7 +148,10 @@ def __init__(self, next_product_id=APIHelper.SKIP, next_product_price_point_id=APIHelper.SKIP, snap_day=APIHelper.SKIP, + initial_billing_at=APIHelper.SKIP, + defer_signup=False, next_billing_at=APIHelper.SKIP, + expires_at=APIHelper.SKIP, payment_collection_method=APIHelper.SKIP, receives_invoice_emails=APIHelper.SKIP, net_terms=APIHelper.SKIP, @@ -143,8 +181,13 @@ def __init__(self, self.next_product_price_point_id = next_product_price_point_id if snap_day is not APIHelper.SKIP: self.snap_day = snap_day + if initial_billing_at is not APIHelper.SKIP: + self.initial_billing_at = APIHelper.apply_datetime_converter(initial_billing_at, APIHelper.RFC3339DateTime) if initial_billing_at else None + self.defer_signup = defer_signup if next_billing_at is not APIHelper.SKIP: self.next_billing_at = APIHelper.apply_datetime_converter(next_billing_at, APIHelper.RFC3339DateTime) if next_billing_at else None + if expires_at is not APIHelper.SKIP: + self.expires_at = APIHelper.apply_datetime_converter(expires_at, APIHelper.RFC3339DateTime) if expires_at else None if payment_collection_method is not APIHelper.SKIP: self.payment_collection_method = payment_collection_method if receives_invoice_emails is not APIHelper.SKIP: @@ -200,7 +243,10 @@ def from_dictionary(cls, next_product_id = dictionary.get("next_product_id") if dictionary.get("next_product_id") else APIHelper.SKIP next_product_price_point_id = dictionary.get("next_product_price_point_id") if dictionary.get("next_product_price_point_id") else APIHelper.SKIP snap_day = APIHelper.deserialize_union_type(UnionTypeLookUp.get('UpdateSubscriptionSnapDay'), dictionary.get('snap_day'), False) if dictionary.get('snap_day') is not None else APIHelper.SKIP + initial_billing_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("initial_billing_at")).datetime if dictionary.get("initial_billing_at") else APIHelper.SKIP + defer_signup = dictionary.get("defer_signup") if dictionary.get("defer_signup") else False next_billing_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("next_billing_at")).datetime if dictionary.get("next_billing_at") else APIHelper.SKIP + expires_at = APIHelper.RFC3339DateTime.from_value(dictionary.get("expires_at")).datetime if dictionary.get("expires_at") else APIHelper.SKIP payment_collection_method = dictionary.get("payment_collection_method") if dictionary.get("payment_collection_method") else APIHelper.SKIP receives_invoice_emails = dictionary.get("receives_invoice_emails") if "receives_invoice_emails" in dictionary.keys() else APIHelper.SKIP net_terms = APIHelper.deserialize_union_type(UnionTypeLookUp.get('UpdateSubscriptionNetTerms'), dictionary.get('net_terms'), False) if dictionary.get('net_terms') is not None else APIHelper.SKIP @@ -226,7 +272,10 @@ def from_dictionary(cls, next_product_id, next_product_price_point_id, snap_day, + initial_billing_at, + defer_signup, next_billing_at, + expires_at, payment_collection_method, receives_invoice_emails, net_terms, @@ -242,46 +291,52 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'credit_card_attributes={self.credit_card_attributes!r}, ' - f'product_handle={self.product_handle!r}, ' - f'product_id={self.product_id!r}, ' - f'product_change_delayed={self.product_change_delayed!r}, ' - f'next_product_id={self.next_product_id!r}, ' - f'next_product_price_point_id={self.next_product_price_point_id!r}, ' - f'snap_day={self.snap_day!r}, ' - f'next_billing_at={self.next_billing_at!r}, ' - f'payment_collection_method={self.payment_collection_method!r}, ' - f'receives_invoice_emails={self.receives_invoice_emails!r}, ' - f'net_terms={self.net_terms!r}, ' - f'stored_credential_transaction_id={self.stored_credential_transaction_id!r}, ' - f'reference={self.reference!r}, ' - f'custom_price={self.custom_price!r}, ' - f'components={self.components!r}, ' - f'dunning_communication_delay_enabled={self.dunning_communication_delay_enabled!r}, ' - f'dunning_communication_delay_time_zone={self.dunning_communication_delay_time_zone!r}, ' - f'product_price_point_id={self.product_price_point_id!r}, ' - f'product_price_point_handle={self.product_price_point_handle!r}, ' + f'credit_card_attributes={(self.credit_card_attributes if hasattr(self, "credit_card_attributes") else None)!r}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!r}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!r}, ' + f'product_change_delayed={(self.product_change_delayed if hasattr(self, "product_change_delayed") else None)!r}, ' + f'next_product_id={(self.next_product_id if hasattr(self, "next_product_id") else None)!r}, ' + f'next_product_price_point_id={(self.next_product_price_point_id if hasattr(self, "next_product_price_point_id") else None)!r}, ' + f'snap_day={(self.snap_day if hasattr(self, "snap_day") else None)!r}, ' + f'initial_billing_at={(self.initial_billing_at if hasattr(self, "initial_billing_at") else None)!r}, ' + f'defer_signup={(self.defer_signup if hasattr(self, "defer_signup") else None)!r}, ' + f'next_billing_at={(self.next_billing_at if hasattr(self, "next_billing_at") else None)!r}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!r}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!r}, ' + f'receives_invoice_emails={(self.receives_invoice_emails if hasattr(self, "receives_invoice_emails") else None)!r}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!r}, ' + f'stored_credential_transaction_id={(self.stored_credential_transaction_id if hasattr(self, "stored_credential_transaction_id") else None)!r}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!r}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!r}, ' + f'components={(self.components if hasattr(self, "components") else None)!r}, ' + f'dunning_communication_delay_enabled={(self.dunning_communication_delay_enabled if hasattr(self, "dunning_communication_delay_enabled") else None)!r}, ' + f'dunning_communication_delay_time_zone={(self.dunning_communication_delay_time_zone if hasattr(self, "dunning_communication_delay_time_zone") else None)!r}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!r}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'credit_card_attributes={self.credit_card_attributes!s}, ' - f'product_handle={self.product_handle!s}, ' - f'product_id={self.product_id!s}, ' - f'product_change_delayed={self.product_change_delayed!s}, ' - f'next_product_id={self.next_product_id!s}, ' - f'next_product_price_point_id={self.next_product_price_point_id!s}, ' - f'snap_day={self.snap_day!s}, ' - f'next_billing_at={self.next_billing_at!s}, ' - f'payment_collection_method={self.payment_collection_method!s}, ' - f'receives_invoice_emails={self.receives_invoice_emails!s}, ' - f'net_terms={self.net_terms!s}, ' - f'stored_credential_transaction_id={self.stored_credential_transaction_id!s}, ' - f'reference={self.reference!s}, ' - f'custom_price={self.custom_price!s}, ' - f'components={self.components!s}, ' - f'dunning_communication_delay_enabled={self.dunning_communication_delay_enabled!s}, ' - f'dunning_communication_delay_time_zone={self.dunning_communication_delay_time_zone!s}, ' - f'product_price_point_id={self.product_price_point_id!s}, ' - f'product_price_point_handle={self.product_price_point_handle!s}, ' + f'credit_card_attributes={(self.credit_card_attributes if hasattr(self, "credit_card_attributes") else None)!s}, ' + f'product_handle={(self.product_handle if hasattr(self, "product_handle") else None)!s}, ' + f'product_id={(self.product_id if hasattr(self, "product_id") else None)!s}, ' + f'product_change_delayed={(self.product_change_delayed if hasattr(self, "product_change_delayed") else None)!s}, ' + f'next_product_id={(self.next_product_id if hasattr(self, "next_product_id") else None)!s}, ' + f'next_product_price_point_id={(self.next_product_price_point_id if hasattr(self, "next_product_price_point_id") else None)!s}, ' + f'snap_day={(self.snap_day if hasattr(self, "snap_day") else None)!s}, ' + f'initial_billing_at={(self.initial_billing_at if hasattr(self, "initial_billing_at") else None)!s}, ' + f'defer_signup={(self.defer_signup if hasattr(self, "defer_signup") else None)!s}, ' + f'next_billing_at={(self.next_billing_at if hasattr(self, "next_billing_at") else None)!s}, ' + f'expires_at={(self.expires_at if hasattr(self, "expires_at") else None)!s}, ' + f'payment_collection_method={(self.payment_collection_method if hasattr(self, "payment_collection_method") else None)!s}, ' + f'receives_invoice_emails={(self.receives_invoice_emails if hasattr(self, "receives_invoice_emails") else None)!s}, ' + f'net_terms={(self.net_terms if hasattr(self, "net_terms") else None)!s}, ' + f'stored_credential_transaction_id={(self.stored_credential_transaction_id if hasattr(self, "stored_credential_transaction_id") else None)!s}, ' + f'reference={(self.reference if hasattr(self, "reference") else None)!s}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!s}, ' + f'components={(self.components if hasattr(self, "components") else None)!s}, ' + f'dunning_communication_delay_enabled={(self.dunning_communication_delay_enabled if hasattr(self, "dunning_communication_delay_enabled") else None)!s}, ' + f'dunning_communication_delay_time_zone={(self.dunning_communication_delay_time_zone if hasattr(self, "dunning_communication_delay_time_zone") else None)!s}, ' + f'product_price_point_id={(self.product_price_point_id if hasattr(self, "product_price_point_id") else None)!s}, ' + f'product_price_point_handle={(self.product_price_point_handle if hasattr(self, "product_price_point_handle") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_subscription_component.py b/advancedbilling/models/update_subscription_component.py index 5ef81fa3..db6ee9c0 100644 --- a/advancedbilling/models/update_subscription_component.py +++ b/advancedbilling/models/update_subscription_component.py @@ -103,12 +103,12 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!r}, ' - f'custom_price={self.custom_price!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'component_id={self.component_id!s}, ' - f'custom_price={self.custom_price!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'custom_price={(self.custom_price if hasattr(self, "custom_price") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/update_subscription_group.py b/advancedbilling/models/update_subscription_group.py index e1aa9439..8926bd84 100644 --- a/advancedbilling/models/update_subscription_group.py +++ b/advancedbilling/models/update_subscription_group.py @@ -71,10 +71,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'member_ids={self.member_ids!r}, ' + f'member_ids={(self.member_ids if hasattr(self, "member_ids") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'member_ids={self.member_ids!s}, ' + f'member_ids={(self.member_ids if hasattr(self, "member_ids") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/upsert_prepaid_configuration.py b/advancedbilling/models/upsert_prepaid_configuration.py index 00612278..861bcfc3 100644 --- a/advancedbilling/models/upsert_prepaid_configuration.py +++ b/advancedbilling/models/upsert_prepaid_configuration.py @@ -118,16 +118,16 @@ def validate(cls, dictionary): def __repr__(self): return (f'{self.__class__.__name__}(' - f'initial_funding_amount_in_cents={self.initial_funding_amount_in_cents!r}, ' - f'replenish_to_amount_in_cents={self.replenish_to_amount_in_cents!r}, ' - f'auto_replenish={self.auto_replenish!r}, ' - f'replenish_threshold_amount_in_cents={self.replenish_threshold_amount_in_cents!r}, ' + f'initial_funding_amount_in_cents={(self.initial_funding_amount_in_cents if hasattr(self, "initial_funding_amount_in_cents") else None)!r}, ' + f'replenish_to_amount_in_cents={(self.replenish_to_amount_in_cents if hasattr(self, "replenish_to_amount_in_cents") else None)!r}, ' + f'auto_replenish={(self.auto_replenish if hasattr(self, "auto_replenish") else None)!r}, ' + f'replenish_threshold_amount_in_cents={(self.replenish_threshold_amount_in_cents if hasattr(self, "replenish_threshold_amount_in_cents") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'initial_funding_amount_in_cents={self.initial_funding_amount_in_cents!s}, ' - f'replenish_to_amount_in_cents={self.replenish_to_amount_in_cents!s}, ' - f'auto_replenish={self.auto_replenish!s}, ' - f'replenish_threshold_amount_in_cents={self.replenish_threshold_amount_in_cents!s}, ' + f'initial_funding_amount_in_cents={(self.initial_funding_amount_in_cents if hasattr(self, "initial_funding_amount_in_cents") else None)!s}, ' + f'replenish_to_amount_in_cents={(self.replenish_to_amount_in_cents if hasattr(self, "replenish_to_amount_in_cents") else None)!s}, ' + f'auto_replenish={(self.auto_replenish if hasattr(self, "auto_replenish") else None)!s}, ' + f'replenish_threshold_amount_in_cents={(self.replenish_threshold_amount_in_cents if hasattr(self, "replenish_threshold_amount_in_cents") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/usage.py b/advancedbilling/models/usage.py index ef8d8112..1ac920fb 100644 --- a/advancedbilling/models/usage.py +++ b/advancedbilling/models/usage.py @@ -141,26 +141,26 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!r}, ' - f'memo={self.memo!r}, ' - f'created_at={self.created_at!r}, ' - f'price_point_id={self.price_point_id!r}, ' - f'quantity={self.quantity!r}, ' - f'overage_quantity={self.overage_quantity!r}, ' - f'component_id={self.component_id!r}, ' - f'component_handle={self.component_handle!r}, ' - f'subscription_id={self.subscription_id!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!r}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!r}, ' + f'overage_quantity={(self.overage_quantity if hasattr(self, "overage_quantity") else None)!r}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!r}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!r}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'id={self.id!s}, ' - f'memo={self.memo!s}, ' - f'created_at={self.created_at!s}, ' - f'price_point_id={self.price_point_id!s}, ' - f'quantity={self.quantity!s}, ' - f'overage_quantity={self.overage_quantity!s}, ' - f'component_id={self.component_id!s}, ' - f'component_handle={self.component_handle!s}, ' - f'subscription_id={self.subscription_id!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'memo={(self.memo if hasattr(self, "memo") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'price_point_id={(self.price_point_id if hasattr(self, "price_point_id") else None)!s}, ' + f'quantity={(self.quantity if hasattr(self, "quantity") else None)!s}, ' + f'overage_quantity={(self.overage_quantity if hasattr(self, "overage_quantity") else None)!s}, ' + f'component_id={(self.component_id if hasattr(self, "component_id") else None)!s}, ' + f'component_handle={(self.component_handle if hasattr(self, "component_handle") else None)!s}, ' + f'subscription_id={(self.subscription_id if hasattr(self, "subscription_id") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/webhook.py b/advancedbilling/models/webhook.py index c1d92579..e7983b22 100644 --- a/advancedbilling/models/webhook.py +++ b/advancedbilling/models/webhook.py @@ -183,32 +183,32 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'event={self.event!r}, ' - f'id={self.id!r}, ' - f'created_at={self.created_at!r}, ' - f'last_error={self.last_error!r}, ' - f'last_error_at={self.last_error_at!r}, ' - f'accepted_at={self.accepted_at!r}, ' - f'last_sent_at={self.last_sent_at!r}, ' - f'last_sent_url={self.last_sent_url!r}, ' - f'successful={self.successful!r}, ' - f'body={self.body!r}, ' - f'signature={self.signature!r}, ' - f'signature_hmac_sha_256={self.signature_hmac_sha_256!r}, ' + f'event={(self.event if hasattr(self, "event") else None)!r}, ' + f'id={(self.id if hasattr(self, "id") else None)!r}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!r}, ' + f'last_error={(self.last_error if hasattr(self, "last_error") else None)!r}, ' + f'last_error_at={(self.last_error_at if hasattr(self, "last_error_at") else None)!r}, ' + f'accepted_at={(self.accepted_at if hasattr(self, "accepted_at") else None)!r}, ' + f'last_sent_at={(self.last_sent_at if hasattr(self, "last_sent_at") else None)!r}, ' + f'last_sent_url={(self.last_sent_url if hasattr(self, "last_sent_url") else None)!r}, ' + f'successful={(self.successful if hasattr(self, "successful") else None)!r}, ' + f'body={(self.body if hasattr(self, "body") else None)!r}, ' + f'signature={(self.signature if hasattr(self, "signature") else None)!r}, ' + f'signature_hmac_sha_256={(self.signature_hmac_sha_256 if hasattr(self, "signature_hmac_sha_256") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'event={self.event!s}, ' - f'id={self.id!s}, ' - f'created_at={self.created_at!s}, ' - f'last_error={self.last_error!s}, ' - f'last_error_at={self.last_error_at!s}, ' - f'accepted_at={self.accepted_at!s}, ' - f'last_sent_at={self.last_sent_at!s}, ' - f'last_sent_url={self.last_sent_url!s}, ' - f'successful={self.successful!s}, ' - f'body={self.body!s}, ' - f'signature={self.signature!s}, ' - f'signature_hmac_sha_256={self.signature_hmac_sha_256!s}, ' + f'event={(self.event if hasattr(self, "event") else None)!s}, ' + f'id={(self.id if hasattr(self, "id") else None)!s}, ' + f'created_at={(self.created_at if hasattr(self, "created_at") else None)!s}, ' + f'last_error={(self.last_error if hasattr(self, "last_error") else None)!s}, ' + f'last_error_at={(self.last_error_at if hasattr(self, "last_error_at") else None)!s}, ' + f'accepted_at={(self.accepted_at if hasattr(self, "accepted_at") else None)!s}, ' + f'last_sent_at={(self.last_sent_at if hasattr(self, "last_sent_at") else None)!s}, ' + f'last_sent_url={(self.last_sent_url if hasattr(self, "last_sent_url") else None)!s}, ' + f'successful={(self.successful if hasattr(self, "successful") else None)!s}, ' + f'body={(self.body if hasattr(self, "body") else None)!s}, ' + f'signature={(self.signature if hasattr(self, "signature") else None)!s}, ' + f'signature_hmac_sha_256={(self.signature_hmac_sha_256 if hasattr(self, "signature_hmac_sha_256") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/models/webhook_response.py b/advancedbilling/models/webhook_response.py index 215f5e5a..cafcf872 100644 --- a/advancedbilling/models/webhook_response.py +++ b/advancedbilling/models/webhook_response.py @@ -72,10 +72,10 @@ def from_dictionary(cls, def __repr__(self): return (f'{self.__class__.__name__}(' - f'webhook={self.webhook!r}, ' + f'webhook={(self.webhook if hasattr(self, "webhook") else None)!r}, ' f'additional_properties={self.additional_properties!r})') def __str__(self): return (f'{self.__class__.__name__}(' - f'webhook={self.webhook!s}, ' + f'webhook={(self.webhook if hasattr(self, "webhook") else None)!s}, ' f'additional_properties={self.additional_properties!s})') diff --git a/advancedbilling/utilities/__init__.py b/advancedbilling/utilities/__init__.py index 28ebe4ab..3ab66eb8 100644 --- a/advancedbilling/utilities/__init__.py +++ b/advancedbilling/utilities/__init__.py @@ -1,3 +1,4 @@ __all__ = [ + 'pagination', 'file_wrapper', ] diff --git a/doc/api-helper.md b/doc/api-helper.md new file mode 100644 index 00000000..0df52d71 --- /dev/null +++ b/doc/api-helper.md @@ -0,0 +1,11 @@ + +# ApiHelper + +A utility class for processing API Calls. Also contains classes for supporting standard datetime formats. + +## Methods + +| Name | Description | +| --- | --- | +| json_deserialize | Deserializes a JSON string to a Python dictionary. | + diff --git a/doc/client.md b/doc/client.md index 808f576d..ad3ee68f 100644 --- a/doc/client.md +++ b/doc/client.md @@ -5,17 +5,17 @@ The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | -| `site` | `str` | The subdomain for your Advanced Billing site.
*Default*: `'subdomain'` | -| `environment` | `Environment` | The API environment.
**Default: `Environment.US`** | -| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests | -| `override_http_client_configuration` | `bool` | The value which determines to override properties of the passed Http Client from the sdk user | -| `http_call_back` | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint | -| `timeout` | `float` | The value to use for connection timeout.
**Default: 120** | -| `max_retries` | `int` | The number of times to retry an endpoint call if it fails.
**Default: 0** | -| `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try.
**Default: 2** | -| `retry_statuses` | `Array of int` | The http statuses on which retry is to be done.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | -| `retry_methods` | `Array of string` | The http methods on which retry is to be done.
**Default: ['GET', 'PUT']** | -| `basic_auth_credentials` | [`BasicAuthCredentials`](auth/basic-authentication.md) | The credential object for Basic Authentication | +| site | `str` | The subdomain for your Advanced Billing site.
*Default*: `'subdomain'` | +| environment | `Environment` | The API environment.
**Default: `Environment.US`** | +| http_client_instance | `HttpClient` | The Http Client passed from the sdk user for making requests | +| override_http_client_configuration | `bool` | The value which determines to override properties of the passed Http Client from the sdk user | +| http_call_back | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint | +| timeout | `float` | The value to use for connection timeout.
**Default: 120** | +| max_retries | `int` | The number of times to retry an endpoint call if it fails.
**Default: 0** | +| backoff_factor | `float` | A backoff factor to apply between attempts after the second try.
**Default: 2** | +| retry_statuses | `Array of int` | The http statuses on which retry is to be done.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | +| retry_methods | `Array of string` | The http methods on which retry is to be done.
**Default: ['GET', 'PUT']** | +| basic_auth_credentials | [`BasicAuthCredentials`](auth/basic-authentication.md) | The credential object for Basic Authentication | The API client can be initialized as follows: diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index 3fe1b0dd..4a9e98bd 100644 --- a/doc/controllers/advance-invoice.md +++ b/doc/controllers/advance-invoice.md @@ -52,6 +52,7 @@ result = advance_invoice_controller.issue_advance_invoice( subscription_id, body=body ) +print(result) ``` ## Errors @@ -87,6 +88,7 @@ def read_advance_invoice(self, subscription_id = 222 result = advance_invoice_controller.read_advance_invoice(subscription_id) +print(result) ``` ## Errors @@ -124,6 +126,7 @@ def void_advance_invoice(self, subscription_id = 222 result = advance_invoice_controller.void_advance_invoice(subscription_id) +print(result) ``` ## Errors diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index eb2d31ae..41286cc7 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -37,8 +37,8 @@ def list_exported_proforma_invoices(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batch_id` | `str` | Template, Required | Id of a Batch Job. | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.
**Default**: `100`
**Constraints**: `>= 1`, `<= 10000` | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | ## Response Type @@ -53,6 +53,7 @@ collect = { 'page': 2 } result = api_exports_controller.list_exported_proforma_invoices(collect) +print(result) ``` ## Errors @@ -78,8 +79,8 @@ def list_exported_invoices(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batch_id` | `str` | Template, Required | Id of a Batch Job. | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.
**Default**: `100`
**Constraints**: `>= 1`, `<= 10000` | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | ## Response Type @@ -94,6 +95,7 @@ collect = { 'page': 2 } result = api_exports_controller.list_exported_invoices(collect) +print(result) ``` ## Errors @@ -119,8 +121,8 @@ def list_exported_subscriptions(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batch_id` | `str` | Template, Required | Id of a Batch Job. | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.
**Default**: `100`
**Constraints**: `>= 1`, `<= 10000` | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | ## Response Type @@ -135,6 +137,7 @@ collect = { 'page': 2 } result = api_exports_controller.list_exported_subscriptions(collect) +print(result) ``` ## Errors @@ -162,6 +165,7 @@ def export_proforma_invoices(self) ```python result = api_exports_controller.export_proforma_invoices() +print(result) ``` ## Errors @@ -188,6 +192,7 @@ def export_invoices(self) ```python result = api_exports_controller.export_invoices() +print(result) ``` ## Errors @@ -214,6 +219,7 @@ def export_subscriptions(self) ```python result = api_exports_controller.export_subscriptions() +print(result) ``` ## Errors @@ -248,6 +254,7 @@ def read_proforma_invoices_export(self, batch_id = 'batch_id8' result = api_exports_controller.read_proforma_invoices_export(batch_id) +print(result) ``` ## Errors @@ -282,6 +289,7 @@ def read_invoices_export(self, batch_id = 'batch_id8' result = api_exports_controller.read_invoices_export(batch_id) +print(result) ``` ## Errors @@ -316,6 +324,7 @@ def read_subscriptions_export(self, batch_id = 'batch_id8' result = api_exports_controller.read_subscriptions_export(batch_id) +print(result) ``` ## Errors diff --git a/doc/controllers/billing-portal.md b/doc/controllers/billing-portal.md index 9003432c..25cfb344 100644 --- a/doc/controllers/billing-portal.md +++ b/doc/controllers/billing-portal.md @@ -57,6 +57,7 @@ def enable_billing_portal_for_customer(self, customer_id = 150 result = billing_portal_controller.enable_billing_portal_for_customer(customer_id) +print(result) ``` ## Errors @@ -99,6 +100,7 @@ def read_billing_portal_link(self, customer_id = 150 result = billing_portal_controller.read_billing_portal_link(customer_id) +print(result) ``` ## Example Response *(as JSON)* @@ -159,6 +161,7 @@ def resend_billing_portal_invitation(self, customer_id = 150 result = billing_portal_controller.resend_billing_portal_invitation(customer_id) +print(result) ``` ## Example Response *(as JSON)* @@ -211,6 +214,7 @@ def revoke_billing_portal_access(self, customer_id = 150 result = billing_portal_controller.revoke_billing_portal_access(customer_id) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index 637893c0..fb10d9d1 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -59,6 +59,7 @@ result = component_price_points_controller.promote_component_price_point_to_defa component_id, price_point_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -133,7 +134,8 @@ body = CreateComponentPricePointRequest( ), Price( starting_quantity='101', - unit_price='4.00' + unit_price='4.00', + ending_quantity=None ) ], handle='wholesale-handle', @@ -145,6 +147,7 @@ result = component_price_points_controller.create_component_price_point( component_id, body=body ) +print(result) ``` ## Errors @@ -175,8 +178,8 @@ def list_component_price_points(self, | --- | --- | --- | --- | | `component_id` | `int` | Template, Required | The Advanced Billing id of the component | | `currency_prices` | `bool` | Query, Optional | Include an array of currency price data | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter_type` | [`List[PricePointType]`](../../doc/models/price-point-type.md) | Query, Optional | Use in query: `filter[type]=catalog,default`. | ## Response Type @@ -192,6 +195,7 @@ collect = {Liquid error: Value cannot be null. (Parameter 'key') 'per_page': 50 } result = component_price_points_controller.list_component_price_points(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -312,6 +316,7 @@ result = component_price_points_controller.bulk_create_component_price_points( component_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -432,6 +437,7 @@ result = component_price_points_controller.update_component_price_point( price_point_id, body=body ) +print(result) ``` ## Errors @@ -475,6 +481,7 @@ result = component_price_points_controller.read_component_price_point( component_id, price_point_id ) +print(result) ``` @@ -510,6 +517,7 @@ result = component_price_points_controller.archive_component_price_point( component_id, price_point_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -585,6 +593,7 @@ result = component_price_points_controller.unarchive_component_price_point( component_id, price_point_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -671,6 +680,7 @@ result = component_price_points_controller.create_currency_prices( price_point_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -742,6 +752,7 @@ result = component_price_points_controller.update_currency_prices( price_point_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -782,8 +793,8 @@ def list_all_component_price_points(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `include` | [`ListComponentsPricePointsInclude`](../../doc/models/list-components-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | @@ -816,6 +827,7 @@ collect = { ) } result = component_price_points_controller.list_all_component_price_points(collect) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 6f2c8c95..3b3f7989 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -75,6 +75,7 @@ result = components_controller.create_metered_component( product_family_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -195,6 +196,7 @@ result = components_controller.create_quantity_based_component( product_family_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -302,6 +304,7 @@ result = components_controller.create_on_off_component( product_family_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -411,6 +414,7 @@ result = components_controller.create_prepaid_usage_component( product_family_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -537,6 +541,7 @@ result = components_controller.create_event_based_component( product_family_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -611,6 +616,7 @@ def find_component(self, handle = 'handle6' result = components_controller.find_component(handle) +print(result) ``` ## Example Response *(as JSON)* @@ -661,7 +667,7 @@ def read_component(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `int` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `component_id` | `str` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | +| `component_id` | `str` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | ## Response Type @@ -678,6 +684,7 @@ result = components_controller.read_component( product_family_id, component_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -705,7 +712,8 @@ result = components_controller.read_component( "downgrade_credit": null, "created_at": "2019-08-02T05:54:53-04:00", "default_price_point_name": "Original", - "product_family_name": "Chargify" + "product_family_name": "Chargify", + "product_family_handle": "chargify" } } ``` @@ -729,7 +737,7 @@ def update_product_family_component(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `int` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `component_id` | `str` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | +| `component_id` | `str` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | | `body` | [`UpdateComponentRequest`](../../doc/models/update-component-request.md) | Body, Optional | - | ## Response Type @@ -754,6 +762,7 @@ result = components_controller.update_product_family_component( component_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -808,7 +817,7 @@ def archive_component(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `int` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `component_id` | `str` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | +| `component_id` | `str` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | ## Response Type @@ -825,6 +834,7 @@ result = components_controller.archive_component( product_family_id, component_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -879,8 +889,8 @@ def list_components(self, | `start_datetime` | `str` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `end_datetime` | `str` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional | | `include_archived` | `bool` | Query, Optional | Include archived items | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | ## Response Type @@ -903,6 +913,7 @@ collect = { ) } result = components_controller.list_components(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -943,6 +954,7 @@ result = components_controller.list_components(collect) "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", + "product_family_handle": "chargify", "use_site_exchange_rate": true } }, @@ -969,6 +981,7 @@ result = components_controller.list_components(collect) "created_at": "2019-08-01T09:35:37-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", + "product_family_handle": "chargify", "use_site_exchange_rate": true } }, @@ -995,6 +1008,7 @@ result = components_controller.list_components(collect) "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", + "product_family_handle": "chargify", "use_site_exchange_rate": true } } @@ -1040,6 +1054,7 @@ result = components_controller.update_component( component_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1094,8 +1109,8 @@ def list_components_for_product_family(self, | --- | --- | --- | --- | | `product_family_id` | `int` | Template, Required | The Advanced Billing id of the product family | | `include_archived` | `bool` | Query, Optional | Include archived items. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | | `date_field` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=created_at`. | | `end_date` | `str` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | @@ -1124,6 +1139,7 @@ collect = { 'date_field': BasicDateField.UPDATED_AT } result = components_controller.list_components_for_product_family(collect) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index 256aa005..466d4b4b 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -93,6 +93,7 @@ result = coupons_controller.create_coupon( product_family_id, body=body ) +print(result) ``` ## Errors @@ -118,8 +119,8 @@ def list_coupons_for_product_family(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `int` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `30`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | | `currency_prices` | `bool` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | @@ -152,6 +153,7 @@ collect = { 'currency_prices': True } result = coupons_controller.list_coupons_for_product_family(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -279,6 +281,7 @@ currency_prices = True result = coupons_controller.find_coupon( currency_prices=currency_prices ) +print(result) ``` @@ -324,6 +327,7 @@ result = coupons_controller.read_coupon( coupon_id, currency_prices=currency_prices ) +print(result) ``` ## Example Response *(as JSON)* @@ -418,6 +422,7 @@ result = coupons_controller.update_coupon( coupon_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -490,6 +495,7 @@ result = coupons_controller.archive_coupon( product_family_id, coupon_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -537,8 +543,8 @@ def list_coupons(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `30`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | | `currency_prices` | `bool` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | @@ -570,6 +576,7 @@ collect = { 'currency_prices': True } result = coupons_controller.list_coupons(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -653,6 +660,7 @@ result = coupons_controller.read_coupon_usage( product_family_id, coupon_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -737,6 +745,7 @@ def validate_coupon(self, code = 'code8' result = coupons_controller.validate_coupon(code) +print(result) ``` ## Example Response *(as JSON)* @@ -820,6 +829,7 @@ result = coupons_controller.create_or_update_coupon_currency_prices( coupon_id, body=body ) +print(result) ``` ## Errors @@ -906,6 +916,7 @@ result = coupons_controller.create_coupon_subcodes( coupon_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -935,8 +946,8 @@ def list_coupon_subcodes(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `coupon_id` | `int` | Template, Required | The Advanced Billing id of the coupon | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | ## Response Type @@ -951,6 +962,7 @@ collect = { 'per_page': 50 } result = coupons_controller.list_coupon_subcodes(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -1031,6 +1043,7 @@ result = coupons_controller.update_coupon_subcodes( coupon_id, body=body ) +print(result) ``` diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index de05ec1f..96eefd0a 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -42,7 +42,7 @@ Each site is limited to 100 unique Metafields (i.e. keys, or names) per resource ### Metafields "On-the-Fly" -It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existant name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”. +It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existent name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”. ### Metafield Scope Warning @@ -89,6 +89,7 @@ result = custom_fields_controller.create_metafields( resource_type, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -144,8 +145,8 @@ def list_metafields(self, | --- | --- | --- | --- | | `resource_type` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong | | `name` | `str` | Query, Optional | filter by the name of the metafield | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | ## Response Type @@ -161,6 +162,7 @@ collect = { 'per_page': 50 } result = custom_fields_controller.list_metafields(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -219,6 +221,7 @@ def update_metafield(self, resource_type = ResourceType.SUBSCRIPTIONS result = custom_fields_controller.update_metafield(resource_type) +print(result) ``` ## Errors @@ -335,6 +338,7 @@ result = custom_fields_controller.create_metadata( resource_id, body=body ) +print(result) ``` ## Errors @@ -363,8 +367,8 @@ def list_metadata(self, | --- | --- | --- | --- | | `resource_type` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong | | `resource_id` | `int` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | ## Response Type @@ -380,6 +384,7 @@ collect = { 'per_page': 50 } result = custom_fields_controller.list_metadata(collect) +print(result) ``` @@ -417,6 +422,7 @@ result = custom_fields_controller.update_metadata( resource_type, resource_id ) +print(result) ``` ## Errors @@ -519,15 +525,15 @@ def list_metadata_for_resource_type(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `date_field` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. | | `start_date` | `date` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `date` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `start_datetime` | `datetime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns metadata with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `end_datetime` | `datetime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns metadata with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `with_deleted` | `bool` | Query, Optional | Allow to fetch deleted metadata. | -| `resource_ids` | `List[int]` | Query, Optional | Allow to fetch metadata for multiple records based on provided ids. Use in query: `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`.
**Constraints**: *Maximum Items*: `50` | +| `resource_ids` | `List[int]` | Query, Optional | Allow to fetch metadata for multiple records based on provided ids. Use in query: `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`.

**Constraints**: *Maximum Items*: `50` | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | ## Response Type @@ -544,5 +550,6 @@ collect = { 'date_field': BasicDateField.UPDATED_AT } result = custom_fields_controller.list_metadata_for_resource_type(collect) +print(result) ``` diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index daf96054..2963ddd6 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -86,6 +86,7 @@ body = CreateCustomerRequest( result = customers_controller.create_customer( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -158,8 +159,8 @@ def list_customers(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Direction to sort customers by time of creation | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 50. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `50`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 50. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `50`

**Constraints**: `<= 200` | | `date_field` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `start_date` | `str` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `str` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | @@ -180,6 +181,7 @@ collect = { 'date_field': BasicDateField.UPDATED_AT } result = customers_controller.list_customers(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -292,6 +294,7 @@ def read_customer(self, id = 112 result = customers_controller.read_customer(id) +print(result) ``` @@ -333,6 +336,7 @@ result = customers_controller.update_customer( id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -427,6 +431,7 @@ def read_customer_by_reference(self, reference = 'reference4' result = customers_controller.read_customer_by_reference(reference) +print(result) ``` @@ -455,5 +460,6 @@ def list_customer_subscriptions(self, customer_id = 150 result = customers_controller.list_customer_subscriptions(customer_id) +print(result) ``` diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index 9e076561..cc2a2b53 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -74,6 +74,7 @@ result = events_based_billing_segments_controller.create_segment( price_point_id, body=body ) +print(result) ``` ## Errors @@ -103,8 +104,8 @@ def list_segments_for_price_point(self, | --- | --- | --- | --- | | `component_id` | `str` | Template, Required | ID or Handle for the Component | | `price_point_id` | `str` | Template, Required | ID or Handle for the Price Point belonging to the Component | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `30`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `filter` | [`ListSegmentsFilter`](../../doc/models/list-segments-filter.md) | Query, Optional | Filter to use for List Segments for a Price Point operation | ## Response Type @@ -124,6 +125,7 @@ collect = { ) } result = events_based_billing_segments_controller.list_segments_for_price_point(collect) +print(result) ``` ## Errors @@ -175,6 +177,7 @@ result = events_based_billing_segments_controller.update_segment( price_point_id, id ) +print(result) ``` ## Errors @@ -272,6 +275,7 @@ result = events_based_billing_segments_controller.bulk_create_segments( component_id, price_point_id ) +print(result) ``` ## Errors @@ -320,6 +324,7 @@ result = events_based_billing_segments_controller.bulk_update_segments( component_id, price_point_id ) +print(result) ``` ## Errors diff --git a/doc/controllers/events.md b/doc/controllers/events.md index a2cd1803..dbcc8e54 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -95,11 +95,11 @@ def list_events(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `since_id` | `int` | Query, Optional | Returns events with an id greater than or equal to the one specified | | `max_id` | `int` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.
**Default**: `'desc'` | +| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.

**Default**: `'desc'` | | `filter` | [`List[EventKey]`](../../doc/models/event-key.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | | `date_field` | [`ListEventsDateField`](../../doc/models/list-events-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. | | `start_date` | `str` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | @@ -125,6 +125,7 @@ collect = { 'date_field': ListEventsDateField.CREATED_AT } result = events_controller.list_events(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -214,11 +215,11 @@ def list_subscription_events(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `int` | Template, Required | The Chargify id of the subscription | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `since_id` | `int` | Query, Optional | Returns events with an id greater than or equal to the one specified | | `max_id` | `int` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.
**Default**: `'desc'` | +| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.

**Default**: `'desc'` | | `filter` | [`List[EventKey]`](../../doc/models/event-key.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | ## Response Type @@ -239,6 +240,7 @@ collect = { ] } result = events_controller.list_subscription_events(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -298,11 +300,11 @@ def read_events_count(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `since_id` | `int` | Query, Optional | Returns events with an id greater than or equal to the one specified | | `max_id` | `int` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.
**Default**: `'desc'` | +| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.

**Default**: `'desc'` | | `filter` | [`List[EventKey]`](../../doc/models/event-key.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | ## Response Type @@ -322,6 +324,7 @@ collect = { ] } result = events_controller.read_events_count(collect) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index a00d68d0..94862066 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -22,7 +22,7 @@ The Stats API is a very basic view of some Site-level stats. This API call only ## Stats Documentation -There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will reflect the summary of information provided in the Stats reposnse. +There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will reflect the summary of information provided in the Stats response. ``` https://subdomain.chargify.com/dashboard @@ -40,6 +40,7 @@ def read_site_stats(self) ```python result = insights_controller.read_site_stats() +print(result) ``` ## Example Response *(as JSON)* @@ -89,6 +90,7 @@ def read_mrr(self, ```python result = insights_controller.read_mrr() +print(result) ``` ## Example Response *(as JSON)* @@ -151,8 +153,8 @@ def list_mrr_movements(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `int` | Query, Optional | optionally filter results by subscription | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 50.
Use in query `per_page=20`.
**Default**: `10`
**Constraints**: `<= 50` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 50.
Use in query `per_page=20`.

**Default**: `10`

**Constraints**: `<= 50` | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | ## Response Type @@ -167,6 +169,7 @@ collect = { 'per_page': 20 } result = insights_controller.list_mrr_movements(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -239,8 +242,8 @@ def list_mrr_per_subscription(self, | --- | --- | --- | --- | | `filter` | [`ListMrrFilter`](../../doc/models/list-mrr-filter.md) | Query, Optional | Filter to use for List MRR per subscription operation | | `at_time` | `str` | Query, Optional | Submit a timestamp in ISO8601 format to request MRR for a historic time. Use in query: `at_time=2022-01-10T10:00:00-05:00`. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | Controls the order in which results are returned. Records are ordered by subscription_id in ascending order by default. Use in query `direction=desc`. | ## Response Type @@ -264,6 +267,7 @@ collect = { 'direction': Direction.DESC } result = insights_controller.list_mrr_per_subscription(collect) +print(result) ``` ## Errors diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index f6617dc1..1f341a12 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -76,6 +76,7 @@ result = invoices_controller.refund_invoice( uid, body=body ) +print(result) ``` ## Errors @@ -103,23 +104,24 @@ def list_invoices(self, | `status` | [`InvoiceStatus`](../../doc/models/invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | | `subscription_id` | `int` | Query, Optional | The subscription's ID. | | `subscription_group_uid` | `str` | Query, Optional | The UID of the subscription group you want to fetch consolidated invoices for. This will return a paginated list of consolidated invoices for the specified group. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | -| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.
**Default**: `'desc'` | -| `line_items` | `bool` | Query, Optional | Include line items data
**Default**: `False` | -| `discounts` | `bool` | Query, Optional | Include discounts data
**Default**: `False` | -| `taxes` | `bool` | Query, Optional | Include taxes data
**Default**: `False` | -| `credits` | `bool` | Query, Optional | Include credits data
**Default**: `False` | -| `payments` | `bool` | Query, Optional | Include payments data
**Default**: `False` | -| `custom_fields` | `bool` | Query, Optional | Include custom fields data
**Default**: `False` | -| `refunds` | `bool` | Query, Optional | Include refunds data
**Default**: `False` | -| `date_field` | [`InvoiceDateField`](../../doc/models/invoice-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`.
**Default**: `'due_date'` | +| `consolidation_level` | `str` | Query, Optional | The consolidation level of the invoice. Allowed Values: none, parent, child or comma-separated lists of thereof, e.g. none,parent. | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.

**Default**: `'desc'` | +| `line_items` | `bool` | Query, Optional | Include line items data

**Default**: `False` | +| `discounts` | `bool` | Query, Optional | Include discounts data

**Default**: `False` | +| `taxes` | `bool` | Query, Optional | Include taxes data

**Default**: `False` | +| `credits` | `bool` | Query, Optional | Include credits data

**Default**: `False` | +| `payments` | `bool` | Query, Optional | Include payments data

**Default**: `False` | +| `custom_fields` | `bool` | Query, Optional | Include custom fields data

**Default**: `False` | +| `refunds` | `bool` | Query, Optional | Include refunds data

**Default**: `False` | +| `date_field` | [`InvoiceDateField`](../../doc/models/invoice-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`.

**Default**: `'due_date'` | | `start_datetime` | `str` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Allowed to be used only along with date_field set to created_at or updated_at. | | `end_datetime` | `str` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Allowed to be used only along with date_field set to created_at or updated_at. | | `customer_ids` | `List[int]` | Query, Optional | Allows fetching invoices with matching customer id based on provided values. Use in query `customer_ids=1,2,3`. | | `number` | `List[str]` | Query, Optional | Allows fetching invoices with matching invoice number based on provided values. Use in query `number=1234,1235`. | | `product_ids` | `List[int]` | Query, Optional | Allows fetching invoices with matching line items product ids based on provided values. Use in query `product_ids=23,34`. | -| `sort` | [`InvoiceSortField`](../../doc/models/invoice-sort-field.md) | Query, Optional | Allows specification of the order of the returned list. Use in query `sort=total_amount`.
**Default**: `'number'` | +| `sort` | [`InvoiceSortField`](../../doc/models/invoice-sort-field.md) | Query, Optional | Allows specification of the order of the returned list. Use in query `sort=total_amount`.

**Default**: `'number'` | ## Response Type @@ -156,6 +158,7 @@ collect = { 'sort': InvoiceSortField.TOTAL_AMOUNT } result = invoices_controller.list_invoices(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -470,6 +473,7 @@ def read_invoice(self, uid = 'uid0' result = invoices_controller.read_invoice(uid) +print(result) ``` ## Example Response *(as JSON)* @@ -573,7 +577,8 @@ result = invoices_controller.read_invoice(uid) "type": "credit_card" }, "transaction_id": 253028955, - "prepayment": false + "prepayment": false, + "received_on": "2018-07-26" } ], "public_url": "https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y" @@ -619,8 +624,8 @@ def list_invoice_events(self, | --- | --- | --- | --- | | `since_date` | `str` | Query, Optional | The timestamp in a format `YYYY-MM-DD T HH:MM:SS Z`, or `YYYY-MM-DD`(in this case, it returns data from the beginning of the day). of the event from which you want to start the search. All the events before the `since_date` timestamp are not returned in the response. | | `since_id` | `int` | Query, Optional | The ID of the event from which you want to start the search(ID is not included. e.g. if ID is set to 2, then all events with ID 3 and more will be shown) This parameter is not used if since_date is defined. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
**Default**: `100` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

**Default**: `100` | | `invoice_uid` | `str` | Query, Optional | Providing an invoice_uid allows for scoping of the invoice events to a single invoice or credit note. | | `with_change_invoice_status` | `str` | Query, Optional | Use this parameter if you want to fetch also invoice events with change_invoice_status type. | | `event_types` | [`List[InvoiceEventType]`](../../doc/models/invoice-event-type.md) | Query, Optional | Filter results by event_type. Supply a comma separated list of event types (listed above). Use in query: `event_types=void_invoice,void_remainder`. | @@ -637,6 +642,7 @@ collect = { 'per_page': 100 } result = invoices_controller.list_invoice_events(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -1025,51 +1031,7 @@ result = invoices_controller.list_invoice_events(collect) # Record Payment for Invoice -This API call should be used when you want to record a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment endpoint. - -## Create a Payment from the existing payment profile - -In order to apply a payment to an invoice using an existing payment profile, specify `type` as `payment`, the amount less than the invoice total, and the customer's `payment_profile_id`. The ID of a payment profile might be retrieved via the Payment Profiles API endpoint. - -``` -{ - "type": "payment", - "payment": { - "amount": 10.00, - "payment_profile_id": 123 - } -} -``` - -## Create a Payment from the Subscription's Prepayment Account - -In order apply a prepayment to an invoice, specify the `type` as `prepayment`, and also the `amount`. - -``` -{ - "type": "prepayment", - "payment": { - "amount": 10.00 - } -} -``` - -Note that the `amount` must be less than or equal to the Subscription's Prepayment account balance. - -## Create a Payment from the Subscription's Service Credit Account - -In order to apply a service credit to an invoice, specify the `type` as `service_credit`, and also the `amount`: - -``` -{ - "type": "service_credit", - "payment": { - "amount": 10.00 - } -} -``` - -Note that Advanced Billing will attempt to fully pay the invoice's `due_amount` from the Subscription's Service Credit account. At this time, partial payments from a Service Credit Account are only allowed for consolidated invoices (subscription groups). Therefore, for normal invoices the Service Credit account balance must be greater than or equal to the invoice's `due_amount`. +Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment endpoint. ```python def record_payment_for_invoice(self, @@ -1106,6 +1068,7 @@ result = invoices_controller.record_payment_for_invoice( uid, body=body ) +print(result) ``` ## Errors @@ -1184,6 +1147,7 @@ body = CreateMultiInvoicePaymentRequest( result = invoices_controller.record_payment_for_multiple_invoices( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1233,13 +1197,13 @@ def list_credit_notes(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `int` | Query, Optional | The subscription's Advanced Billing id | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | -| `line_items` | `bool` | Query, Optional | Include line items data
**Default**: `False` | -| `discounts` | `bool` | Query, Optional | Include discounts data
**Default**: `False` | -| `taxes` | `bool` | Query, Optional | Include taxes data
**Default**: `False` | -| `refunds` | `bool` | Query, Optional | Include refunds data
**Default**: `False` | -| `applications` | `bool` | Query, Optional | Include applications data
**Default**: `False` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `line_items` | `bool` | Query, Optional | Include line items data

**Default**: `False` | +| `discounts` | `bool` | Query, Optional | Include discounts data

**Default**: `False` | +| `taxes` | `bool` | Query, Optional | Include taxes data

**Default**: `False` | +| `refunds` | `bool` | Query, Optional | Include refunds data

**Default**: `False` | +| `applications` | `bool` | Query, Optional | Include applications data

**Default**: `False` | ## Response Type @@ -1258,6 +1222,7 @@ collect = { 'applications': False } result = invoices_controller.list_credit_notes(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -1587,6 +1552,7 @@ def read_credit_note(self, uid = 'uid0' result = invoices_controller.read_credit_note(uid) +print(result) ``` ## Example Response *(as JSON)* @@ -1944,6 +1910,7 @@ result = invoices_controller.record_payment_for_subscription( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -2011,6 +1978,7 @@ def reopen_invoice(self, uid = 'uid0' result = invoices_controller.reopen_invoice(uid) +print(result) ``` ## Errors @@ -2057,6 +2025,7 @@ result = invoices_controller.void_invoice( uid, body=body ) +print(result) ``` ## Errors @@ -2081,9 +2050,9 @@ def list_consolidated_invoice_segments(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `invoice_uid` | `str` | Template, Required | The unique identifier of the consolidated invoice | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | -| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | Sort direction of the returned segments.
**Default**: `'asc'` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | Sort direction of the returned segments.

**Default**: `'asc'` | ## Response Type @@ -2099,6 +2068,7 @@ collect = { 'direction': Direction.ASC } result = invoices_controller.list_consolidated_invoice_segments(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -2583,6 +2553,7 @@ result = invoices_controller.create_invoice( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -2771,6 +2742,7 @@ def preview_customer_information_changes(self, uid = 'uid0' result = invoices_controller.preview_customer_information_changes(uid) +print(result) ``` ## Example Response *(as JSON)* @@ -2861,6 +2833,7 @@ def update_customer_information(self, uid = 'uid0' result = invoices_controller.update_customer_information(uid) +print(result) ``` ## Example Response *(as JSON)* @@ -3103,6 +3076,7 @@ result = invoices_controller.issue_invoice( uid, body=body ) +print(result) ``` ## Errors diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index e2e25d10..a6e95e3a 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -73,6 +73,7 @@ body = CreateOfferRequest( result = offers_controller.create_offer( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -137,8 +138,8 @@ def list_offers(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `include_archived` | `bool` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | ## Response Type @@ -154,6 +155,7 @@ collect = { 'include_archived': True } result = offers_controller.list_offers(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -243,6 +245,7 @@ def read_offer(self, offer_id = 130 result = offers_controller.read_offer(offer_id) +print(result) ``` diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index bc62fb1e..7365645d 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -332,6 +332,7 @@ body = CreatePaymentProfileRequest( result = payment_profiles_controller.create_payment_profile( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -384,8 +385,8 @@ def list_payment_profiles(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `customer_id` | `int` | Query, Optional | The ID of the customer for which you wish to list payment profiles | ## Response Type @@ -400,6 +401,7 @@ collect = { 'per_page': 50 } result = payment_profiles_controller.list_payment_profiles(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -411,6 +413,8 @@ result = payment_profiles_controller.list_payment_profiles(collect) "id": 10089892, "first_name": "Chester", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", @@ -437,6 +441,8 @@ result = payment_profiles_controller.list_payment_profiles(collect) "id": 10188522, "first_name": "Frankie", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543712, "current_vault": "bogus", "vault_token": "123456789", @@ -478,6 +484,8 @@ Example response for Bank Account: "id": 10089892, "first_name": "Chester", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", @@ -521,6 +529,7 @@ def read_payment_profile(self, payment_profile_id = 198 result = payment_profiles_controller.read_payment_profile(payment_profile_id) +print(result) ``` ## Example Response *(as JSON)* @@ -535,6 +544,8 @@ result = payment_profiles_controller.read_payment_profile(payment_profile_id) "card_type": "bogus", "expiration_month": 1, "expiration_year": 2022, + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "1", @@ -640,6 +651,7 @@ result = payment_profiles_controller.update_payment_profile( payment_profile_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -792,6 +804,7 @@ result = payment_profiles_controller.verify_bank_account( bank_account_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -901,6 +914,7 @@ result = payment_profiles_controller.change_subscription_default_payment_profile subscription_id, payment_profile_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -976,6 +990,7 @@ result = payment_profiles_controller.change_subscription_group_default_payment_p uid, payment_profile_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -1043,6 +1058,7 @@ def read_one_time_token(self, chargify_token = 'chargify_token8' result = payment_profiles_controller.read_one_time_token(chargify_token) +print(result) ``` ## Errors diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index 90b2ed8e..1376998b 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -30,8 +30,8 @@ def list_products_for_product_family(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `str` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `date_field` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `filter` | [`ListProductsFilter`](../../doc/models/list-products-filter.md) | Query, Optional | Filter to use for List Products operations | | `start_date` | `date` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | @@ -63,6 +63,7 @@ collect = { 'include': ListProductsInclude.PREPAID_PRODUCT_PRICE_POINT } result = product_families_controller.list_products_for_product_family(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -205,6 +206,7 @@ body = CreateProductFamilyRequest( result = product_families_controller.create_product_family( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -258,6 +260,7 @@ collect = { 'date_field': BasicDateField.UPDATED_AT } result = product_families_controller.list_product_families(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -317,6 +320,7 @@ def read_product_family(self, id = 112 result = product_families_controller.read_product_family(id) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 538c022f..625e1f28 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -71,6 +71,7 @@ result = product_price_points_controller.create_product_price_point( product_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -121,8 +122,8 @@ def list_product_price_points(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | int \| str | Template, Required | This is a container for one-of cases. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
**Default**: `10`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

**Default**: `10`

**Constraints**: `<= 200` | | `currency_prices` | `bool` | Query, Optional | When fetching a product's price points, if you have defined multiple currencies at the site level, you can optionally pass the ?currency_prices=true query param to include an array of currency price data in the response. If the product price point is set to use_site_exchange_rate: true, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. | | `filter_type` | [`List[PricePointType]`](../../doc/models/price-point-type.md) | Query, Optional | Use in query: `filter[type]=catalog,default`. | | `archived` | `bool` | Query, Optional | Set to include archived price points in the response. | @@ -140,6 +141,7 @@ collect = {Liquid error: Value cannot be null. (Parameter 'key') 'per_page': 10 } result = product_price_points_controller.list_product_price_points(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -216,6 +218,7 @@ result = product_price_points_controller.update_product_price_point( price_point_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -280,6 +283,7 @@ result = product_price_points_controller.read_product_price_point( product_id, price_point_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -342,6 +346,7 @@ result = product_price_points_controller.archive_product_price_point( product_id, price_point_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -410,6 +415,7 @@ result = product_price_points_controller.unarchive_product_price_point( product_id, price_point_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -474,6 +480,7 @@ result = product_price_points_controller.promote_product_price_point_to_default( product_id, price_point_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -595,6 +602,7 @@ result = product_price_points_controller.bulk_create_product_price_points( product_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -687,6 +695,7 @@ result = product_price_points_controller.create_product_currency_prices( product_price_point_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -760,6 +769,7 @@ result = product_price_points_controller.update_product_currency_prices( product_price_point_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -802,8 +812,8 @@ def list_all_product_price_points(self, | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | | `include` | [`ListProductsPricePointsInclude`](../../doc/models/list-products-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | ## Response Type @@ -834,6 +844,7 @@ collect = { 'per_page': 50 } result = product_price_points_controller.list_all_product_price_points(collect) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/products.md b/doc/controllers/products.md index f6d1ef11..a4489a25 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -66,6 +66,7 @@ result = products_controller.create_product( product_family_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -149,6 +150,7 @@ def read_product(self, product_id = 202 result = products_controller.read_product(product_id) +print(result) ``` ## Example Response *(as JSON)* @@ -230,6 +232,7 @@ def update_product(self, product_id = 202 result = products_controller.update_product(product_id) +print(result) ``` ## Example Response *(as JSON)* @@ -314,6 +317,7 @@ def archive_product(self, product_id = 202 result = products_controller.archive_product(product_id) +print(result) ``` ## Example Response *(as JSON)* @@ -391,6 +395,7 @@ def read_product_by_handle(self, api_handle = 'api_handle6' result = products_controller.read_product_by_handle(api_handle) +print(result) ``` ## Example Response *(as JSON)* @@ -481,8 +486,8 @@ def list_products(self, | `end_datetime` | `datetime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. | | `start_date` | `date` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `start_datetime` | `datetime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `include_archived` | `bool` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | | `include` | [`ListProductsInclude`](../../doc/models/list-products-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | @@ -508,6 +513,7 @@ collect = { 'include': ListProductsInclude.PREPAID_PRODUCT_PRICE_POINT } result = products_controller.list_products(collect) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index d89a8c2c..2fc94787 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -77,12 +77,12 @@ def list_subscription_group_proforma_invoices(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `str` | Template, Required | The uid of the subscription group | -| `line_items` | `bool` | Query, Optional | Include line items data
**Default**: `False` | -| `discounts` | `bool` | Query, Optional | Include discounts data
**Default**: `False` | -| `taxes` | `bool` | Query, Optional | Include taxes data
**Default**: `False` | -| `credits` | `bool` | Query, Optional | Include credits data
**Default**: `False` | -| `payments` | `bool` | Query, Optional | Include payments data
**Default**: `False` | -| `custom_fields` | `bool` | Query, Optional | Include custom fields data
**Default**: `False` | +| `line_items` | `bool` | Query, Optional | Include line items data

**Default**: `False` | +| `discounts` | `bool` | Query, Optional | Include discounts data

**Default**: `False` | +| `taxes` | `bool` | Query, Optional | Include taxes data

**Default**: `False` | +| `credits` | `bool` | Query, Optional | Include credits data

**Default**: `False` | +| `payments` | `bool` | Query, Optional | Include payments data

**Default**: `False` | +| `custom_fields` | `bool` | Query, Optional | Include custom fields data

**Default**: `False` | ## Response Type @@ -101,6 +101,7 @@ collect = { 'custom_fields': False } result = proforma_invoices_controller.list_subscription_group_proforma_invoices(collect) +print(result) ``` ## Errors @@ -139,6 +140,7 @@ def read_proforma_invoice(self, proforma_invoice_uid = 'proforma_invoice_uid4' result = proforma_invoices_controller.read_proforma_invoice(proforma_invoice_uid) +print(result) ``` ## Errors @@ -179,6 +181,7 @@ def create_proforma_invoice(self, subscription_id = 222 result = proforma_invoices_controller.create_proforma_invoice(subscription_id) +print(result) ``` ## Errors @@ -205,15 +208,15 @@ def list_proforma_invoices(self, | `start_date` | `str` | Query, Optional | The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format. | | `end_date` | `str` | Query, Optional | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. | | `status` | [`ProformaInvoiceStatus`](../../doc/models/proforma-invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | -| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.
**Default**: `'desc'` | -| `line_items` | `bool` | Query, Optional | Include line items data
**Default**: `False` | -| `discounts` | `bool` | Query, Optional | Include discounts data
**Default**: `False` | -| `taxes` | `bool` | Query, Optional | Include taxes data
**Default**: `False` | -| `credits` | `bool` | Query, Optional | Include credits data
**Default**: `False` | -| `payments` | `bool` | Query, Optional | Include payments data
**Default**: `False` | -| `custom_fields` | `bool` | Query, Optional | Include custom fields data
**Default**: `False` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.

**Default**: `'desc'` | +| `line_items` | `bool` | Query, Optional | Include line items data

**Default**: `False` | +| `discounts` | `bool` | Query, Optional | Include discounts data

**Default**: `False` | +| `taxes` | `bool` | Query, Optional | Include taxes data

**Default**: `False` | +| `credits` | `bool` | Query, Optional | Include credits data

**Default**: `False` | +| `payments` | `bool` | Query, Optional | Include payments data

**Default**: `False` | +| `custom_fields` | `bool` | Query, Optional | Include custom fields data

**Default**: `False` | ## Response Type @@ -235,6 +238,7 @@ collect = { 'custom_fields': False } result = proforma_invoices_controller.list_proforma_invoices(collect) +print(result) ``` @@ -273,6 +277,7 @@ def void_proforma_invoice(self, proforma_invoice_uid = 'proforma_invoice_uid4' result = proforma_invoices_controller.void_proforma_invoice(proforma_invoice_uid) +print(result) ``` ## Errors @@ -314,6 +319,7 @@ def preview_proforma_invoice(self, subscription_id = 222 result = proforma_invoices_controller.preview_proforma_invoice(subscription_id) +print(result) ``` ## Errors @@ -366,6 +372,7 @@ body = CreateSubscriptionRequest( result = proforma_invoices_controller.create_signup_proforma_invoice( body=body ) +print(result) ``` ## Errors @@ -420,6 +427,7 @@ body = CreateSubscriptionRequest( result = proforma_invoices_controller.preview_signup_proforma_invoice( body=body ) +print(result) ``` ## Errors diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md index fc9d6a06..a56e3d64 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -21,7 +21,7 @@ reason_codes_controller = client.reason_codes # Reason Codes Intro -ReasonCodes are a way to gain a high level view of why your customers are cancelling the subcription to your product or service. +ReasonCodes are a way to gain a high level view of why your customers are cancelling the subscription to your product or service. Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. @@ -64,6 +64,7 @@ body = CreateReasonCodeRequest( result = reason_codes_controller.create_reason_code( body=body ) +print(result) ``` ## Errors @@ -86,8 +87,8 @@ def list_reason_codes(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | ## Response Type @@ -101,6 +102,7 @@ collect = { 'per_page': 50 } result = reason_codes_controller.list_reason_codes(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -123,7 +125,7 @@ result = reason_codes_controller.list_reason_codes(collect) "id": 1, "site_id": 2, "code": "CH1", - "description": "This doesnt meet my needs", + "description": "This does not meet my needs", "position": 2, "created_at": "2017-02-16T16:48:45-05:00", "updated_at": "2017-02-17T16:29:59-05:00" @@ -175,6 +177,7 @@ def read_reason_code(self, reason_code_id = 32 result = reason_codes_controller.read_reason_code(reason_code_id) +print(result) ``` ## Errors @@ -211,6 +214,7 @@ def update_reason_code(self, reason_code_id = 32 result = reason_codes_controller.update_reason_code(reason_code_id) +print(result) ``` ## Errors @@ -223,7 +227,7 @@ result = reason_codes_controller.update_reason_code(reason_code_id) # Delete Reason Code -This method gives a merchant the option to delete one reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversable. +This method gives a merchant the option to delete one reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversible. ```python def delete_reason_code(self, @@ -246,6 +250,7 @@ def delete_reason_code(self, reason_code_id = 32 result = reason_codes_controller.delete_reason_code(reason_code_id) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/referral-codes.md b/doc/controllers/referral-codes.md index c194bc46..e6b84222 100644 --- a/doc/controllers/referral-codes.md +++ b/doc/controllers/referral-codes.md @@ -42,6 +42,7 @@ def validate_referral_code(self, code = 'code8' result = referral_codes_controller.validate_referral_code(code) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index c78c04aa..95773a8d 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -37,10 +37,10 @@ def list_sales_commission_settings(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `seller_id` | `str` | Template, Required | The Chargify id of your seller account | -| `authorization` | `str` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
**Default**: `'Bearer <>'` | +| `authorization` | `str` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `'Bearer <>'` | | `live_mode` | `bool` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.
**Default**: `100` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | ## Response Type @@ -56,6 +56,7 @@ collect = { 'per_page': 100 } result = sales_commissions_controller.list_sales_commission_settings(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -115,10 +116,10 @@ def list_sales_reps(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `seller_id` | `str` | Template, Required | The Chargify id of your seller account | -| `authorization` | `str` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
**Default**: `'Bearer <>'` | +| `authorization` | `str` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `'Bearer <>'` | | `live_mode` | `bool` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.
**Default**: `100` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | ## Response Type @@ -134,6 +135,7 @@ collect = { 'per_page': 100 } result = sales_commissions_controller.list_sales_reps(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -248,10 +250,10 @@ def read_sales_rep(self, | --- | --- | --- | --- | | `seller_id` | `str` | Template, Required | The Chargify id of your seller account | | `sales_rep_id` | `str` | Template, Required | The Advanced Billing id of sales rep. | -| `authorization` | `str` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
**Default**: `'Bearer <>'` | +| `authorization` | `str` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `'Bearer <>'` | | `live_mode` | `bool` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.
**Default**: `100` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | ## Response Type @@ -277,6 +279,7 @@ result = sales_commissions_controller.read_sales_rep( page=page, per_page=per_page ) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index 75c8a91d..7075fc99 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -46,6 +46,7 @@ def read_site(self) ```python result = sites_controller.read_site() +print(result) ``` ## Example Response *(as JSON)* @@ -115,7 +116,7 @@ def clear_site(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `cleanup_scope` | [`CleanupScope`](../../doc/models/cleanup-scope.md) | Query, Optional | `all`: Will clear all products, customers, and related subscriptions from the site.
`customers`: Will clear only customers and related subscriptions (leaving the products untouched) for the site.
Revenue will also be reset to 0.
Use in query `cleanup_scope=all`.
**Default**: `'all'` | +| `cleanup_scope` | [`CleanupScope`](../../doc/models/cleanup-scope.md) | Query, Optional | `all`: Will clear all products, customers, and related subscriptions from the site.
`customers`: Will clear only customers and related subscriptions (leaving the products untouched) for the site.
Revenue will also be reset to 0.
Use in query `cleanup_scope=all`.

**Default**: `'all'` | ## Response Type @@ -145,8 +146,8 @@ def list_chargify_js_public_keys(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | ## Response Type @@ -160,6 +161,7 @@ collect = { 'per_page': 50 } result = sites_controller.list_chargify_js_public_keys(collect) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index 372cc755..a14b357b 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -61,6 +61,7 @@ result = subscription_components_controller.read_subscription_component( subscription_id, component_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -150,6 +151,7 @@ collect = { 'in_use': True } result = subscription_components_controller.list_subscription_components(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -235,6 +237,7 @@ result = subscription_components_controller.bulk_update_subscription_components_ subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -288,6 +291,7 @@ def bulk_reset_subscription_components_price_points(self, subscription_id = 222 result = subscription_components_controller.bulk_reset_subscription_components_price_points(subscription_id) +print(result) ``` ## Example Response *(as JSON)* @@ -481,6 +485,7 @@ result = subscription_components_controller.allocate_component( component_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -554,7 +559,7 @@ def list_allocations(self, | --- | --- | --- | --- | | `subscription_id` | `int` | Template, Required | The Chargify id of the subscription | | `component_id` | `int` | Template, Required | The Advanced Billing id of the component | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | ## Response Type @@ -574,6 +579,7 @@ result = subscription_components_controller.list_allocations( component_id, page=page ) +print(result) ``` ## Example Response *(as JSON)* @@ -680,6 +686,7 @@ result = subscription_components_controller.allocate_components( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -783,6 +790,7 @@ result = subscription_components_controller.preview_allocations( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1121,6 +1129,7 @@ result = subscription_components_controller.create_usage( component_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1180,8 +1189,8 @@ def list_usages(self, | `max_id` | `int` | Query, Optional | Returns usages with an id less than or equal to the one specified | | `since_date` | `date` | Query, Optional | Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the date specified. | | `until_date` | `date` | Query, Optional | Returns usages with a created_at date less than or equal to midnight (12:00 AM) on the date specified. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | ## Response Type @@ -1197,6 +1206,7 @@ collect = { 'per_page': 50 } result = subscription_components_controller.list_usages(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -1276,7 +1286,8 @@ body = ActivateEventBasedComponent( prices=[ Price( starting_quantity=1, - unit_price='5.0' + unit_price='5.0', + ending_quantity=None ) ], tax_included=False, @@ -1450,8 +1461,8 @@ def list_subscription_components_for_site(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `sort` | [`ListSubscriptionComponentsSort`](../../doc/models/list-subscription-components-sort.md) | Query, Optional | The attribute by which to sort. Use in query: `sort=updated_at`. | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`ListSubscriptionComponentsForSiteFilter`](../../doc/models/list-subscription-components-for-site-filter.md) | Query, Optional | Filter to use for List Subscription Components For Site operation | @@ -1460,7 +1471,7 @@ def list_subscription_components_for_site(self, | `start_datetime` | `str` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `start_datetime=2022-07-01 09:00:05`. | | `end_date` | `str` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `end_date=2011-12-16`. | | `end_datetime` | `str` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `end_datetime=2022-07-01 09:00:05`. | -| `subscription_ids` | `List[int]` | Query, Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `200` | +| `subscription_ids` | `List[int]` | Query, Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`.

**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `200` | | `price_point_ids` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | | `product_family_ids` | `List[int]` | Query, Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | | `include` | [`ListSubscriptionComponentsInclude`](../../doc/models/list-subscription-components-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | @@ -1497,5 +1508,6 @@ collect = { 'include': ListSubscriptionComponentsInclude.SUBSCRIPTION } result = subscription_components_controller.list_subscription_components_for_site(collect) +print(result) ``` diff --git a/doc/controllers/subscription-group-invoice-account.md b/doc/controllers/subscription-group-invoice-account.md index 15f8b1dd..22eb0fd7 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -43,6 +43,7 @@ def create_subscription_group_prepayment(self, uid = 'uid0' result = subscription_group_invoice_account_controller.create_subscription_group_prepayment(uid) +print(result) ``` ## Example Response *(as JSON)* @@ -78,8 +79,8 @@ def list_prepayments_for_subscription_group(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `str` | Template, Required | The uid of the subscription group | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | ## Response Type @@ -100,6 +101,7 @@ collect = { ) } result = subscription_group_invoice_account_controller.list_prepayments_for_subscription_group(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -168,6 +170,7 @@ result = subscription_group_invoice_account_controller.issue_subscription_group_ uid, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -228,6 +231,7 @@ result = subscription_group_invoice_account_controller.deduct_subscription_group uid, body=body ) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/subscription-group-status.md b/doc/controllers/subscription-group-status.md index 57835a02..df231927 100644 --- a/doc/controllers/subscription-group-status.md +++ b/doc/controllers/subscription-group-status.md @@ -183,6 +183,7 @@ result = subscription_group_status_controller.reactivate_subscription_group( uid, body=body ) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md index 2ac03df4..7f4aafc9 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -73,6 +73,7 @@ body = SubscriptionGroupSignupRequest( result = subscription_groups_controller.signup_with_subscription_group( body=body ) +print(result) ``` ## Errors @@ -118,6 +119,7 @@ body = CreateSubscriptionGroupRequest( result = subscription_groups_controller.create_subscription_group( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -166,8 +168,8 @@ def list_subscription_groups(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `include` | [`List[SubscriptionGroupsListInclude]`](../../doc/models/subscription-groups-list-include.md) | Query, Optional | A list of additional information to include in the response. The following values are supported:

- `account_balances`: Account balance information for the subscription groups. Use in query: `include[]=account_balances` | ## Response Type @@ -185,6 +187,7 @@ collect = { ] } result = subscription_groups_controller.list_subscription_groups(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -264,6 +267,7 @@ result = subscription_groups_controller.read_subscription_group( uid, include=include ) +print(result) ``` ## Example Response *(as JSON)* @@ -350,6 +354,7 @@ result = subscription_groups_controller.update_subscription_group_members( uid, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -406,6 +411,7 @@ def delete_subscription_group(self, uid = 'uid0' result = subscription_groups_controller.delete_subscription_group(uid) +print(result) ``` ## Example Response *(as JSON)* @@ -451,6 +457,7 @@ def find_subscription_group(self, subscription_id = 'subscription_id0' result = subscription_groups_controller.find_subscription_group(subscription_id) +print(result) ``` ## Example Response *(as JSON)* @@ -558,6 +565,7 @@ result = subscription_groups_controller.add_subscription_to_group( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md index 2a727835..34d7bfe1 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -15,6 +15,7 @@ subscription_invoice_account_controller = client.subscription_invoice_account * [List Prepayments](../../doc/controllers/subscription-invoice-account.md#list-prepayments) * [Issue Service Credit](../../doc/controllers/subscription-invoice-account.md#issue-service-credit) * [Deduct Service Credit](../../doc/controllers/subscription-invoice-account.md#deduct-service-credit) +* [List Service Credits](../../doc/controllers/subscription-invoice-account.md#list-service-credits) * [Refund Prepayment](../../doc/controllers/subscription-invoice-account.md#refund-prepayment) @@ -43,6 +44,7 @@ def read_account_balances(self, subscription_id = 222 result = subscription_invoice_account_controller.read_account_balances(subscription_id) +print(result) ``` @@ -91,6 +93,7 @@ result = subscription_invoice_account_controller.create_prepayment( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -130,8 +133,8 @@ def list_prepayments(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `int` | Template, Required | The Chargify id of the subscription | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | ## Response Type @@ -152,6 +155,7 @@ collect = { ) } result = subscription_invoice_account_controller.list_prepayments(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -218,6 +222,7 @@ result = subscription_invoice_account_controller.issue_service_credit( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -285,6 +290,85 @@ subscription_invoice_account_controller.deduct_service_credit( | 422 | Unprocessable Entity (WebDAV) | `APIException` | +# List Service Credits + +This request will list a subscription's service credits. + +```python +def list_service_credits(self, + subscription_id, + page=1, + per_page=20, + direction=None) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscription_id` | `int` | Template, Required | The Chargify id of the subscription | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | + +## Response Type + +[`ListServiceCreditsResponse`](../../doc/models/list-service-credits-response.md) + +## Example Usage + +```python +subscription_id = 222 + +page = 2 + +per_page = 50 + +result = subscription_invoice_account_controller.list_service_credits( + subscription_id, + page=page, + per_page=per_page +) +print(result) +``` + +## Example Response *(as JSON)* + +```json +{ + "service_credits": [ + { + "id": 68, + "amount_in_cents": 2200, + "ending_balance_in_cents": 1100, + "entry_type": "Debit", + "memo": "Service credit memo", + "invoice_uid": "inv_brntdvmmqxc3j", + "remaining_balance_in_cents": 1100, + "created_at": "2025-04-01T09:54:49-04:00" + }, + { + "id": 67, + "amount_in_cents": 3300, + "ending_balance_in_cents": 3300, + "entry_type": "Credit", + "memo": "Service credit memo", + "invoice_uid": null, + "remaining_balance_in_cents": 1100, + "created_at": "2025-03-05T16:06:08-05:00" + } + ] +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 404 | Not Found | `APIException` | +| 422 | Unprocessable Entity | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + # Refund Prepayment This endpoint will refund, completely or partially, a particular prepayment applied to a subscription. The `prepayment_id` will be the account transaction ID of the original payment. The prepayment must have some amount remaining in order to be refunded. @@ -321,6 +405,7 @@ result = subscription_invoice_account_controller.refund_prepayment( subscription_id, prepayment_id ) +print(result) ``` ## Errors diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md index 22d6ce3e..1d70b88d 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -62,6 +62,7 @@ result = subscription_notes_controller.create_subscription_note( subscription_id, body=body ) +print(result) ``` ## Errors @@ -85,8 +86,8 @@ def list_subscription_notes(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `int` | Template, Required | The Chargify id of the subscription | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | ## Response Type @@ -101,6 +102,7 @@ collect = { 'per_page': 50 } result = subscription_notes_controller.list_subscription_notes(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -169,6 +171,7 @@ result = subscription_notes_controller.read_subscription_note( subscription_id, note_id ) +print(result) ``` ## Example Response *(as JSON)* @@ -229,6 +232,7 @@ result = subscription_notes_controller.update_subscription_note( note_id, body=body ) +print(result) ``` ## Errors diff --git a/doc/controllers/subscription-products.md b/doc/controllers/subscription-products.md index 82d7edd9..8bdd64c3 100644 --- a/doc/controllers/subscription-products.md +++ b/doc/controllers/subscription-products.md @@ -109,6 +109,7 @@ result = subscription_products_controller.migrate_subscription_product( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -285,6 +286,7 @@ result = subscription_products_controller.preview_subscription_product_migration subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index 45247157..c1721023 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -55,6 +55,7 @@ def retry_subscription(self, subscription_id = 222 result = subscription_status_controller.retry_subscription(subscription_id) +print(result) ``` ## Example Response *(as JSON)* @@ -227,6 +228,7 @@ def cancel_subscription(self, subscription_id = 222 result = subscription_status_controller.cancel_subscription(subscription_id) +print(result) ``` ## Example Response *(as JSON)* @@ -388,7 +390,7 @@ def resume_subscription(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `int` | Template, Required | The Chargify id of the subscription | -| `calendar_billing_resumption_charge` | [`ResumptionCharge`](../../doc/models/resumption-charge.md) | Query, Optional | (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled
**Default**: `'prorated'` | +| `calendar_billing_resumption_charge` | [`ResumptionCharge`](../../doc/models/resumption-charge.md) | Query, Optional | (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled

**Default**: `'prorated'` | ## Response Type @@ -399,7 +401,8 @@ def resume_subscription(self, ```python subscription_id = 222 -Liquid error: Value cannot be null. (Parameter 'key')result = subscription_status_controller.resume_subscription(Liquid error: Value cannot be null. (Parameter 'key')subscription_id) +result = subscription_status_controller.resume_subscription(subscription_id) +print(result) ``` ## Example Response *(as JSON)* @@ -558,6 +561,7 @@ result = subscription_status_controller.pause_subscription( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -718,6 +722,7 @@ result = subscription_status_controller.update_automatic_subscription_resumption subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1046,6 +1051,7 @@ result = subscription_status_controller.reactivate_subscription( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1196,6 +1202,7 @@ def initiate_delayed_cancellation(self, subscription_id = 222 result = subscription_status_controller.initiate_delayed_cancellation(subscription_id) +print(result) ``` ## Errors @@ -1233,6 +1240,7 @@ def cancel_delayed_cancellation(self, subscription_id = 222 result = subscription_status_controller.cancel_delayed_cancellation(subscription_id) +print(result) ``` ## Example Response *(as JSON)* @@ -1275,6 +1283,7 @@ def cancel_dunning(self, subscription_id = 222 result = subscription_status_controller.cancel_dunning(subscription_id) +print(result) ``` ## Errors @@ -1354,6 +1363,7 @@ result = subscription_status_controller.preview_renewal( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index 3e15fae3..f3d05c4a 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -164,42 +164,6 @@ If you already have a customer and card stored in your payment gateway, you may } ``` -## Subscription with Credit Card - -```json -"subscription": { - "product_handle": "basic", - "customer_attributes": { - "first_name": "Joe", - "last_name": "Blow", - "email": "joe@example.com", - "zip": "02120", - "state": "MA", - "reference": "XYZ", - "phone": "(617) 111 - 0000", - "organization": "Acme", - "country": "US", - "city": "Boston", - "address_2": null, - "address": "123 Mass Ave." - }, - "credit_card_attributes": { - "last_name": "Smith", - "first_name": "Joe", - "full_number": "4111111111111111", - "expiration_year": "2021", - "expiration_month": "1", - "card_type": "visa", - "billing_zip": "02120", - "billing_state": "MA", - "billing_country": "US", - "billing_city": "Boston", - "billing_address_2": null, - "billing_address": "123 Mass Ave." - } -} -``` - ## Subscription with ACH as Payment Profile ```json @@ -723,6 +687,7 @@ body = CreateSubscriptionRequest( result = subscriptions_controller.create_subscription( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -892,12 +857,13 @@ def list_subscriptions(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `state` | [`SubscriptionStateFilter`](../../doc/models/subscription-state-filter.md) | Query, Optional | The current state of the subscription | | `product` | `int` | Query, Optional | The product id of the subscription. (Note that the product handle cannot be used.) | | `product_price_point_id` | `int` | Query, Optional | The ID of the product price point. If supplied, product is required | | `coupon` | `int` | Query, Optional | The numeric id of the coupon currently applied to the subscription. (This can be found in the URL when editing a coupon. Note that the coupon code cannot be used.) | +| `coupon_code` | `str` | Query, Optional | The coupon code currently applied to the subscription | | `date_field` | [`SubscriptionDateField`](../../doc/models/subscription-date-field.md) | Query, Optional | The type of filter you'd like to apply to your search. Allowed Values: , current_period_ends_at, current_period_starts_at, created_at, activated_at, canceled_at, expires_at, trial_started_at, trial_ended_at, updated_at | | `start_date` | `date` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `start_date=2022-07-01`. | | `end_date` | `date` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `end_date=2022-08-01`. | @@ -905,7 +871,7 @@ def list_subscriptions(self, | `end_datetime` | `datetime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns subscriptions with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `end_datetime=2022-08-01 10:00:05`. | | `metadata` | `Dict[str, str]` | Query, Optional | The value of the metadata field specified in the parameter. Use in query `metadata[my-field]=value&metadata[other-field]=another_value`. | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `sort` | [`SubscriptionSort`](../../doc/models/subscription-sort.md) | Query, Optional | The attribute by which to sort
**Default**: `'signup_date'` | +| `sort` | [`SubscriptionSort`](../../doc/models/subscription-sort.md) | Query, Optional | The attribute by which to sort

**Default**: `'signup_date'` | | `include` | [`List[SubscriptionListInclude]`](../../doc/models/subscription-list-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include[]=self_service_page_token`. | ## Response Type @@ -928,6 +894,7 @@ collect = { ] } result = subscriptions_controller.list_subscriptions(collect) +print(result) ``` @@ -999,12 +966,8 @@ subscription_id = 222 body = UpdateSubscriptionRequest( subscription=UpdateSubscription( - credit_card_attributes=CreditCardAttributes( - full_number='4111111111111111', - expiration_month='10', - expiration_year='2030' - ), - next_billing_at=dateutil.parser.parse('2010-08-06T15:34:00Z') + next_billing_at=dateutil.parser.parse('2010-08-06T15:34:00Z'), + payment_collection_method='remittance' ) ) @@ -1012,6 +975,7 @@ result = subscriptions_controller.update_subscription( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1170,6 +1134,7 @@ result = subscriptions_controller.read_subscription( subscription_id, include=include ) +print(result) ``` ## Example Response *(as JSON)* @@ -1401,6 +1366,7 @@ def find_subscription(self, ```python result = subscriptions_controller.find_subscription() +print(result) ``` ## Errors @@ -1458,6 +1424,7 @@ result = subscriptions_controller.purge_subscription( ack, cascade=cascade ) +print(result) ``` ## Errors @@ -1506,6 +1473,7 @@ result = subscriptions_controller.update_prepaid_subscription_configuration( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1533,11 +1501,11 @@ result = subscriptions_controller.update_prepaid_subscription_configuration( The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for a subscription creation. -The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). +The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. -## Side effects +A subscription will not be created by utilizing this endpoint; it is meant to serve as a prediction. -A subscription will not be created by sending a POST to this endpoint. It is meant to serve as a prediction. +For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). ## Taxable Subscriptions @@ -1584,6 +1552,7 @@ body = CreateSubscriptionRequest( result = subscriptions_controller.preview_subscription( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1752,6 +1721,7 @@ result = subscriptions_controller.apply_coupons_to_subscription( subscription_id, body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -1940,6 +1910,7 @@ def remove_coupon_from_subscription(self, subscription_id = 222 result = subscriptions_controller.remove_coupon_from_subscription(subscription_id) +print(result) ``` ## Example Response @@ -2024,6 +1995,7 @@ def activate_subscription(self, subscription_id = 222 result = subscriptions_controller.activate_subscription(subscription_id) +print(result) ``` ## Errors diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index 6dd3fd50..6532f47a 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -47,8 +47,8 @@ def list_webhooks(self, | `status` | [`WebhookStatus`](../../doc/models/webhook-status.md) | Query, Optional | Webhooks with matching status would be returned. | | `since_date` | `str` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date greater than or equal to the one specified. | | `until_date` | `str` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date less than or equal to the one specified. | -| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `int` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `per_page` | `int` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `order` | [`WebhookOrder`](../../doc/models/webhook-order.md) | Query, Optional | The order in which the Webhooks are returned. | | `subscription` | `int` | Query, Optional | The Advanced Billing id of a subscription you'd like to filter for | @@ -64,6 +64,7 @@ collect = { 'per_page': 50 } result = webhooks_controller.list_webhooks(collect) +print(result) ``` ## Example Response *(as JSON)* @@ -135,6 +136,7 @@ body = EnableWebhooksRequest( result = webhooks_controller.enable_webhooks( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -180,6 +182,7 @@ body = ReplayWebhooksRequest( result = webhooks_controller.replay_webhooks( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -229,6 +232,7 @@ body = CreateOrUpdateEndpointRequest( result = webhooks_controller.create_endpoint( body=body ) +print(result) ``` ## Example Response *(as JSON)* @@ -271,6 +275,7 @@ def list_endpoints(self) ```python result = webhooks_controller.list_endpoints() +print(result) ``` ## Example Response *(as JSON)* @@ -351,6 +356,7 @@ result = webhooks_controller.update_endpoint( endpoint_id, body=body ) +print(result) ``` ## Errors diff --git a/doc/http-date-time.md b/doc/http-date-time.md new file mode 100644 index 00000000..68eb3cb2 --- /dev/null +++ b/doc/http-date-time.md @@ -0,0 +1,12 @@ + +# HttpDateTime + +A utility class for wrapping datetime to support HTTP date format. + +## Methods + +| Name | Description | +| --- | --- | +| from_datetime | Converts a datetime object to an HTTP-compliant date string. | +| from_value | Parses an HTTP date string into a datetime object. | + diff --git a/doc/http-request.md b/doc/http-request.md index eda3865e..78b8691d 100644 --- a/doc/http-request.md +++ b/doc/http-request.md @@ -7,10 +7,10 @@ Represents a single Http Request. | Name | Type | Tag | Description | | --- | --- | --- | --- | -| http_method | HttpMethodEnum | | The HTTP method of the request. | -| query_url | str | | The endpoint URL for the API request. | -| headers | dict | optional | Request headers. | -| query_parameters | dict | optional | Query parameters to add in the URL. | -| parameters | dict | str | optional | Request body, either as a serialized string or else a list of parameters to form encode. | -| files | dict | optional | Files to be sent with the request. | +| http_method | `HttpMethodEnum` | | The HTTP method of the request. | +| query_url | `str` | | The endpoint URL for the API request. | +| headers | `dict` | optional | Request headers. | +| query_parameters | `dict` | optional | Query parameters to add in the URL. | +| parameters | `dict` | optional | Request body, either as a serialized string or else a list of parameters to form encode. | +| files | `dict` | optional | Files to be sent with the request. | diff --git a/doc/http-response.md b/doc/http-response.md index 0b9a4ae0..664273cb 100644 --- a/doc/http-response.md +++ b/doc/http-response.md @@ -7,9 +7,9 @@ Http response received. | Name | Type | Description | | --- | --- | --- | -| status_code | int | The status code returned by the server. | -| reason_phrase | str | The reason phrase returned by the server. | -| headers | dict | Response headers. | -| text | str | Response body. | -| request | [`HttpRequest`](http-request.md) | The request that resulted in this response. | +| status_code | `int` | The status code returned by the server. | +| reason_phrase | `str` | The reason phrase returned by the server. | +| headers | `dict` | Response headers. | +| text | `str` | Response body. | +| request | [`HttpRequest`](../doc/http-request.md) | The request that resulted in this response. | diff --git a/doc/models/apple-pay-payment-profile.md b/doc/models/apple-pay-payment-profile.md index e86c406f..02eeb79c 100644 --- a/doc/models/apple-pay-payment-profile.md +++ b/doc/models/apple-pay-payment-profile.md @@ -25,6 +25,8 @@ | `payment_type` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `'apple_pay'` | | `site_gateway_setting_id` | `int` | Optional | - | | `gateway_handle` | `str` | Optional | - | +| `created_at` | `datetime` | Optional | A timestamp indicating when this payment profile was created | +| `updated_at` | `datetime` | Optional | A timestamp indicating when this payment profile was last updated | ## Example (as JSON) diff --git a/doc/models/bank-account-payment-profile.md b/doc/models/bank-account-payment-profile.md index 0729855a..ba8b5fe3 100644 --- a/doc/models/bank-account-payment-profile.md +++ b/doc/models/bank-account-payment-profile.md @@ -28,9 +28,11 @@ | `bank_account_type` | [`BankAccountType`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | | `bank_account_holder_type` | [`BankAccountHolderType`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | | `payment_type` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `'bank_account'` | -| `verified` | `bool` | Optional | denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account
**Default**: `False` | +| `verified` | `bool` | Optional | denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account

**Default**: `False` | | `site_gateway_setting_id` | `int` | Optional | - | | `gateway_handle` | `str` | Optional | - | +| `created_at` | `datetime` | Optional | A timestamp indicating when this payment profile was created | +| `updated_at` | `datetime` | Optional | A timestamp indicating when this payment profile was last updated | ## Example (as JSON) diff --git a/doc/models/base-refund-error.md b/doc/models/base-refund-error.md index 7411e8a2..a6c9d721 100644 --- a/doc/models/base-refund-error.md +++ b/doc/models/base-refund-error.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `base` | `List[object]` | Optional | - | +| `base` | `List[Any]` | Optional | - | ## Example (as JSON) diff --git a/doc/models/chargify-ebb.md b/doc/models/chargify-ebb.md index 04db7b5b..6c77ff27 100644 --- a/doc/models/chargify-ebb.md +++ b/doc/models/chargify-ebb.md @@ -12,7 +12,7 @@ | `timestamp` | `datetime` | Optional | This timestamp determines what billing period the event will be billed in. If your request payload does not include it, Chargify will add `chargify.timestamp` to the event payload and set the value to `now`. | | `id` | `str` | Optional | A unique ID set by Chargify. Please note that this field is reserved. If `chargify.id` is present in the request payload, it will be overwritten. | | `created_at` | `datetime` | Optional | An ISO-8601 timestamp, set by Chargify at the time each event is recorded. Please note that this field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten. | -| `uniqueness_token` | `str` | Optional | User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days.
**Constraints**: *Maximum Length*: `64` | +| `uniqueness_token` | `str` | Optional | User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days.

**Constraints**: *Maximum Length*: `64` | | `subscription_id` | `int` | Optional | Id of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_id` if you configured `chargify.subscription_id` as Subscription Identifier in your Event Stream. | | `subscription_reference` | `str` | Optional | Reference of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_reference` if you configured `chargify.subscription_reference` as Subscription Identifier in your Event Stream. | diff --git a/doc/models/component.md b/doc/models/component.md index 933bf15e..569e36fa 100644 --- a/doc/models/component.md +++ b/doc/models/component.md @@ -17,6 +17,7 @@ | `unit_price` | `str` | Optional | The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null. | | `product_family_id` | `int` | Optional | The id of the Product Family to which the Component belongs | | `product_family_name` | `str` | Optional | The name of the Product Family to which the Component belongs | +| `product_family_handle` | `str` | Optional | The handle of the Product Family to which the Component belongs | | `price_per_unit_in_cents` | `int` | Optional | deprecated - use unit_price instead | | `kind` | [`ComponentKind`](../../doc/models/component-kind.md) | Optional | A handle for the component type | | `archived` | `bool` | Optional | Boolean flag describing whether a component is archived or not. | diff --git a/doc/models/coupon-request.md b/doc/models/coupon-request.md index 5e803f68..5caa4a6a 100644 --- a/doc/models/coupon-request.md +++ b/doc/models/coupon-request.md @@ -10,8 +10,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `coupon` | [`CouponPayload`](../../doc/models/coupon-payload.md) | Optional | - | -| `restricted_products` | `Dict[str, bool]` | Optional | An object where the keys are product_ids and the values are booleans indicating if the coupon should be applicable to the product | -| `restricted_components` | `Dict[str, bool]` | Optional | An object where the keys are component_ids and the values are booleans indicating if the coupon should be applicable to the component | +| `restricted_products` | `Dict[str, bool]` | Optional | An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the product | +| `restricted_components` | `Dict[str, bool]` | Optional | An object where the keys are component IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the component | ## Example (as JSON) diff --git a/doc/models/create-component-price-point.md b/doc/models/create-component-price-point.md index f1a7bc48..8e281aa6 100644 --- a/doc/models/create-component-price-point.md +++ b/doc/models/create-component-price-point.md @@ -13,7 +13,7 @@ | `handle` | `str` | Optional | - | | `pricing_scheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`List[Price]`](../../doc/models/price.md) | Required | - | -| `use_site_exchange_rate` | `bool` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Setting not supported when creating price points in bulk.
**Default**: `True` | +| `use_site_exchange_rate` | `bool` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Setting not supported when creating price points in bulk.

**Default**: `True` | | `tax_included` | `bool` | Optional | Whether or not the price point includes tax. Setting not supported when creating price points in bulk. | | `interval` | `int` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this price point, either month or day. This property is only available for sites with Multifrequency enabled. | diff --git a/doc/models/create-or-update-product.md b/doc/models/create-or-update-product.md index 3b1f4ff7..7ffe6d48 100644 --- a/doc/models/create-or-update-product.md +++ b/doc/models/create-or-update-product.md @@ -24,7 +24,7 @@ | `expiration_interval` | `int` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days. | | `expiration_interval_unit` | [`ExpirationIntervalUnit`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product, either month, day or never | | `auto_create_signup_page` | `bool` | Optional | - | -| `tax_code` | `str` | Optional | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
**Constraints**: *Maximum Length*: `10` | +| `tax_code` | `str` | Optional | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.

**Constraints**: *Maximum Length*: `10` | ## Example (as JSON) diff --git a/doc/models/create-prepaid-usage-component-price-point.md b/doc/models/create-prepaid-usage-component-price-point.md index 8b58d57b..89bf68c7 100644 --- a/doc/models/create-prepaid-usage-component-price-point.md +++ b/doc/models/create-prepaid-usage-component-price-point.md @@ -14,7 +14,7 @@ | `pricing_scheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`List[Price]`](../../doc/models/price.md) | Required | - | | `overage_pricing` | [`OveragePricing`](../../doc/models/overage-pricing.md) | Required | - | -| `use_site_exchange_rate` | `bool` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.
**Default**: `True` | +| `use_site_exchange_rate` | `bool` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.

**Default**: `True` | | `rollover_prepaid_remainder` | `bool` | Optional | (only for prepaid usage components) Boolean which controls whether or not remaining units should be rolled over to the next period | | `renew_prepaid_allocation` | `bool` | Optional | (only for prepaid usage components) Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period | | `expiration_interval` | `float` | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire | diff --git a/doc/models/create-product-price-point.md b/doc/models/create-product-price-point.md index 43dd114b..0316c537 100644 --- a/doc/models/create-product-price-point.md +++ b/doc/models/create-product-price-point.md @@ -22,7 +22,7 @@ | `initial_charge_after_trial` | `bool` | Optional | - | | `expiration_interval` | `int` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | | `expiration_interval_unit` | [`ExpirationIntervalUnit`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product price point, either month, day or never | -| `use_site_exchange_rate` | `bool` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.
**Default**: `True` | +| `use_site_exchange_rate` | `bool` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.

**Default**: `True` | ## Example (as JSON) diff --git a/doc/models/create-subscription-request.md b/doc/models/create-subscription-request.md index 32da40e5..117b150e 100644 --- a/doc/models/create-subscription-request.md +++ b/doc/models/create-subscription-request.md @@ -16,6 +16,7 @@ ```json { "subscription": { + "defer_signup": false, "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" diff --git a/doc/models/create-subscription.md b/doc/models/create-subscription.md index 181310b9..92b1bc14 100644 --- a/doc/models/create-subscription.md +++ b/doc/models/create-subscription.md @@ -21,11 +21,12 @@ | `net_terms` | `str` | Optional | (Optional) Default: null The number of days after renewal (on invoice billing) that a subscription is due. A value between 0 (due immediately) and 180. | | `customer_id` | `int` | Optional | The ID of an existing customer within Chargify. Required, unless a `customer_reference` or a set of `customer_attributes` is given. | | `next_billing_at` | `datetime` | Optional | (Optional) Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by next_billing_at. If you do not provide a value for next_billing_at, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. See further notes in the section on Importing Subscriptions. | -| `initial_billing_at` | `datetime` | Optional | (Optional) Set this attribute to a future date/time to create a subscription in the "Awaiting Signup" state, rather than "Active" or "Trialing". See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). In the "Awaiting Signup" state, a subscription behaves like any other. It can be canceled, allocated to, had its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See further notes in the section on Delayed Signups. | +| `initial_billing_at` | `datetime` | Optional | (Optional) Set this attribute to a future date/time to create a subscription in the Awaiting Signup state, rather than Active or Trialing. You can omit the initial_billing_at date to activate the subscription immediately. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time Formats. | +| `defer_signup` | `bool` | Optional | (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date state. Use this when you want to create a subscription that has an unknown first billing date. When the first billing date is known, update a subscription and set the `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `False` | | `stored_credential_transaction_id` | `int` | Optional | For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. | | `sales_rep_id` | `int` | Optional | - | | `payment_profile_id` | `int` | Optional | The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id) | -| `reference` | `str` | Optional | The reference value (provided by your app) for the subscription itelf. | +| `reference` | `str` | Optional | The reference value (provided by your app) for the subscription itself. | | `customer_attributes` | [`CustomerAttributes`](../../doc/models/customer-attributes.md) | Optional | - | | `payment_profile_attributes` | [`PaymentProfileAttributes`](../../doc/models/payment-profile-attributes.md) | Optional | alias to credit_card_attributes | | `credit_card_attributes` | [`PaymentProfileAttributes`](../../doc/models/payment-profile-attributes.md) | Optional | Credit Card data to create a new Subscription. Interchangeable with `payment_profile_attributes` property. | @@ -46,7 +47,7 @@ | `authorizer_last_name` | `str` | Optional | (Optional) The last name of the person authorizing the ACH agreement. | | `calendar_billing_first_charge` | `str` | Optional | (Optional) One of “prorated” (the default – the prorated product price will be charged immediately), “immediate” (the full product price will be charged immediately), or “delayed” (the full product price will be charged with the first scheduled renewal). | | `reason_code` | `str` | Optional | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to indicate why a subscription was canceled. | -| `product_change_delayed` | `bool` | Optional | (Optional, used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. | +| `product_change_delayed` | `bool` | Optional | (Optional) used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. | | `offer_id` | str \| int \| None | Optional | This is a container for one-of cases. | | `prepaid_configuration` | [`UpsertPrepaidConfiguration`](../../doc/models/upsert-prepaid-configuration.md) | Optional | - | | `previous_billing_at` | `datetime` | Optional | Providing a previous_billing_at that is in the past will set the current_period_starts_at when the subscription is created. It will also set activated_at if not explicitly passed during the subscription import. Can only be used if next_billing_at is also passed. Using this option will allow you to set the period start for the subscription so mid period component allocations have the correct prorated amount. | @@ -55,14 +56,15 @@ | `activated_at` | `datetime` | Optional | - | | `agreement_acceptance` | [`AgreementAcceptance`](../../doc/models/agreement-acceptance.md) | Optional | Required when creating a subscription with Maxio Payments. | | `ach_agreement` | [`ACHAgreement`](../../doc/models/ach-agreement.md) | Optional | (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted. | -| `dunning_communication_delay_enabled` | `bool` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute.
**Default**: `False` | +| `dunning_communication_delay_enabled` | `bool` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute.

**Default**: `False` | | `dunning_communication_delay_time_zone` | `str` | Optional | Time zone for the Dunning Communication Delay feature. | -| `skip_billing_manifest_taxes` | `bool` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests.
**Default**: `False` | +| `skip_billing_manifest_taxes` | `bool` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests.

**Default**: `False` | ## Example (as JSON) ```json { + "defer_signup": false, "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" diff --git a/doc/models/credit-card-payment-profile.md b/doc/models/credit-card-payment-profile.md index 54c23df2..b21e0a82 100644 --- a/doc/models/credit-card-payment-profile.md +++ b/doc/models/credit-card-payment-profile.md @@ -31,6 +31,8 @@ | `chargify_token` | `str` | Optional | Token received after sending billing information using chargify.js. This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | | `site_gateway_setting_id` | `int` | Optional | - | | `gateway_handle` | `str` | Optional | An identifier of connected gateway. | +| `created_at` | `datetime` | Optional | A timestamp indicating when this payment profile was created | +| `updated_at` | `datetime` | Optional | A timestamp indicating when this payment profile was last updated | ## Example (as JSON) diff --git a/doc/models/ebb-component.md b/doc/models/ebb-component.md index 8e23d7fd..11dc6ac5 100644 --- a/doc/models/ebb-component.md +++ b/doc/models/ebb-component.md @@ -12,7 +12,7 @@ | `name` | `str` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `unit_name` | `str` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `str` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `bool` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricing_scheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`List[Price]`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | diff --git a/doc/models/error-array-map-response-exception.md b/doc/models/error-array-map-response-exception.md index c02892dc..9cbf641f 100644 --- a/doc/models/error-array-map-response-exception.md +++ b/doc/models/error-array-map-response-exception.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `errors` | `Dict[str, object]` | Optional | - | +| `errors` | `Dict[str, Any]` | Optional | - | ## Example (as JSON) diff --git a/doc/models/event-based-billing-segment-error.md b/doc/models/event-based-billing-segment-error.md index 4af6273c..9043818d 100644 --- a/doc/models/event-based-billing-segment-error.md +++ b/doc/models/event-based-billing-segment-error.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `segments` | `Dict[str, object]` | Required | The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key. | +| `segments` | `Dict[str, Any]` | Required | The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key. | ## Example (as JSON) diff --git a/doc/models/event-based-billing-segment-errors-exception.md b/doc/models/event-based-billing-segment-errors-exception.md index e3eca5e6..33d8b10e 100644 --- a/doc/models/event-based-billing-segment-errors-exception.md +++ b/doc/models/event-based-billing-segment-errors-exception.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `errors` | `Dict[str, object]` | Optional | The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key. | +| `errors` | `Dict[str, Any]` | Optional | The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key. | ## Example (as JSON) diff --git a/doc/models/group-billing.md b/doc/models/group-billing.md index 1794bc35..50d2562b 100644 --- a/doc/models/group-billing.md +++ b/doc/models/group-billing.md @@ -11,9 +11,9 @@ Optional attributes related to billing date and accrual. Note: Only applicable f | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `accrue` | `bool` | Optional | A flag indicating whether or not to accrue charges on the new subscription.
**Default**: `False` | -| `align_date` | `bool` | Optional | A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be true if prorate is also true.
**Default**: `False` | -| `prorate` | `bool` | Optional | A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of true is ignored unless align_date is also true.
**Default**: `False` | +| `accrue` | `bool` | Optional | A flag indicating whether or not to accrue charges on the new subscription.

**Default**: `False` | +| `align_date` | `bool` | Optional | A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be true if prorate is also true.

**Default**: `False` | +| `prorate` | `bool` | Optional | A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of true is ignored unless align_date is also true.

**Default**: `False` | ## Example (as JSON) diff --git a/doc/models/issue-invoice-request.md b/doc/models/issue-invoice-request.md index 0a560e5b..5ceacdc7 100644 --- a/doc/models/issue-invoice-request.md +++ b/doc/models/issue-invoice-request.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `on_failed_payment` | [`FailedPaymentAction`](../../doc/models/failed-payment-action.md) | Optional | Action taken when payment for an invoice fails:

- `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option.
- `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history.
- `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).
**Default**: `'leave_open_invoice'` | +| `on_failed_payment` | [`FailedPaymentAction`](../../doc/models/failed-payment-action.md) | Optional | Action taken when payment for an invoice fails:

- `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option.
- `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history.
- `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).

**Default**: `'leave_open_invoice'` | ## Example (as JSON) diff --git a/doc/models/list-components-filter.md b/doc/models/list-components-filter.md index 9aa1bcb4..d205da1a 100644 --- a/doc/models/list-components-filter.md +++ b/doc/models/list-components-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `ids` | `List[int]` | Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | +| `ids` | `List[int]` | Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `use_site_exchange_rate` | `bool` | Optional | Allows fetching components with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | ## Example (as JSON) diff --git a/doc/models/list-coupons-filter.md b/doc/models/list-coupons-filter.md index 885b7344..9711b108 100644 --- a/doc/models/list-coupons-filter.md +++ b/doc/models/list-coupons-filter.md @@ -14,7 +14,7 @@ | `end_date` | `date` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `filter[end_date]=2011-12-15`. | | `start_datetime` | `datetime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `filter[start_datetime]=2011-12-19T10:15:30+01:00`. | | `end_datetime` | `datetime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `filter[end_datetime]=2011-12-1T10:15:30+01:00`. | -| `ids` | `List[int]` | Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | +| `ids` | `List[int]` | Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `codes` | `List[str]` | Optional | Allows fetching coupons with matching codes based on provided values. Use in query `filter[codes]=free,free_trial`. | | `use_site_exchange_rate` | `bool` | Optional | Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | diff --git a/doc/models/list-mrr-filter.md b/doc/models/list-mrr-filter.md index 67df4ad2..0137b000 100644 --- a/doc/models/list-mrr-filter.md +++ b/doc/models/list-mrr-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `subscription_ids` | `List[int]` | Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | +| `subscription_ids` | `List[int]` | Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | ## Example (as JSON) diff --git a/doc/models/list-products-filter.md b/doc/models/list-products-filter.md index 16d31f34..bc2272cd 100644 --- a/doc/models/list-products-filter.md +++ b/doc/models/list-products-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `ids` | `List[int]` | Optional | Allows fetching products with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | +| `ids` | `List[int]` | Optional | Allows fetching products with matching id based on provided values. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `prepaid_product_price_point` | [`PrepaidProductPricePointFilter`](../../doc/models/prepaid-product-price-point-filter.md) | Optional | Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. | | `use_site_exchange_rate` | `bool` | Optional | Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | diff --git a/doc/models/list-service-credits-response.md b/doc/models/list-service-credits-response.md new file mode 100644 index 00000000..b39e8887 --- /dev/null +++ b/doc/models/list-service-credits-response.md @@ -0,0 +1,36 @@ + +# List Service Credits Response + +## Structure + +`ListServiceCreditsResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `service_credits` | [`List[ServiceCredit1]`](../../doc/models/service-credit-1.md) | Optional | - | + +## Example (as JSON) + +```json +{ + "service_credits": [ + { + "id": 224, + "amount_in_cents": 54, + "ending_balance_in_cents": 94, + "entry_type": "Credit", + "memo": "memo2" + }, + { + "id": 224, + "amount_in_cents": 54, + "ending_balance_in_cents": 94, + "entry_type": "Credit", + "memo": "memo2" + } + ] +} +``` + diff --git a/doc/models/list-subscription-components-filter.md b/doc/models/list-subscription-components-filter.md index d11ecbca..109c7c4a 100644 --- a/doc/models/list-subscription-components-filter.md +++ b/doc/models/list-subscription-components-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `currencies` | `List[str]` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.
**Constraints**: *Minimum Items*: `1` | +| `currencies` | `List[str]` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.

**Constraints**: *Minimum Items*: `1` | | `use_site_exchange_rate` | `bool` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | ## Example (as JSON) diff --git a/doc/models/list-subscription-components-for-site-filter.md b/doc/models/list-subscription-components-for-site-filter.md index d4a8feac..53b97a73 100644 --- a/doc/models/list-subscription-components-for-site-filter.md +++ b/doc/models/list-subscription-components-for-site-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `currencies` | `List[str]` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`.
**Constraints**: *Minimum Items*: `1` | +| `currencies` | `List[str]` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`.

**Constraints**: *Minimum Items*: `1` | | `use_site_exchange_rate` | `bool` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | | `subscription` | [`SubscriptionFilter`](../../doc/models/subscription-filter.md) | Optional | Nested filter used for List Subscription Components For Site Filter | diff --git a/doc/models/metered-component.md b/doc/models/metered-component.md index 93eb1d54..fed1990e 100644 --- a/doc/models/metered-component.md +++ b/doc/models/metered-component.md @@ -12,7 +12,7 @@ | `name` | `str` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `unit_name` | `str` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `str` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `bool` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricing_scheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`List[Price]`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | diff --git a/doc/models/on-off-component.md b/doc/models/on-off-component.md index 6a486ded..385ce7dc 100644 --- a/doc/models/on-off-component.md +++ b/doc/models/on-off-component.md @@ -11,7 +11,7 @@ | --- | --- | --- | --- | | `name` | `str` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `description` | `str` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `bool` | Optional | Boolean flag describing whether a component is taxable or not. | | `upgrade_charge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | | `downgrade_credit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | diff --git a/doc/models/override-subscription.md b/doc/models/override-subscription.md index faf01c90..604171fa 100644 --- a/doc/models/override-subscription.md +++ b/doc/models/override-subscription.md @@ -12,7 +12,7 @@ | `activated_at` | `datetime` | Optional | Can be used to record an external signup date. Chargify uses this field to record when a subscription first goes active (either at signup or at trial end). Only ISO8601 format is supported. | | `canceled_at` | `datetime` | Optional | Can be used to record an external cancellation date. Chargify sets this field automatically when a subscription is canceled, whether by request or via dunning. Only ISO8601 format is supported. | | `cancellation_message` | `str` | Optional | Can be used to record a reason for the original cancellation. | -| `expires_at` | `datetime` | Optional | Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. | +| `expires_at` | `datetime` | Optional | Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. This field is not supported when Multi-frequency is enabled for the Site. To change the Term End of a Subscription, use the Update Subscription endpoint. | | `current_period_starts_at` | `datetime` | Optional | Can only be used when a subscription is unbilled, which happens when a future initial billing date is passed at subscription creation. The value passed must be before the current date and time. Allows you to set when the period started so mid period component allocations have the correct proration. Only ISO8601 format is supported. | ## Example (as JSON) diff --git a/doc/models/paypal-payment-profile.md b/doc/models/paypal-payment-profile.md index a5021152..dd554eab 100644 --- a/doc/models/paypal-payment-profile.md +++ b/doc/models/paypal-payment-profile.md @@ -26,6 +26,8 @@ | `site_gateway_setting_id` | `int` | Optional | - | | `gateway_handle` | `str` | Optional | - | | `paypal_email` | `str` | Optional | - | +| `created_at` | `datetime` | Optional | A timestamp indicating when this payment profile was created | +| `updated_at` | `datetime` | Optional | A timestamp indicating when this payment profile was last updated | ## Example (as JSON) diff --git a/doc/models/prepaid-product-price-point-filter.md b/doc/models/prepaid-product-price-point-filter.md index 757f11b7..305a2d7f 100644 --- a/doc/models/prepaid-product-price-point-filter.md +++ b/doc/models/prepaid-product-price-point-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `product_price_point_id` | `str` | Required, Constant | Passed as a parameter to list methods to return only non null values.
**Value**: `'not_null'` | +| `product_price_point_id` | `str` | Required, Constant | Passed as a parameter to list methods to return only non null values.

**Value**: `'not_null'` | ## Example (as JSON) diff --git a/doc/models/prepaid-usage-component.md b/doc/models/prepaid-usage-component.md index c6c46622..6ac4bad2 100644 --- a/doc/models/prepaid-usage-component.md +++ b/doc/models/prepaid-usage-component.md @@ -12,7 +12,7 @@ | `name` | `str` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `unit_name` | `str` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `str` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `bool` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricing_scheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`List[Price]`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | diff --git a/doc/models/quantity-based-component.md b/doc/models/quantity-based-component.md index 9e37cf15..5c01bcd1 100644 --- a/doc/models/quantity-based-component.md +++ b/doc/models/quantity-based-component.md @@ -12,7 +12,7 @@ | `name` | `str` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `unit_name` | `str` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `str` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `str` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `bool` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricing_scheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`List[Price]`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | diff --git a/doc/models/reactivation-billing.md b/doc/models/reactivation-billing.md index 7d7c9318..a555fb21 100644 --- a/doc/models/reactivation-billing.md +++ b/doc/models/reactivation-billing.md @@ -11,7 +11,7 @@ These values are only applicable to subscriptions using calendar billing | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `reactivation_charge` | [`ReactivationCharge`](../../doc/models/reactivation-charge.md) | Optional | You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal
**Default**: `'prorated'` | +| `reactivation_charge` | [`ReactivationCharge`](../../doc/models/reactivation-charge.md) | Optional | You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal

**Default**: `'prorated'` | ## Example (as JSON) diff --git a/doc/models/service-credit-1.md b/doc/models/service-credit-1.md new file mode 100644 index 00000000..060dce09 --- /dev/null +++ b/doc/models/service-credit-1.md @@ -0,0 +1,32 @@ + +# Service Credit 1 + +## Structure + +`ServiceCredit1` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `int` | Optional | - | +| `amount_in_cents` | `int` | Optional | The amount in cents of the entry | +| `ending_balance_in_cents` | `int` | Optional | The new balance for the credit account | +| `entry_type` | [`ServiceCreditType`](../../doc/models/service-credit-type.md) | Optional | The type of entry | +| `memo` | `str` | Optional | The memo attached to the entry | +| `invoice_uid` | `str` | Optional | The invoice uid associated with the entry. Only present for debit entries | +| `remaining_balance_in_cents` | `int` | Optional | The remaining balance for the entry | +| `created_at` | `datetime` | Optional | The date and time the entry was created | + +## Example (as JSON) + +```json +{ + "id": 174, + "amount_in_cents": 4, + "ending_balance_in_cents": 44, + "entry_type": "Credit", + "memo": "memo8" +} +``` + diff --git a/doc/models/subscription-filter.md b/doc/models/subscription-filter.md index e81e42d9..a9993149 100644 --- a/doc/models/subscription-filter.md +++ b/doc/models/subscription-filter.md @@ -11,7 +11,7 @@ Nested filter used for List Subscription Components For Site Filter | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `states` | [`List[SubscriptionStateFilter]`](../../doc/models/subscription-state-filter.md) | Optional | Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`.
**Constraints**: *Minimum Items*: `1` | +| `states` | [`List[SubscriptionStateFilter]`](../../doc/models/subscription-state-filter.md) | Optional | Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`.

**Constraints**: *Minimum Items*: `1` | | `date_field` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Optional | The type of filter you'd like to apply to your search. To use this filter you also have to include the following param in the request `include=subscription`. | | `start_date` | `date` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | | `end_date` | `date` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | diff --git a/doc/models/subscription-group-credit-card.md b/doc/models/subscription-group-credit-card.md index 6350a577..f86e4a20 100644 --- a/doc/models/subscription-group-credit-card.md +++ b/doc/models/subscription-group-credit-card.md @@ -9,9 +9,6 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `full_number` | str \| int \| None | Optional | This is a container for one-of cases. | -| `expiration_month` | str \| int \| None | Optional | This is a container for one-of cases. | -| `expiration_year` | str \| int \| None | Optional | This is a container for one-of cases. | | `chargify_token` | `str` | Optional | - | | `vault_token` | `str` | Optional | - | | `current_vault` | [`CreditCardVault`](../../doc/models/credit-card-vault.md) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | @@ -24,6 +21,9 @@ | `billing_state` | `str` | Optional | - | | `billing_zip` | `str` | Optional | - | | `billing_country` | `str` | Optional | - | +| `full_number` | str \| int \| None | Optional | This is a container for one-of cases. | +| `expiration_month` | str \| int \| None | Optional | This is a container for one-of cases. | +| `expiration_year` | str \| int \| None | Optional | This is a container for one-of cases. | | `last_four` | `str` | Optional | - | | `card_type` | [`CardType`](../../doc/models/card-type.md) | Optional | The type of card used. | | `customer_vault_token` | `str` | Optional | - | @@ -34,11 +34,12 @@ ```json { - "full_number": 4111111111111111, "chargify_token": "tok_592nf92ng0sjd4300p", - "expiration_month": "String1", - "expiration_year": "String5", - "vault_token": "vault_token6" + "full_number": 4111111111111111, + "vault_token": "vault_token6", + "current_vault": "braintree_blue", + "gateway_handle": "gateway_handle6", + "first_name": "first_name4" } ``` diff --git a/doc/models/subscription-migration-preview-options.md b/doc/models/subscription-migration-preview-options.md index f06c4c6d..d16fb2e5 100644 --- a/doc/models/subscription-migration-preview-options.md +++ b/doc/models/subscription-migration-preview-options.md @@ -11,10 +11,10 @@ | --- | --- | --- | --- | | `product_id` | `int` | Optional | The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `product_price_point_id` | `int` | Optional | The ID of the specified product's price point. This can be passed to migrate to a non-default price point. | -| `include_trial` | `bool` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.
**Default**: `False` | -| `include_initial_charge` | `bool` | Optional | If `true` is sent initial charges will be assessed.
**Default**: `False` | -| `include_coupons` | `bool` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.
**Default**: `True` | -| `preserve_period` | `bool` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.
**Default**: `False` | +| `include_trial` | `bool` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.

**Default**: `False` | +| `include_initial_charge` | `bool` | Optional | If `true` is sent initial charges will be assessed.

**Default**: `False` | +| `include_coupons` | `bool` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.

**Default**: `True` | +| `preserve_period` | `bool` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.

**Default**: `False` | | `product_handle` | `str` | Optional | The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `product_price_point_handle` | `str` | Optional | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | | `proration` | [`Proration`](../../doc/models/proration.md) | Optional | - | diff --git a/doc/models/subscription-product-migration.md b/doc/models/subscription-product-migration.md index 2bd9a533..57f664dd 100644 --- a/doc/models/subscription-product-migration.md +++ b/doc/models/subscription-product-migration.md @@ -11,10 +11,10 @@ | --- | --- | --- | --- | | `product_id` | `int` | Optional | The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `product_price_point_id` | `int` | Optional | The ID of the specified product's price point. This can be passed to migrate to a non-default price point. | -| `include_trial` | `bool` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.
**Default**: `False` | -| `include_initial_charge` | `bool` | Optional | If `true` is sent initial charges will be assessed.
**Default**: `False` | -| `include_coupons` | `bool` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.
**Default**: `True` | -| `preserve_period` | `bool` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.
**Default**: `False` | +| `include_trial` | `bool` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.

**Default**: `False` | +| `include_initial_charge` | `bool` | Optional | If `true` is sent initial charges will be assessed.

**Default**: `False` | +| `include_coupons` | `bool` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.

**Default**: `True` | +| `preserve_period` | `bool` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.

**Default**: `False` | | `product_handle` | `str` | Optional | The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `product_price_point_handle` | `str` | Optional | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | | `proration` | [`Proration`](../../doc/models/proration.md) | Optional | - | diff --git a/doc/models/tax-configuration.md b/doc/models/tax-configuration.md index 2153aae1..f37917f3 100644 --- a/doc/models/tax-configuration.md +++ b/doc/models/tax-configuration.md @@ -11,7 +11,7 @@ | --- | --- | --- | --- | | `kind` | [`TaxConfigurationKind`](../../doc/models/tax-configuration-kind.md) | Optional | **Default**: `'custom'` | | `destination_address` | [`TaxDestinationAddress`](../../doc/models/tax-destination-address.md) | Optional | - | -| `fully_configured` | `bool` | Optional | Returns `true` when Chargify has been properly configured to charge tax using the specified tax system. More details about taxes: https://maxio.zendesk.com/hc/en-us/articles/24287012608909-Taxes-Overview
**Default**: `False` | +| `fully_configured` | `bool` | Optional | Returns `true` when Chargify has been properly configured to charge tax using the specified tax system. More details about taxes: https://maxio.zendesk.com/hc/en-us/articles/24287012608909-Taxes-Overview

**Default**: `False` | ## Example (as JSON) diff --git a/doc/models/update-subscription-request.md b/doc/models/update-subscription-request.md index eba94260..ede8dd80 100644 --- a/doc/models/update-subscription-request.md +++ b/doc/models/update-subscription-request.md @@ -16,6 +16,7 @@ ```json { "subscription": { + "defer_signup": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "credit_card_attributes": { "full_number": "full_number2", diff --git a/doc/models/update-subscription.md b/doc/models/update-subscription.md index 928ac7b8..5a9bd1fc 100644 --- a/doc/models/update-subscription.md +++ b/doc/models/update-subscription.md @@ -16,7 +16,10 @@ | `next_product_id` | `str` | Optional | Set to an empty string to cancel a delayed product change. | | `next_product_price_point_id` | `str` | Optional | - | | `snap_day` | [SnapDay](../../doc/models/snap-day.md) \| int \| None | Optional | This is a container for one-of cases. | +| `initial_billing_at` | `datetime` | Optional | (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the `initial_billing_at` date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. You can omit the initial_billing_at date to activate the subscription immediately. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time formats. | +| `defer_signup` | `bool` | Optional | (Optional) Set this attribute to true to move the subscription from Awaiting Signup, to Awaiting Signup Date. Use this when you want to update a subscription that has an unknown initial billing date. When the first billing date is known, update a subscription to set the `initial_billing_at` date. The subscription moves to the awaiting signup with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `False` | | `next_billing_at` | `datetime` | Optional | - | +| `expires_at` | `datetime` | Optional | Timestamp giving the expiration date of this subscription (if any). You may manually change the expiration date at any point during a subscription period. | | `payment_collection_method` | `str` | Optional | - | | `receives_invoice_emails` | `bool` | Optional | - | | `net_terms` | str \| int \| None | Optional | This is a container for one-of cases. | @@ -33,6 +36,7 @@ ```json { + "defer_signup": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "credit_card_attributes": { "full_number": "full_number2", diff --git a/doc/rfc3339-date-time.md b/doc/rfc3339-date-time.md new file mode 100644 index 00000000..3932baab --- /dev/null +++ b/doc/rfc3339-date-time.md @@ -0,0 +1,12 @@ + +# RFC3339DateTime + +A utility class for wrapping datetime to support RFC3339 date format. + +## Methods + +| Name | Description | +| --- | --- | +| from_datetime | Converts a datetime object to an RFC 3339 date string. | +| from_value | Parses an RFC 3339 date string into a datetime object. | + diff --git a/doc/unix-date-time.md b/doc/unix-date-time.md new file mode 100644 index 00000000..41f96235 --- /dev/null +++ b/doc/unix-date-time.md @@ -0,0 +1,12 @@ + +# UnixDateTime + +A utility class for wrapping datetime to support Unix date format. + +## Methods + +| Name | Description | +| --- | --- | +| from_datetime | Converts a datetime object to a Unix timestamp (seconds since epoch). | +| from_value | Parses a Unix timestamp into a datetime object. | + diff --git a/doc/utility-classes.md b/doc/utility-classes.md deleted file mode 100644 index 0a63da7c..00000000 --- a/doc/utility-classes.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Utility Classes Documentation - -## ApiHelper - -A utility class for processing API Calls. Also contains classes for supporting standard datetime formats. - -### Methods - -| Name | Description | -| --- | --- | -| json_deserialize | Deserializes a JSON string to a Python dictionary. | - -### Classes - -| Name | Description | -| --- | --- | -| HttpDateTime | A wrapper for datetime to support HTTP date format. | -| UnixDateTime | A wrapper for datetime to support Unix date format. | -| RFC3339DateTime | A wrapper for datetime to support RFC3339 format. | - diff --git a/pyproject.toml b/pyproject.toml index 85dcd4a9..f8454935 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,25 @@ [build-system] -build-backend = "setuptools.build_meta" requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" [project] name = "maxio-advanced-billing-sdk" description = "Ultimate billing and pricing flexibility for B2B SaaS.\nMaxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments." -version = "6.1.0" +version = "7.0.0" readme = "README.md" -requires-python = ">=3.7" keywords = ["Maxio", "Advaced Billing", "Payments", "Subscription"] -authors = [{name = "Maxio SDK", email = "maxio-sdk@maxio.com"}] -urls = {Homepage = "https://www.maxio.com/product/advanced-billing"} -dependencies = ["apimatic-core~=0.2.0, >= 0.2.17", "apimatic-core-interfaces~=0.1.0, >= 0.1.5", "apimatic-requests-client-adapter~=0.1.0, >= 0.1.6", "deprecation~=2.1"] +dependencies = ["apimatic-core~=0.2.0, >= 0.2.20", "apimatic-core-interfaces~=0.1.0, >= 0.1.5", "apimatic-requests-client-adapter~=0.1.0, >= 0.1.6", "deprecation~=2.1"] classifiers = [] +requires-python = ">=3.7" +[[project.authors]] +name = "Maxio SDK" +email = "maxio-sdk@maxio.com" + +[project.urls] +Homepage = "https://www.maxio.com/product/advanced-billing" [project.optional-dependencies] testutils = ["pytest>=7.2.2"] +[tool] +[tool.setuptools] +[tool.setuptools.packages] [tool.setuptools.packages.find] exclude = ["tests", "tests.*"] diff --git a/requirements.txt b/requirements.txt index c6c51b54..281cd7ac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -apimatic-core~=0.2.0, >= 0.2.17 +apimatic-core~=0.2.0, >= 0.2.20 apimatic-core-interfaces~=0.1.0, >= 0.1.5 apimatic-requests-client-adapter~=0.1.0, >= 0.1.6 -deprecation~=2.1 +deprecation~=2.1 \ No newline at end of file