class Io::Flow::V0::Models::IssuerV1

Attributes

card_brand[R]
card_type[R]
country[R]
iin[R]
name[R]

Public Class Methods

new(incoming={}) click to toggle source
# 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

Public Instance Methods

copy(incoming={}) click to toggle source
# 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() click to toggle source
# 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() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 46887
def to_json
  JSON.dump(to_hash)
end