Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CustomerPaymentProfileExType missing properties compared to the xsd schema? #189

Copy link
Copy link
@pandaiolo

Description

@pandaiolo
Issue body actions

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
  end

Why 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
  end

Given 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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.