Class: Io::Flow::V0::Models::PaymentRequestReviewCheck

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

Returns a new instance of PaymentRequestReviewCheck.



58908
58909
58910
58911
58912
58913
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58908

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:type, :status], 'PaymentRequestReviewCheck')
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::PaymentRequestReviewCheckType) ? x : ::Io::Flow::V0::Models::PaymentRequestReviewCheckType.apply(x))
  @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::PaymentRequestReviewCheckStatus) ? x : ::Io::Flow::V0::Models::PaymentRequestReviewCheckStatus.apply(x))
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



58906
58907
58908
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58906

def status
  @status
end

#typeObject (readonly)

Returns the value of attribute type.



58906
58907
58908
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58906

def type
  @type
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



58919
58920
58921
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58919

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

#to_hashObject



58923
58924
58925
58926
58927
58928
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58923

def to_hash
  {
    :type => type.value,
    :status => status.value
  }
end

#to_jsonObject



58915
58916
58917
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58915

def to_json
  JSON.dump(to_hash)
end