Class: Io::Flow::V0::Models::PaymentMethodDataInitGooglepay

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

Returns a new instance of PaymentMethodDataInitGooglepay.



57473
57474
57475
57476
57477
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57473

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



57471
57472
57473
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57471

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57483
57484
57485
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57483

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

#subtype_to_hashObject



57487
57488
57489
57490
57491
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57487

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



57479
57480
57481
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57479

def to_json
  JSON.dump(to_hash)
end