Module: DineroMail::Operations
Constant Summary collapse
- KEYS_FOR_ACTION =
{ get_balance: [:merchant_transaction_id, :unique_message_id], get_operations: [:merchant_transaction_id, :unique_message_id, :operation_id, :start_date, :end_date], send_money: [:merchant_transaction_id, :unique_message_id, :currency, :amount, :to_email, :pay_off, :subject, :message], get_payment_ticket: [:merchant_transaction_id, :unique_message_id, :currency, :amount, :provider] }
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#do_payment_with_credit_card(options = {}) ⇒ Object
c.do_payment_with_credit_card merchant_transaction_id: ‘1’, items: [‘100.00’, code: ‘abc’, currency: ‘MXN’, description: ‘descricion’, name: ‘nombre’, quantity: ‘1’], buyer: ‘abraham’, last_name: ‘kuri’, email: ‘[email protected]’, provider: ‘MX_BANORTE_TD’, credit_card: ‘2’, credit_card_number: ‘123456’, holder: ‘adrian’, expiration_date: ‘12/16’, security_code: ‘1234’, document_number: ‘1’, unique_message_id: ‘1’.
-
#do_payment_with_reference(options = {}) ⇒ Object
client.do_payment_with_reference merchant_transaction_id: ‘1’, unique_message_id: ‘1’, subject: ‘hola’, message: ‘mensaje’, provider: ‘oxxo’, items: [‘100.00’, code: ‘abc’, currency: ‘MXN’, description: ‘descricion’, name: ‘nombre’, quantity: ‘1’], buyer: ‘abraham’, last_name: ‘kuri’, email: ‘[email protected]’.
-
#do_with_draw(options = {}) ⇒ Object
c.do_with_draw merchant_transaction_id: ‘1’, method: ‘POSTAL’, currency: ‘MXN’, amount: ‘100.00’, address_detail: ‘mordor’, number: ‘666’, floor: ‘1’, appartment: ‘5’, zip: ‘666’, city: ‘inferno’, state: ‘mordorTown’, bank_account_detail: Santander’, bank_number: ‘300’, type: ‘CC’, name: ‘Abraham’, last_name: ‘Kuri’, document_type: ‘RFC’, document_number: ‘2019029’, branch: ‘1’, unique_message_id: ‘1’ Methods: transaction_id, status, merchant_transaction_id, message.
-
#get_balance(options = {}) ⇒ Object
client.get_balance unique_message_id: ‘1’, merchant_transaction_id: ‘1’ Methods: currency, status, transaction_id, merchant_transaction_id, message, amount.
-
#get_operations(options = {}) ⇒ Object
client.get_operations unique_message_id: ‘1’, merchant_transaction_id: ‘1’, operation_id: ‘1’, start_date: ‘2012-10-6’, end_date: ‘2012-10-10’ Methods: operations, status, merchant_transaciont_id, message.
-
#get_payment_ticket(options = {}) ⇒ Object
c.get_payment_ticket currency: “MXN”, amount: “100.0”, provider: “oxxo”, merchant_transaction_id: “1”, unique_message_id: “1”.
-
#send_money(options = {}) ⇒ Object
client.send_money currency: ‘MXN’, amount: ‘100.00’, to_email: ‘[email protected]’, pay_off: ‘Producto’, subject: ‘Pago becalia’, message: ‘Hola mundo’, merchant_transaction_id: ‘1’, unique_message_id: ‘1’ Methods: transaction_id, status, merchant_transaction_id, message.
Methods included from Security
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
15 16 17 |
# File 'lib/dinero_mail/operations.rb', line 15 def response @response end |
Instance Method Details
#do_payment_with_credit_card(options = {}) ⇒ Object
c.do_payment_with_credit_card merchant_transaction_id: ‘1’, items: [‘100.00’, code: ‘abc’, currency: ‘MXN’, description: ‘descricion’, name: ‘nombre’, quantity: ‘1’], buyer: ‘abraham’, last_name: ‘kuri’, email: ‘[email protected]’, provider: ‘MX_BANORTE_TD’, credit_card: ‘2’, credit_card_number: ‘123456’, holder: ‘adrian’, expiration_date: ‘12/16’, security_code: ‘1234’, document_number: ‘1’, unique_message_id: ‘1’
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/dinero_mail/operations.rb', line 96 def do_payment_with_credit_card( = {}) response_for :do_payment_with_credit_card, { 'Credential' => self.credential, 'Crypt' => 'false', 'MerchantTransactionId' => [:merchant_transaction_id], 'Items' => [:items], 'Buyer' => [:buyer], 'Provider' => [:provider], 'CreditCard' => [:credit_card], 'Subject' => [:subject], 'Message' => [:message], 'UniqueMessageID' => [:unique_message_id], 'Hash' => do_payment_with_credit_card_hash() } end |
#do_payment_with_reference(options = {}) ⇒ Object
client.do_payment_with_reference merchant_transaction_id: ‘1’, unique_message_id: ‘1’, subject: ‘hola’, message: ‘mensaje’, provider: ‘oxxo’, items: [‘100.00’, code: ‘abc’, currency: ‘MXN’, description: ‘descricion’, name: ‘nombre’, quantity: ‘1’], buyer: ‘abraham’, last_name: ‘kuri’, email: ‘[email protected]’
63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/dinero_mail/operations.rb', line 63 def do_payment_with_reference( = {}) response_for :do_payment_with_reference, { 'Credential' => self.credential, 'Crypt' => 'false', 'MerchantTransactionId' => [:merchant_transaction_id], 'Items' => [:items], 'Buyer' => [:buyer], 'Provider' => [:provider], 'Subject' => [:subject], 'Message' => [:message], 'UniqueMessageID' => [:unique_message_id], 'Hash' => do_payment_with_reference_hash() } end |
#do_with_draw(options = {}) ⇒ Object
c.do_with_draw merchant_transaction_id: ‘1’, method: ‘POSTAL’, currency: ‘MXN’, amount: ‘100.00’, address_detail: ‘mordor’, number: ‘666’, floor: ‘1’, appartment: ‘5’, zip: ‘666’, city: ‘inferno’, state: ‘mordorTown’, bank_account_detail: Santander’, bank_number: ‘300’, type: ‘CC’, name: ‘Abraham’, last_name: ‘Kuri’, document_type: ‘RFC’, document_number: ‘2019029’, branch: ‘1’, unique_message_id: ‘1’ Methods: transaction_id, status, merchant_transaction_id, message
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/dinero_mail/operations.rb', line 80 def do_with_draw( = {}) response_for :do_with_draw, { 'Credential' => self.credential, 'Crypt' => 'false', 'MerchantTransactionId' => [:merchant_transaction_id], 'Method' => [:method], 'Currency' => [:currency], 'Amount' => [:amount], 'AddressDetail' => [:address_detail], 'BankAccountDetail' => [:bank_account_detail], 'UniqueMessageID' => [:unique_message_id], 'Hash' => do_with_draw_hash() } end |
#get_balance(options = {}) ⇒ Object
client.get_balance unique_message_id: ‘1’, merchant_transaction_id: ‘1’ Methods: currency, status, transaction_id, merchant_transaction_id, message, amount
19 20 21 22 23 24 25 26 27 |
# File 'lib/dinero_mail/operations.rb', line 19 def get_balance( = {}) response_for :get_balance, { 'Credential' => self.credential, 'Crypt' => 'false', 'UniqueMessageID' => [:unique_message_id], 'MerchantTransactionId' => [:merchant_transaction_id], 'Hash' => build_hash_for(:get_balance, ) } end |
#get_operations(options = {}) ⇒ Object
client.get_operations unique_message_id: ‘1’, merchant_transaction_id: ‘1’, operation_id: ‘1’, start_date: ‘2012-10-6’, end_date: ‘2012-10-10’ Methods: operations, status, merchant_transaciont_id, message
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/dinero_mail/operations.rb', line 31 def get_operations( = {}) response_for :get_operations, { 'Credential' => self.credential, 'Crypt' => 'false', 'UniqueMessageID' => [:unique_message_id], 'MerchantTransactionId' => [:merchant_transaction_id], 'OperationId' => [:operation_id], 'StartDate' => [:start_date], 'EndDate' => [:end_date], 'Hash' => build_hash_for(:get_operations, ) } end |
#get_payment_ticket(options = {}) ⇒ Object
c.get_payment_ticket currency: “MXN”, amount: “100.0”, provider: “oxxo”, merchant_transaction_id: “1”, unique_message_id: “1”
113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/dinero_mail/operations.rb', line 113 def get_payment_ticket( = {}) response_for :get_payment_ticket, { 'Credential' => self.credential, 'Crypt' => 'false', 'Currency' => [:currency], 'Amount' => [:amount], 'MerchantTransactionId' => [:merchant_transaction_id], 'Provider' => [:provider], 'UniqueMessageID' => [:unique_message_id], 'Hash' => build_hash_for(:get_payment_ticket, ) } end |
#send_money(options = {}) ⇒ Object
client.send_money currency: ‘MXN’, amount: ‘100.00’, to_email: ‘[email protected]’, pay_off: ‘Producto’, subject: ‘Pago becalia’, message: ‘Hola mundo’, merchant_transaction_id: ‘1’, unique_message_id: ‘1’ Methods: transaction_id, status, merchant_transaction_id, message
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/dinero_mail/operations.rb', line 46 def send_money( = {}) response_for :send_money, { 'Credential' => self.credential, 'Crypt' => 'false', 'Currency' => [:currency], 'Amount' => [:amount], 'ToEmail' => [:to_email], 'PayOff' => [:pay_off], 'Subject' => [:subject], 'Message' => [:message], 'MerchantTransactionId' => [:merchant_transaction_id], 'UniqueMessageID' => [:unique_message_id], 'Hash' => build_hash_for(:send_money, ) } end |