Class: Io::Flow::V0::Models::PaymentMethodActionCancellation
- Inherits:
 - 
      Object
      
        
- Object
 - Io::Flow::V0::Models::PaymentMethodActionCancellation
 
 
- Defined in:
 - lib/flow_commerce/flow_api_v0_client.rb
 
Overview
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.
Instance Attribute Summary collapse
- 
  
    
      #data  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute data.
 - 
  
    
      #reason_code  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute reason_code.
 
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
 - 
  
    
      #initialize(incoming = {})  ⇒ PaymentMethodActionCancellation 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of PaymentMethodActionCancellation.
 - #to_hash ⇒ Object
 - #to_json ⇒ Object
 
Constructor Details
#initialize(incoming = {}) ⇒ PaymentMethodActionCancellation
Returns a new instance of PaymentMethodActionCancellation.
      56947 56948 56949 56950 56951  | 
    
      # 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  | 
  
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
      56945 56946 56947  | 
    
      # File 'lib/flow_commerce/flow_api_v0_client.rb', line 56945 def data @data end  | 
  
#reason_code ⇒ Object (readonly)
Returns the value of attribute reason_code.
      56945 56946 56947  | 
    
      # File 'lib/flow_commerce/flow_api_v0_client.rb', line 56945 def reason_code @reason_code end  | 
  
Instance Method Details
#copy(incoming = {}) ⇒ Object
      56957 56958 56959  | 
    
      # 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 ⇒ Object
      56961 56962 56963 56964 56965 56966  | 
    
      # 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 ⇒ Object
      56953 56954 56955  | 
    
      # File 'lib/flow_commerce/flow_api_v0_client.rb', line 56953 def to_json JSON.dump(to_hash) end  |