class Io::Flow::V0::Models::PaymentContactBilling

Attributes

company[R]
email[R]
first_name[R]
last_name[R]
phone[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56610
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:last_name], 'PaymentContactBilling')
  @first_name = (x = opts.delete(:first_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('first_name', x, String))
  @last_name = HttpClient::Preconditions.assert_class('last_name', opts.delete(:last_name), String)
  @company = (x = opts.delete(:company); x.nil? ? nil : HttpClient::Preconditions.assert_class('company', x, String))
  @email = (x = opts.delete(:email); x.nil? ? nil : HttpClient::Preconditions.assert_class('email', x, String))
  @phone = (x = opts.delete(:phone); x.nil? ? nil : HttpClient::Preconditions.assert_class('phone', x, String))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56624
def copy(incoming={})
  PaymentContactBilling.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 56628
def to_hash
  {
    :first_name => first_name,
    :last_name => last_name,
    :company => company,
    :email => email,
    :phone => phone
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56620
def to_json
  JSON.dump(to_hash)
end