Class: Io::Flow::V0::Models::IssuerV1

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 = {}) ⇒ IssuerV1

Returns a new instance of IssuerV1.



34850
34851
34852
34853
34854
34855
34856
34857
34858
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34850

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_brandObject (readonly)

Returns the value of attribute card_brand.



34848
34849
34850
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34848

def card_brand
  @card_brand
end

#card_typeObject (readonly)

Returns the value of attribute card_type.



34848
34849
34850
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34848

def card_type
  @card_type
end

#countryObject (readonly)

Returns the value of attribute country.



34848
34849
34850
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34848

def country
  @country
end

#iinObject (readonly)

Returns the value of attribute iin.



34848
34849
34850
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34848

def iin
  @iin
end

#nameObject (readonly)

Returns the value of attribute name.



34848
34849
34850
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34848

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



34864
34865
34866
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34864

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

#to_hashObject



34868
34869
34870
34871
34872
34873
34874
34875
34876
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34868

def to_hash
  {
    :iin => iin,
    :card_brand => card_brand,
    :card_type => card_type,
    :name => name,
    :country => country
  }
end

#to_jsonObject



34860
34861
34862
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34860

def to_json
  JSON.dump(to_hash)
end