Class: Io::Flow::V0::Models::PaymentMethodDataInitAfterpay

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

Returns a new instance of PaymentMethodDataInitAfterpay.



57395
57396
57397
57398
57399
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57395

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



57393
57394
57395
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57393

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57405
57406
57407
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57405

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

#subtype_to_hashObject



57409
57410
57411
57412
57413
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57409

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



57401
57402
57403
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57401

def to_json
  JSON.dump(to_hash)
end