Class: Io::Flow::V0::Models::PaymentMethodCardNumberCleartext
- Inherits:
-
CardNumber
- Object
- CardNumber
- Io::Flow::V0::Models::PaymentMethodCardNumberCleartext
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Attributes inherited from CardNumber
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentMethodCardNumberCleartext
constructor
A new instance of PaymentMethodCardNumberCleartext.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from CardNumber
Constructor Details
#initialize(incoming = {}) ⇒ PaymentMethodCardNumberCleartext
Returns a new instance of PaymentMethodCardNumberCleartext.
57031 57032 57033 57034 57035 57036 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57031 def initialize(incoming={}) super(:type => CardNumber::Types::PAYMENT_METHOD_CARD_NUMBER_CLEARTEXT) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:number], 'PaymentMethodCardNumberCleartext') @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
57029 57030 57031 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57029 def number @number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
57042 57043 57044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57042 def copy(incoming={}) PaymentMethodCardNumberCleartext.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
57046 57047 57048 57049 57050 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57046 def subtype_to_hash { :number => number } end |
#to_json ⇒ Object
57038 57039 57040 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57038 def to_json JSON.dump(to_hash) end |