Class: Io::Flow::V0::Models::KlarnaPaymentMethodCategory

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ KlarnaPaymentMethodCategory

Returns a new instance of KlarnaPaymentMethodCategory.



47759
47760
47761
47762
47763
47764
47765
47766
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47759

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id], 'KlarnaPaymentMethodCategory')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
  @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, 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.



47757
47758
47759
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47757

def descriptive_asset_url
  @descriptive_asset_url
end

#idObject (readonly)

Returns the value of attribute id.



47757
47758
47759
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47757

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



47757
47758
47759
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47757

def name
  @name
end

#standard_asset_urlObject (readonly)

Returns the value of attribute standard_asset_url.



47757
47758
47759
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47757

def standard_asset_url
  @standard_asset_url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



47772
47773
47774
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47772

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

#to_hashObject



47776
47777
47778
47779
47780
47781
47782
47783
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47776

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

#to_jsonObject



47768
47769
47770
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47768

def to_json
  JSON.dump(to_hash)
end