Class: Stripe::Treasury::OutboundTransfer::TestHelpers
- Inherits:
 - 
      APIResourceTestHelpers
      
        
- Object
 - APIResourceTestHelpers
 - Stripe::Treasury::OutboundTransfer::TestHelpers
 
 
- Defined in:
 - lib/stripe/resources/treasury/outbound_transfer.rb
 
Constant Summary collapse
- RESOURCE_CLASS =
 OutboundTransfer
Class Method Summary collapse
- 
  
    
      .fail(outbound_transfer, params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Transitions a test mode created OutboundTransfer to the failed status.
 - 
  
    
      .post(outbound_transfer, params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Transitions a test mode created OutboundTransfer to the posted status.
 - .resource_class ⇒ Object
 - 
  
    
      .return_outbound_transfer(outbound_transfer, params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Transitions a test mode created OutboundTransfer to the returned status.
 - 
  
    
      .update(outbound_transfer, params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Updates a test mode created OutboundTransfer with tracking details.
 
Instance Method Summary collapse
- 
  
    
      #fail(params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Transitions a test mode created OutboundTransfer to the failed status.
 - 
  
    
      #post(params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Transitions a test mode created OutboundTransfer to the posted status.
 - 
  
    
      #return_outbound_transfer(params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Transitions a test mode created OutboundTransfer to the returned status.
 - 
  
    
      #update(params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Updates a test mode created OutboundTransfer with tracking details.
 
Methods inherited from APIResourceTestHelpers
custom_method, #initialize, resource_url, #resource_url
Methods included from APIOperations::Request
Constructor Details
This class inherits a constructor from Stripe::APIResourceTestHelpers
Class Method Details
.fail(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
      69 70 71 72 73 74 75 76  | 
    
      # File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 69 def self.fail(outbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/fail", { outbound_transfer: CGI.escape(outbound_transfer) }), params: params, opts: opts ) end  | 
  
.post(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
      89 90 91 92 93 94 95 96  | 
    
      # File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 89 def self.post(outbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/post", { outbound_transfer: CGI.escape(outbound_transfer) }), params: params, opts: opts ) end  | 
  
.resource_class ⇒ Object
      64 65 66  | 
    
      # File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 64 def self.resource_class "OutboundTransfer" end  | 
  
.return_outbound_transfer(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
      109 110 111 112 113 114 115 116  | 
    
      # File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 109 def self.return_outbound_transfer(outbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(outbound_transfer) }), params: params, opts: opts ) end  | 
  
.update(outbound_transfer, params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
      129 130 131 132 133 134 135 136  | 
    
      # File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 129 def self.update(outbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s", { outbound_transfer: CGI.escape(outbound_transfer) }), params: params, opts: opts ) end  | 
  
Instance Method Details
#fail(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
      79 80 81 82 83 84 85 86  | 
    
      # File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 79 def fail(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/fail", { outbound_transfer: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end  | 
  
#post(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
      99 100 101 102 103 104 105 106  | 
    
      # File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 99 def post(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/post", { outbound_transfer: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end  | 
  
#return_outbound_transfer(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
      119 120 121 122 123 124 125 126  | 
    
      # File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 119 def return_outbound_transfer(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end  | 
  
#update(params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
      139 140 141 142 143 144 145 146  | 
    
      # File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 139 def update(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s", { outbound_transfer: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end  |