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.



57525
57526
57527
57528
57529
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57525

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.



57523
57524
57525
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57523

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57535
57536
57537
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57535

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

#subtype_to_hashObject



57539
57540
57541
57542
57543
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57539

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



57531
57532
57533
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57531

def to_json
  JSON.dump(to_hash)
end