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.



53252
53253
53254
53255
53256
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53252

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.



53250
53251
53252
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53250

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53262
53263
53264
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53262

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

#subtype_to_hashObject



53266
53267
53268
53269
53270
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53266

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



53258
53259
53260
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53258

def to_json
  JSON.dump(to_hash)
end