Class: Io::Flow::V0::Models::PaymentMethodDataInitKlarna

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 = {}) ⇒ PaymentMethodDataInitKlarna

Returns a new instance of PaymentMethodDataInitKlarna.



53200
53201
53202
53203
53204
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53200

def initialize(incoming={})
  super(:type => PaymentMethodData::Types::PAYMENT_METHOD_DATA_INIT_KLARNA)
  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.



53198
53199
53200
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53198

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53210
53211
53212
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53210

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

#subtype_to_hashObject



53214
53215
53216
53217
53218
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53214

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



53206
53207
53208
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53206

def to_json
  JSON.dump(to_hash)
end