Class: Io::Flow::V0::Models::CardPaymentSourceForm
- Inherits:
-
PaymentSourceForm
- Object
- PaymentSourceForm
- Io::Flow::V0::Models::CardPaymentSourceForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Contains a summary of a card, which is useful for displaying to a customer.
Instance Attribute Summary collapse
-
#card_id ⇒ Object
readonly
Returns the value of attribute card_id.
-
#customer_number ⇒ Object
readonly
Returns the value of attribute customer_number.
Attributes inherited from PaymentSourceForm
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CardPaymentSourceForm
constructor
A new instance of CardPaymentSourceForm.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from PaymentSourceForm
Constructor Details
#initialize(incoming = {}) ⇒ CardPaymentSourceForm
Returns a new instance of CardPaymentSourceForm.
24310 24311 24312 24313 24314 24315 24316 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24310 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 |
Instance Attribute Details
#card_id ⇒ Object (readonly)
Returns the value of attribute card_id.
24308 24309 24310 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24308 def card_id @card_id end |
#customer_number ⇒ Object (readonly)
Returns the value of attribute customer_number.
24308 24309 24310 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24308 def customer_number @customer_number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
24322 24323 24324 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24322 def copy(incoming={}) CardPaymentSourceForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
24326 24327 24328 24329 24330 24331 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24326 def subtype_to_hash { :customer_number => customer_number, :card_id => card_id } end |
#to_json ⇒ Object
24318 24319 24320 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24318 def to_json JSON.dump(to_hash) end |