Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DE-117] Fix for deserialization issue in "apimatic-core" #27

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions advancedbilling/controllers/advance_invoice_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.invoice import Invoice
from advancedbilling.exceptions.api_exception import APIException
from advancedbilling.exceptions.error_list_response_exception import ErrorListResponseException
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/api_exports_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.proforma_invoice import ProformaInvoice
from advancedbilling.models.invoice import Invoice
from advancedbilling.models.subscription import Subscription
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/billing_portal_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.customer_response import CustomerResponse
from advancedbilling.models.portal_management_link import PortalManagementLink
from advancedbilling.models.resent_invitation import ResentInvitation
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/components_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.types.array_serialization_format import SerializationFormats
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.component_response import ComponentResponse
from advancedbilling.models.component import Component
from advancedbilling.models.component_price_point_response import ComponentPricePointResponse
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/coupons_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.types.array_serialization_format import SerializationFormats
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.coupon_response import CouponResponse
from advancedbilling.models.coupon_usage import CouponUsage
from advancedbilling.models.coupon_currency_response import CouponCurrencyResponse
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/custom_fields_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.types.array_serialization_format import SerializationFormats
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.metafield import Metafield
from advancedbilling.models.list_metafields_response import ListMetafieldsResponse
from advancedbilling.models.metadata import Metadata
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/customers_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.customer_response import CustomerResponse
from advancedbilling.models.subscription_response import SubscriptionResponse
from advancedbilling.exceptions.customer_error_response_exception import CustomerErrorResponseException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.segment_response import SegmentResponse
from advancedbilling.models.list_segments_response import ListSegmentsResponse
from advancedbilling.exceptions.api_exception import APIException
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/events_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.types.array_serialization_format import SerializationFormats
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.event_response import EventResponse
from advancedbilling.models.count_response import CountResponse

Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/insights_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.types.array_serialization_format import SerializationFormats
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.site_summary import SiteSummary
from advancedbilling.models.mrr_response import MRRResponse
from advancedbilling.models.list_mrr_response import ListMRRResponse
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/invoices_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.types.array_serialization_format import SerializationFormats
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.invoice import Invoice
from advancedbilling.models.list_invoices_response import ListInvoicesResponse
from advancedbilling.models.list_invoice_events_response import ListInvoiceEventsResponse
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/offers_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.offer_response import OfferResponse
from advancedbilling.models.list_offers_response import ListOffersResponse
from advancedbilling.exceptions.error_array_map_response_exception import ErrorArrayMapResponseException
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/payment_profiles_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.payment_profile_response import PaymentProfileResponse
from advancedbilling.models.bank_account_response import BankAccountResponse
from advancedbilling.models.get_one_time_token_request import GetOneTimeTokenRequest
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/product_families_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.product_response import ProductResponse
from advancedbilling.models.product_family_response import ProductFamilyResponse
from advancedbilling.exceptions.api_exception import APIException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.types.array_serialization_format import SerializationFormats
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.product_price_point_response import ProductPricePointResponse
from advancedbilling.models.list_product_price_points_response import ListProductPricePointsResponse
from advancedbilling.models.product_response import ProductResponse
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/products_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.product_response import ProductResponse
from advancedbilling.exceptions.error_list_response_exception import ErrorListResponseException

Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/proforma_invoices_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.proforma_invoice import ProformaInvoice
from advancedbilling.models.proforma_invoice_preview import ProformaInvoicePreview
from advancedbilling.models.signup_proforma_preview_response import SignupProformaPreviewResponse
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/reason_codes_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.reason_code_response import ReasonCodeResponse
from advancedbilling.models.reason_codes_json_response import ReasonCodesJsonResponse
from advancedbilling.exceptions.error_list_response_exception import ErrorListResponseException
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/referral_codes_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.referral_validation_response import ReferralValidationResponse
from advancedbilling.exceptions.single_string_error_response_exception import SingleStringErrorResponseException

Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/sales_commissions_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.sale_rep_settings import SaleRepSettings
from advancedbilling.models.list_sale_rep_item import ListSaleRepItem
from advancedbilling.models.sale_rep import SaleRep
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/sites_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.site_response import SiteResponse
from advancedbilling.models.list_public_keys_response import ListPublicKeysResponse

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.types.array_serialization_format import SerializationFormats
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.subscription_component_response import SubscriptionComponentResponse
from advancedbilling.models.bulk_component_s_price_point_assignment import BulkComponentSPricePointAssignment
from advancedbilling.models.subscription_response import SubscriptionResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.subscription_group_prepayment_response import SubscriptionGroupPrepaymentResponse
from advancedbilling.models.list_subscription_group_prepayment_response import ListSubscriptionGroupPrepaymentResponse
from advancedbilling.models.service_credit_response import ServiceCreditResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.reactivate_subscription_group_response import ReactivateSubscriptionGroupResponse
from advancedbilling.exceptions.error_list_response_exception import ErrorListResponseException

Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/subscription_groups_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.subscription_group_signup_response import SubscriptionGroupSignupResponse
from advancedbilling.models.subscription_group_response import SubscriptionGroupResponse
from advancedbilling.models.list_subscription_groups_response import ListSubscriptionGroupsResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.account_balances import AccountBalances
from advancedbilling.models.create_prepayment_response import CreatePrepaymentResponse
from advancedbilling.models.prepayments_response import PrepaymentsResponse
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/subscription_notes_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.subscription_note_response import SubscriptionNoteResponse


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.subscription_response import SubscriptionResponse
from advancedbilling.models.subscription_migration_preview_response import SubscriptionMigrationPreviewResponse
from advancedbilling.exceptions.error_list_response_exception import ErrorListResponseException
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/subscription_status_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.subscription_response import SubscriptionResponse
from advancedbilling.models.delayed_cancellation_response import DelayedCancellationResponse
from advancedbilling.models.renewal_preview_response import RenewalPreviewResponse
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/subscriptions_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.types.array_serialization_format import SerializationFormats
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.subscription_response import SubscriptionResponse
from advancedbilling.models.prepaid_configuration_response import PrepaidConfigurationResponse
from advancedbilling.models.subscription_preview_response import SubscriptionPreviewResponse
Expand Down
2 changes: 0 additions & 2 deletions advancedbilling/controllers/webhooks_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from apimatic_core.types.parameter import Parameter
from advancedbilling.http.http_method_enum import HttpMethodEnum
from apimatic_core.authentication.multiple.single_auth import Single
from apimatic_core.authentication.multiple.and_auth_group import And
from apimatic_core.authentication.multiple.or_auth_group import Or
from advancedbilling.models.webhook_response import WebhookResponse
from advancedbilling.models.enable_webhooks_response import EnableWebhooksResponse
from advancedbilling.models.replay_webhooks_response import ReplayWebhooksResponse
Expand Down
4 changes: 2 additions & 2 deletions advancedbilling/models/apply_payment_event_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def validate(cls, dictionary):
and APIHelper.is_valid_type(value=dictionary.original_amount, type_callable=lambda value: isinstance(value, str)) \
and APIHelper.is_valid_type(value=dictionary.applied_amount, type_callable=lambda value: isinstance(value, str)) \
and APIHelper.is_valid_type(value=dictionary.transaction_time, type_callable=lambda value: isinstance(value, APIHelper.RFC3339DateTime)) \
and UnionTypeLookUp.get('Invoice-Event-Payment').validate(dictionary.payment_method)
and UnionTypeLookUp.get('Invoice-Event-Payment').validate(dictionary.payment_method).is_valid

if not isinstance(dictionary, dict):
return False
Expand All @@ -171,4 +171,4 @@ def validate(cls, dictionary):
and APIHelper.is_valid_type(value=dictionary.get('original_amount'), type_callable=lambda value: isinstance(value, str)) \
and APIHelper.is_valid_type(value=dictionary.get('applied_amount'), type_callable=lambda value: isinstance(value, str)) \
and APIHelper.is_valid_type(value=dictionary.get('transaction_time'), type_callable=lambda value: isinstance(value, str)) \
and UnionTypeLookUp.get('Invoice-Event-Payment').validate(dictionary.get('payment_method'))
and UnionTypeLookUp.get('Invoice-Event-Payment').validate(dictionary.get('payment_method')).is_valid
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def validate(cls, dictionary):
from advancedbilling.utilities.union_type_lookup import UnionTypeLookUp

if isinstance(dictionary, cls):
return UnionTypeLookUp.get('CreateComponentPricePointRequestPricePoint').validate(dictionary.price_point)
return UnionTypeLookUp.get('CreateComponentPricePointRequestPricePoint').validate(dictionary.price_point).is_valid

if not isinstance(dictionary, dict):
return False

return UnionTypeLookUp.get('CreateComponentPricePointRequestPricePoint').validate(dictionary.get('price_point'))
return UnionTypeLookUp.get('CreateComponentPricePointRequestPricePoint').validate(dictionary.get('price_point')).is_valid
Loading
Loading