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.



53070
53071
53072
53073
53074
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53070

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.



53068
53069
53070
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53068

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53080
53081
53082
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53080

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

#subtype_to_hashObject



53084
53085
53086
53087
53088
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53084

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



53076
53077
53078
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53076

def to_json
  JSON.dump(to_hash)
end