Method: GetnetApi::Payment.create

Defined in:
lib/getnet_api/payment.rb

.create(payment, obj, type) ⇒ Object

a = GetnetApi::Payment.create pagamento, boleto, :boleto



94
95
96
97
98
99
100
101
# File 'lib/getnet_api/payment.rb', line 94

def self.create(payment, obj, type)

  hash = payment.to_request(obj, type)

  response = self.build_request self.endpoint(type), "post", hash

  return JSON.parse(response.read_body)
end