Class: Io::Flow::V0::Models::PaymentMethodDataInitSofort

Inherits:
PaymentMethodData show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from PaymentMethodData

#type

Instance Method Summary collapse

Methods inherited from PaymentMethodData

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ PaymentMethodDataInitSofort

Returns a new instance of PaymentMethodDataInitSofort.



57577
57578
57579
57580
57581
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57577

def initialize(incoming={})
  super(:type => PaymentMethodData::Types::PAYMENT_METHOD_DATA_INIT_SOFORT)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
end

Instance Attribute Details

#placeholderObject (readonly)

Returns the value of attribute placeholder.



57575
57576
57577
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57575

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57587
57588
57589
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57587

def copy(incoming={})
  PaymentMethodDataInitSofort.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



57591
57592
57593
57594
57595
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57591

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



57583
57584
57585
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57583

def to_json
  JSON.dump(to_hash)
end