class Io::Flow::V0::Models::CardPaymentSourceForm
Contains a summary of a card, which is useful for displaying to a customer.
Attributes
card_id[R]
customer_number[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::PaymentSourceForm::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 33578 def initialize(incoming={}) super(:discriminator => PaymentSourceForm::Types::CARD_PAYMENT_SOURCE_FORM) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:customer_number, :card_id], 'CardPaymentSourceForm') @customer_number = HttpClient::Preconditions.assert_class('customer_number', opts.delete(:customer_number), String) @card_id = HttpClient::Preconditions.assert_class('card_id', opts.delete(:card_id), String) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 33590 def copy(incoming={}) CardPaymentSourceForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 33594 def subtype_to_hash { :customer_number => customer_number, :card_id => card_id } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 33586 def to_json JSON.dump(to_hash) end