Class: Io::Flow::V0::Models::IssuerV1
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::IssuerV1
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#card_brand ⇒ Object
readonly
Returns the value of attribute card_brand.
-
#card_type ⇒ Object
readonly
Returns the value of attribute card_type.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#iin ⇒ Object
readonly
Returns the value of attribute iin.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ IssuerV1
constructor
A new instance of IssuerV1.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ IssuerV1
Returns a new instance of IssuerV1.
46877 46878 46879 46880 46881 46882 46883 46884 46885 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46877 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:iin, :card_brand], 'IssuerV1') @iin = HttpClient::Preconditions.assert_class('iin', opts.delete(:iin), String) @card_brand = HttpClient::Preconditions.assert_class('card_brand', opts.delete(:card_brand), String) @card_type = (x = opts.delete(:card_type); x.nil? ? nil : HttpClient::Preconditions.assert_class('card_type', x, String)) @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)) @country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)) end |
Instance Attribute Details
#card_brand ⇒ Object (readonly)
Returns the value of attribute card_brand.
46875 46876 46877 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46875 def card_brand @card_brand end |
#card_type ⇒ Object (readonly)
Returns the value of attribute card_type.
46875 46876 46877 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46875 def card_type @card_type end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
46875 46876 46877 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46875 def country @country end |
#iin ⇒ Object (readonly)
Returns the value of attribute iin.
46875 46876 46877 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46875 def iin @iin end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
46875 46876 46877 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46875 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
46891 46892 46893 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46891 def copy(incoming={}) IssuerV1.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
46895 46896 46897 46898 46899 46900 46901 46902 46903 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46895 def to_hash { :iin => iin, :card_brand => card_brand, :card_type => card_type, :name => name, :country => country } end |
#to_json ⇒ Object
46887 46888 46889 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46887 def to_json JSON.dump(to_hash) end |