-
Notifications
You must be signed in to change notification settings - Fork 109
Description
Considering the following CustomerPaymentProfileType:
# {AnetApi/xml/v1/schema/AnetApiSchema.xsd}customerPaymentProfileType
# customerType - CustomerTypeEnum
# billTo - CustomerAddressType
# payment - PaymentType
# driversLicense - DriversLicenseType
# taxId - SOAP::SOAPString
# defaultPaymentProfile - SOAP::SOAPBoolean
# subsequentAuthInformation - SubsequentAuthInformation
class CustomerPaymentProfileType
include ROXML
xml_accessor :customerType
xml_accessor :billTo, as: CustomerAddressType
xml_accessor :payment, as: PaymentType
xml_accessor :driversLicense, as: DriversLicenseType
xml_accessor :taxId
xml_accessor :defaultPaymentProfile
xml_accessor :subsequentAuthInformation, as: SubsequentAuthInformation
def initialize(customerType = nil, billTo = nil, payment = nil, driversLicense = nil, taxId = nil, defaultPaymentProfile = nil, subsequentAuthInformation = nil)
@customerType = customerType
@billTo = billTo
@payment = payment
@driversLicense = driversLicense
@taxId = taxId
@defaultPaymentProfile = defaultPaymentProfile
@subsequentAuthInformation = subsequentAuthInformation
end
endWhy is CustomerPaymentProfileExType defined in the following way?
# {AnetApi/xml/v1/schema/AnetApiSchema.xsd}customerPaymentProfileExType
# customerType - CustomerTypeEnum
# billTo - CustomerAddressType
# payment - PaymentType
# driversLicense - DriversLicenseType
# taxId - SOAP::SOAPString
# customerPaymentProfileId - (any)
class CustomerPaymentProfileExType
include ROXML
xml_accessor :customerType
xml_accessor :billTo, as: CustomerAddressType
xml_accessor :payment, as: PaymentType
xml_accessor :driversLicense, as: DriversLicenseType
xml_accessor :taxId
xml_accessor :customerPaymentProfileId
def initialize(customerType = nil, billTo = nil, payment = nil, driversLicense = nil, taxId = nil, customerPaymentProfileId = nil)
@customerType = customerType
@billTo = billTo
@payment = payment
@driversLicense = driversLicense
@taxId = taxId
@customerPaymentProfileId = customerPaymentProfileId
end
endGiven the relevant portion of the xsd schema:
<xs:complexType name="customerPaymentProfileExType">
<xs:complexContent>
<xs:extension base="anet:customerPaymentProfileType">
<xs:sequence>
<xs:element name="customerPaymentProfileId" type="anet:numericString" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>Expected instead:
I would expect the CustomerPaymentProfileExType to include the same properties as the CustomerPaymentProfileType does, which means: defaultPaymentProfile and subsequentAuthInformation
Or am I missing something?
Extra question:
As asked in the community, I patched the above on my local copy of the sdk, but the server responded with an error:
AuthorizeNetException: E00003: The element 'paymentProfile' in
namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has
invalid child element 'defaultPaymentProfile' in namespace
'AnetApi/xml/v1/schema/AnetApiSchema.xsd
Is this from the server or from the lib? In any case, why is the defaultPaymentProfile property refused from that request , despite it is clearly defined in the schema, and, also, necessary to update the underlying concept of a default payment profile in a customer profile...
Thanks for your help.