remitano 1.5.1 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/Gemfile.lock +97 -55
  4. data/README.md +57 -17
  5. data/lib/remitano/client/merchant_charges.rb +28 -4
  6. data/lib/remitano/client/merchant_withdrawals.rb +16 -2
  7. data/lib/remitano/client/net.rb +15 -5
  8. data/lib/remitano/version.rb +1 -1
  9. data/remitano.gemspec +1 -1
  10. data/spec/client/merchant_charges_spec.rb +84 -7
  11. data/spec/client/merchant_withdrawals_spec.rb +39 -0
  12. data/spec/client/net_spec.rb +57 -0
  13. data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_create/valid_params_currency_is_coin/returns_created_charge.yml +55 -0
  14. data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_create/valid_params_currency_is_fiat/returns_created_charge.yml +55 -0
  15. data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_list/filter_by_status/returns_status_matched_merchant_charges.yml +48 -0
  16. data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_list/page_and_per_page_specified/returns_merchant_charges_in_specified_page.yml +48 -0
  17. data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_list/returns_merchant_charges.yml +69 -0
  18. data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_list/filter_by_status/returns_status_matched_merchant_withdrawals.yml +48 -0
  19. data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_list/page_and_per_page_specified/returns_merchant_withdrawals_in_specified_page.yml +48 -0
  20. data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_list/returns_merchant_withdrawals.yml +48 -0
  21. metadata +14 -6
  22. data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_create/valid_params/returns_created_charge.yml +0 -53
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: REMITANO_SERVER/api/v1/merchant/merchant_withdrawals?status=cancelled&usec=0
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*"
12
+ User-Agent:
13
+ - rest-client/2.1.0 (darwin18.6.0 x86_64) ruby/2.4.3p205
14
+ Content-Type:
15
+ - application/json
16
+ Date:
17
+ - Tue, 08 Jun 2021 07:12:43 GMT
18
+ Authorization:
19
+ - APIAuth REMITANO_KEY:dvZaj4IWAkyJEqGWbElqtIBhyo0=
20
+ Accept-Encoding:
21
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
22
+ Host:
23
+ - localhost:3100
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Content-Type:
30
+ - application/json
31
+ Etag:
32
+ - W/"a542ce47161a2ed6412ad8c8613f1d87"
33
+ Cache-Control:
34
+ - max-age=0, private, must-revalidate
35
+ X-Request-Id:
36
+ - 5dac952d-9ebe-4aa9-88b1-638a8a611e5c
37
+ X-Runtime:
38
+ - '0.045170'
39
+ Vary:
40
+ - Origin
41
+ Content-Length:
42
+ - '4394'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"merchant_withdrawals":[{"id":9,"ref":"MWR0306837501","merchant_withdrawal_ref":"akh9r1h29e9","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=9","created_at_timestamp":1621495169},{"id":8,"ref":"MWR8385898424","merchant_withdrawal_ref":"akh9r1h29e8","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=8","created_at_timestamp":1621495025},{"id":7,"ref":"MWR2026538351","merchant_withdrawal_ref":"akh9r1h29e7","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=7","created_at_timestamp":1621417290},{"id":6,"ref":"MWR7700295628","merchant_withdrawal_ref":"akh9r1h29e6","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=6","created_at_timestamp":1621417259},{"id":5,"ref":"MWR8624499987","merchant_withdrawal_ref":"akh9r1h29e4","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=5","created_at_timestamp":1621416869},{"id":4,"ref":"MWR5644211320","merchant_withdrawal_ref":"akh9r1h29e3","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=4","created_at_timestamp":1621416824},{"id":3,"ref":"MWR8738142345","merchant_withdrawal_ref":"akh9r1h29e2","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=3","created_at_timestamp":1621416603},{"id":2,"ref":"MWR9023143621","merchant_withdrawal_ref":"akh9r1h29e1","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=2","created_at_timestamp":1621416518},{"id":1,"ref":"MWR1774298352","merchant_withdrawal_ref":"mwr2","status":"cancelled","coin_amount":100.0,"coin_currency":"usdt","coin_fee":0.0,"receiver_pay_fee":null,"action_confirmation_id":null,"otp_counter":null,"coin_address":"3BDS42pbFgxDn9uMSCBiWE5BcWFBVPPCAA","destination_tag":null,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://dummy.com/111?remitano_id=1","created_at_timestamp":1621401962}],"meta":{"per_page":25,"current_page":1,"next_page":null,"prev_page":null,"total_pages":1,"total_items":9}}'
46
+ http_version:
47
+ recorded_at: Tue, 08 Jun 2021 07:12:43 GMT
48
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: REMITANO_SERVER/api/v1/merchant/merchant_withdrawals?page=2&per_page=5&status=cancelled&usec=0
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*"
12
+ User-Agent:
13
+ - rest-client/2.1.0 (darwin18.6.0 x86_64) ruby/2.4.3p205
14
+ Content-Type:
15
+ - application/json
16
+ Date:
17
+ - Tue, 08 Jun 2021 07:12:43 GMT
18
+ Authorization:
19
+ - APIAuth REMITANO_KEY:nZJeqi3MCdBUJ8t9qui0LD3H91E=
20
+ Accept-Encoding:
21
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
22
+ Host:
23
+ - localhost:3100
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Content-Type:
30
+ - application/json
31
+ Etag:
32
+ - W/"61d1a094de087217f80a3f40fc1c6c0a"
33
+ Cache-Control:
34
+ - max-age=0, private, must-revalidate
35
+ X-Request-Id:
36
+ - 16a5acce-658a-4e4c-a01d-bdcc3a2f108e
37
+ X-Runtime:
38
+ - '0.042926'
39
+ Vary:
40
+ - Origin
41
+ Content-Length:
42
+ - '2010'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"merchant_withdrawals":[{"id":4,"ref":"MWR5644211320","merchant_withdrawal_ref":"akh9r1h29e3","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=4","created_at_timestamp":1621416824},{"id":3,"ref":"MWR8738142345","merchant_withdrawal_ref":"akh9r1h29e2","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=3","created_at_timestamp":1621416603},{"id":2,"ref":"MWR9023143621","merchant_withdrawal_ref":"akh9r1h29e1","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=2","created_at_timestamp":1621416518},{"id":1,"ref":"MWR1774298352","merchant_withdrawal_ref":"mwr2","status":"cancelled","coin_amount":100.0,"coin_currency":"usdt","coin_fee":0.0,"receiver_pay_fee":null,"action_confirmation_id":null,"otp_counter":null,"coin_address":"3BDS42pbFgxDn9uMSCBiWE5BcWFBVPPCAA","destination_tag":null,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://dummy.com/111?remitano_id=1","created_at_timestamp":1621401962}],"meta":{"per_page":5,"current_page":2,"next_page":null,"prev_page":1,"total_pages":2,"total_items":9}}'
46
+ http_version:
47
+ recorded_at: Tue, 08 Jun 2021 07:12:43 GMT
48
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: REMITANO_SERVER/api/v1/merchant/merchant_withdrawals?usec=0
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*"
12
+ User-Agent:
13
+ - rest-client/2.1.0 (darwin18.6.0 x86_64) ruby/2.4.3p205
14
+ Content-Type:
15
+ - application/json
16
+ Date:
17
+ - Tue, 08 Jun 2021 07:12:43 GMT
18
+ Authorization:
19
+ - APIAuth REMITANO_KEY:e3hDs38TZKaROuGeajNbwEuFGz4=
20
+ Accept-Encoding:
21
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
22
+ Host:
23
+ - localhost:3100
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Content-Type:
30
+ - application/json
31
+ Etag:
32
+ - W/"f61a3e2e50f7d1d56b819689f689c496"
33
+ Cache-Control:
34
+ - max-age=0, private, must-revalidate
35
+ X-Request-Id:
36
+ - 16d718c8-5687-4c87-940d-7bc5e4b69040
37
+ X-Runtime:
38
+ - '0.052219'
39
+ Vary:
40
+ - Origin
41
+ Content-Length:
42
+ - '8748'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"merchant_withdrawals":[{"id":18,"ref":"MWR1926186585","merchant_withdrawal_ref":"akh9r1h29e19","status":"processing","coin_amount":10.99,"coin_currency":"xrp","coin_fee":2.0e-05,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=18","created_at_timestamp":1622185568},{"id":17,"ref":"MWR1411523474","merchant_withdrawal_ref":"akh9r1h29e18","status":"processing","coin_amount":10.99,"coin_currency":"xrp","coin_fee":2.0e-05,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=17","created_at_timestamp":1622185453},{"id":16,"ref":"MWR2896281444","merchant_withdrawal_ref":"akh9r1h29e16","status":"processing","coin_amount":10.99,"coin_currency":"xrp","coin_fee":2.0e-05,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=16","created_at_timestamp":1621786247},{"id":15,"ref":"MWR4599154046","merchant_withdrawal_ref":"akh9r1h29e15","status":"processing","coin_amount":10.99,"coin_currency":"xrp","coin_fee":2.0e-05,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=15","created_at_timestamp":1621786177},{"id":14,"ref":"MWR7435074055","merchant_withdrawal_ref":"akh9r1h29e14","status":"processing","coin_amount":10.99,"coin_currency":"xrp","coin_fee":2.0e-05,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=14","created_at_timestamp":1621497678},{"id":13,"ref":"MWR2408040692","merchant_withdrawal_ref":"akh9r1h29e13","status":"processing","coin_amount":10.99,"coin_currency":"xrp","coin_fee":2.0e-05,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=13","created_at_timestamp":1621497086},{"id":12,"ref":"MWR2187365563","merchant_withdrawal_ref":"akh9r1h29e12","status":"processing","coin_amount":10.99,"coin_currency":"xrp","coin_fee":2.0e-05,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=12","created_at_timestamp":1621496363},{"id":11,"ref":"MWR6984988898","merchant_withdrawal_ref":"akh9r1h29e11","status":"processing","coin_amount":10.99,"coin_currency":"xrp","coin_fee":2.0e-05,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=11","created_at_timestamp":1621495878},{"id":10,"ref":"MWR7809335939","merchant_withdrawal_ref":"akh9r1h29e10","status":"pending","coin_amount":10.99,"coin_currency":"xrp","coin_fee":2.0e-05,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=10","created_at_timestamp":1621495864},{"id":9,"ref":"MWR0306837501","merchant_withdrawal_ref":"akh9r1h29e9","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=9","created_at_timestamp":1621495169},{"id":8,"ref":"MWR8385898424","merchant_withdrawal_ref":"akh9r1h29e8","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=8","created_at_timestamp":1621495025},{"id":7,"ref":"MWR2026538351","merchant_withdrawal_ref":"akh9r1h29e7","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=7","created_at_timestamp":1621417290},{"id":6,"ref":"MWR7700295628","merchant_withdrawal_ref":"akh9r1h29e6","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=6","created_at_timestamp":1621417259},{"id":5,"ref":"MWR8624499987","merchant_withdrawal_ref":"akh9r1h29e4","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=5","created_at_timestamp":1621416869},{"id":4,"ref":"MWR5644211320","merchant_withdrawal_ref":"akh9r1h29e3","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=4","created_at_timestamp":1621416824},{"id":3,"ref":"MWR8738142345","merchant_withdrawal_ref":"akh9r1h29e2","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=3","created_at_timestamp":1621416603},{"id":2,"ref":"MWR9023143621","merchant_withdrawal_ref":"akh9r1h29e1","status":"cancelled","coin_amount":10.99,"coin_currency":"xrp","coin_fee":0.0,"receiver_pay_fee":true,"action_confirmation_id":null,"otp_counter":null,"coin_address":"rLpumSZQNJ6Cve7hfQcdkG9rJbJhkSV8AD","destination_tag":1710676231,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://sample.com/123/callback?remitano_id=2","created_at_timestamp":1621416518},{"id":1,"ref":"MWR1774298352","merchant_withdrawal_ref":"mwr2","status":"cancelled","coin_amount":100.0,"coin_currency":"usdt","coin_fee":0.0,"receiver_pay_fee":null,"action_confirmation_id":null,"otp_counter":null,"coin_address":"3BDS42pbFgxDn9uMSCBiWE5BcWFBVPPCAA","destination_tag":null,"remitano_username":null,"remitano_phone_number":null,"cancelled_or_completed_callback_url":"http://dummy.com/111?remitano_id=1","created_at_timestamp":1621401962}],"meta":{"per_page":25,"current_page":1,"next_page":null,"prev_page":null,"total_pages":1,"total_items":18}}'
46
+ http_version:
47
+ recorded_at: Tue, 08 Jun 2021 07:12:43 GMT
48
+ recorded_with: VCR 4.0.0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remitano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phuong Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-28 00:00:00.000000000 Z
11
+ date: 2021-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.8.4
159
+ version: 2.0.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 1.8.4
166
+ version: 2.0.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: dotenv
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -272,16 +272,24 @@ files:
272
272
  - remitano.gemspec
273
273
  - spec/client/merchant_charges_spec.rb
274
274
  - spec/client/merchant_withdrawals_spec.rb
275
+ - spec/client/net_spec.rb
275
276
  - spec/coin_accounts_spec.rb
276
277
  - spec/fiat_accounts_spec.rb
277
278
  - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_create/invalid_params/raises_error.yml
278
- - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_create/valid_params/returns_created_charge.yml
279
+ - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_create/valid_params_currency_is_coin/returns_created_charge.yml
280
+ - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_create/valid_params_currency_is_fiat/returns_created_charge.yml
279
281
  - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_get/object_exists/returns_charge_data.yml
280
282
  - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_get/object_not_found/raises_error.yml
283
+ - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_list/filter_by_status/returns_status_matched_merchant_charges.yml
284
+ - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_list/page_and_per_page_specified/returns_merchant_charges_in_specified_page.yml
285
+ - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_list/returns_merchant_charges.yml
281
286
  - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_create/invalid_params/raises_error.yml
282
287
  - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_create/valid_params/auto_confirms_withdrawal_with_htop_and_returns_created_withdrawal.yml
283
288
  - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_get/object_exists/returns_withdrawal_data.yml
284
289
  - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_get/object_not_found/raises_error.yml
290
+ - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_list/filter_by_status/returns_status_matched_merchant_withdrawals.yml
291
+ - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_list/page_and_per_page_specified/returns_merchant_withdrawals_in_specified_page.yml
292
+ - spec/fixtures/vcr_cassettes/Remitano_Client_merchant_withdrawals/_list/returns_merchant_withdrawals.yml
285
293
  - spec/fixtures/vcr_cassettes/remitano/coin_accounts/me.yml
286
294
  - spec/fixtures/vcr_cassettes/remitano/fiat_accounts/me.yml
287
295
  - spec/fixtures/vcr_cassettes/remitano/my_offers/sell.yml
@@ -322,7 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
322
330
  - !ruby/object:Gem::Version
323
331
  version: '0'
324
332
  requirements: []
325
- rubygems_version: 3.0.6
333
+ rubygems_version: 3.2.19
326
334
  signing_key:
327
335
  specification_version: 4
328
336
  summary: Remitano Ruby API
@@ -1,53 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: REMITANO_SERVER/api/v1/merchant/merchant_charges
6
- body:
7
- encoding: UTF-8
8
- string: '{"coin_currency":"usdt","coin_amount":10.99,"cancelled_or_completed_callback_url":"http://sample.com/123/callback","usec":0}'
9
- headers:
10
- Accept:
11
- - "*/*"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - rest-client/2.0.2 (darwin18.6.0 x86_64) ruby/2.4.3p205
16
- Content-Type:
17
- - application/json
18
- Date:
19
- - Fri, 28 May 2021 06:57:02 GMT
20
- Authorization:
21
- - APIAuth REMITANO_KEY:KAd9sygInnj8CCEmNJSTq1afnwU=
22
- Content-Length:
23
- - '124'
24
- Host:
25
- - localhost:3100
26
- response:
27
- status:
28
- code: 201
29
- message: Created
30
- headers:
31
- Content-Type:
32
- - application/json
33
- Etag:
34
- - W/"8342279df77afbcd411d0e0e9223432b"
35
- Cache-Control:
36
- - max-age=0, private, must-revalidate
37
- Set-Cookie:
38
- - _admin_session=ee5e9ea148444320646db27508a03d2b; path=/; expires=Mon, 28 Jun
39
- 2021 06:57:02 -0000; HttpOnly; SameSite=Lax
40
- X-Request-Id:
41
- - ee909bea-653a-4fa1-8e3a-8f45ee4e5f9e
42
- X-Runtime:
43
- - '0.085582'
44
- Vary:
45
- - Origin
46
- Content-Length:
47
- - '272'
48
- body:
49
- encoding: UTF-8
50
- string: '{"id":63,"coin_currency":"usdt","coin_amount":10.99,"status":"pending","ref":"MDR4027222151","cancelled_or_completed_callback_url":"http://sample.com/123/callback","remitano_payment_url":"localhost:3200/payment_gateway/pay/MDR4027222151","created_at_timestamp":1622185022}'
51
- http_version:
52
- recorded_at: Fri, 28 May 2021 06:57:02 GMT
53
- recorded_with: VCR 4.0.0