class Io::Flow::V0::Models::PaymentMethodActionCancellation

A request to cancel an outstanding action for a payment request, marking the associated authorization as ‘declined` and the payment request as `requires_payment_method`. By default, it will cancel the ’active’ authorization if any. If the authorization has already been finalized, no update will be performed.

Attributes

data[R]
reason_code[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56947
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @reason_code = (x = opts.delete(:reason_code); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentFailureCode) ? x : ::Io::Flow::V0::Models::PaymentFailureCode.apply(x)))
  @data = (x = opts.delete(:data); x.nil? ? nil : HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(x), Hash))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56957
def copy(incoming={})
  PaymentMethodActionCancellation.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 56961
def to_hash
  {
    :reason_code => reason_code.nil? ? nil : reason_code.value,
    :data => data
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56953
def to_json
  JSON.dump(to_hash)
end