Class: Io::Flow::V0::Models::KlarnaPaymentCategory

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

Overview

Options that allow the user to pay with, example Pay over time

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ KlarnaPaymentCategory

Returns a new instance of KlarnaPaymentCategory.



47727
47728
47729
47730
47731
47732
47733
47734
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47727

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id, :name], 'KlarnaPaymentCategory')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
  @standard_asset_url = (x = opts.delete(:standard_asset_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('standard_asset_url', x, String))
  @descriptive_asset_url = (x = opts.delete(:descriptive_asset_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('descriptive_asset_url', x, String))
end

Instance Attribute Details

#descriptive_asset_urlObject (readonly)

Returns the value of attribute descriptive_asset_url.



47725
47726
47727
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47725

def descriptive_asset_url
  @descriptive_asset_url
end

#idObject (readonly)

Returns the value of attribute id.



47725
47726
47727
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47725

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



47725
47726
47727
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47725

def name
  @name
end

#standard_asset_urlObject (readonly)

Returns the value of attribute standard_asset_url.



47725
47726
47727
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47725

def standard_asset_url
  @standard_asset_url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



47740
47741
47742
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47740

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

#to_hashObject



47744
47745
47746
47747
47748
47749
47750
47751
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47744

def to_hash
  {
    :id => id,
    :name => name,
    :standard_asset_url => standard_asset_url,
    :descriptive_asset_url => descriptive_asset_url
  }
end

#to_jsonObject



47736
47737
47738
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47736

def to_json
  JSON.dump(to_hash)
end