Class: Io::Flow::V0::Models::BillingChannelPaymentRequestReference

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

Returns a new instance of BillingChannelPaymentRequestReference.



32364
32365
32366
32367
32368
32369
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32364

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id], 'BillingChannelPaymentRequestReference')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
  @reference = (x = opts.delete(:reference); x.nil? ? nil : HttpClient::Preconditions.assert_class('reference', x, String))
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



32362
32363
32364
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32362

def id
  @id
end

#referenceObject (readonly)

Returns the value of attribute reference.



32362
32363
32364
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32362

def reference
  @reference
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



32375
32376
32377
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32375

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

#to_hashObject



32379
32380
32381
32382
32383
32384
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32379

def to_hash
  {
    :id => id,
    :reference => reference
  }
end

#to_jsonObject



32371
32372
32373
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32371

def to_json
  JSON.dump(to_hash)
end