Class: Io::Flow::V0::Models::KlarnaPaymentCategory
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::KlarnaPaymentCategory
- 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
-
#descriptive_asset_url ⇒ Object
readonly
Returns the value of attribute descriptive_asset_url.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#standard_asset_url ⇒ Object
readonly
Returns the value of attribute standard_asset_url.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ KlarnaPaymentCategory
constructor
A new instance of KlarnaPaymentCategory.
- #to_hash ⇒ Object
- #to_json ⇒ Object
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_url ⇒ Object (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 |
#id ⇒ Object (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 |
#name ⇒ Object (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_url ⇒ Object (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_hash ⇒ Object
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_json ⇒ Object
47736 47737 47738 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47736 def to_json JSON.dump(to_hash) end |