Class: InterApi::ClientSandbox

Inherits:
ClientProduction show all
Defined in:
lib/inter_api.rb,
lib/inter_api/client_sandbox.rb

Constant Summary collapse

BASE_URL =
"https://cdpj-sandbox.partners.uatinter.co/"

Constants inherited from ClientProduction

InterApi::ClientProduction::MAX_RETIES, InterApi::ClientProduction::SAVE_RESPONSES

Instance Attribute Summary

Attributes inherited from ClientProduction

#chave_pix, #client_id, #client_secret, #conta_corrente, #crt, #key, #scopes

Instance Method Summary collapse

Methods inherited from ClientProduction

#create_payment, #default_options, #get_payment, #get_refund, #get_webhook, #initialize, #refresh_token, #refund_payment, #update_payment, #update_webhook

Constructor Details

This class inherits a constructor from InterApi::ClientProduction

Instance Method Details

#pay_pix(payment_id:, amount:) ⇒ Object



5
6
7
8
9
10
# File 'lib/inter_api/client_sandbox.rb', line 5

def pay_pix payment_id:, amount:
  body = {
    valor: format("%.2f", amount)
  }
  post("/pix/v2/cob/pagar/#{payment_id}", body:)
end