#<v11:CreditCard>
#  <v11:CardHolder>?</v11:CardHolder>
#  <v11:CardNumber>?</v11:CardNumber>
#  <v11:CardType>?</v11:CardType>
#  <v11:ExpirationMonth>?</v11:ExpirationMonth>
#  <v11:ExpirationYear>?</v11:ExpirationYear>
#  <v11:CardSecurityCode>?</v11:CardSecurityCode>
#  <!--Optional:-->
#  <v11:BankName>?</v11:BankName>
#  <!--Optional:-->
#  <v11:eOLVAccount>?</v11:eOLVAccount>
#  <!--Optional:-->
#  <v11:eOLVRegistrationNumber>?</v11:eOLVRegistrationNumber>
#</v11:CreditCard>

module Wimdu
  module Partner
    module Vacasol 
      class CreditCard < Wimdu::Partner::CreditCard

        def to_soap_hash
          {
            "v11:CardHolder" => holder_name,
            "v11:CardNumber" => number,
            "v11:CardType" => type,
            "v11:ExpirationMonth" => expiry_month,
            "v11:ExpirationYear" => expiry_year,
            "v11:CardSecurityCode" => cvc 
          }
        end

        def self.from_wimdu_booking(wimdu_booking)
          new Wimdu::Partner::CreditCard.attributes_from_wimdu_booking(wimdu_booking)
        end 

      end
    end
  end
end

