Class: Io::Flow::V0::Models::ApplePayMerchantValidationPayload

Inherits:
AuthorizationPayloadParameters show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from AuthorizationPayloadParameters

#discriminator

Instance Method Summary collapse

Methods inherited from AuthorizationPayloadParameters

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ApplePayMerchantValidationPayload

Returns a new instance of ApplePayMerchantValidationPayload.



30554
30555
30556
30557
30558
30559
30560
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30554

def initialize(incoming={})
  super(:discriminator => AuthorizationPayloadParameters::Types::APPLE_PAY_MERCHANT_VALIDATION_PAYLOAD)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:validation_url], 'ApplePayMerchantValidationPayload')
  @validation_url = HttpClient::Preconditions.assert_class('validation_url', opts.delete(:validation_url), String)
  @display_name = (x = opts.delete(:display_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('display_name', x, String))
end

Instance Attribute Details

#display_nameObject (readonly)

Returns the value of attribute display_name.



30552
30553
30554
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30552

def display_name
  @display_name
end

#validation_urlObject (readonly)

Returns the value of attribute validation_url.



30552
30553
30554
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30552

def validation_url
  @validation_url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



30566
30567
30568
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30566

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

#subtype_to_hashObject



30570
30571
30572
30573
30574
30575
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30570

def subtype_to_hash
  {
    :validation_url => validation_url,
    :display_name => display_name
  }
end

#to_jsonObject



30562
30563
30564
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30562

def to_json
  JSON.dump(to_hash)
end