fat_zebra 3.0.11 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
 - data/.gitignore +2 -0
 - data/.rubocop.yml +3 -5
 - data/.travis.yml +3 -3
 - data/README.md +5 -5
 - data/fat_zebra.gemspec +5 -7
 - data/lib/fat_zebra.rb +8 -0
 - data/lib/fat_zebra/api_operation/search.rb +1 -1
 - data/lib/fat_zebra/authenticate.rb +64 -0
 - data/lib/fat_zebra/card.rb +1 -0
 - data/lib/fat_zebra/direct_credit.rb +1 -1
 - data/lib/fat_zebra/direct_debit.rb +1 -1
 - data/lib/fat_zebra/paypal/authorization.rb +49 -0
 - data/lib/fat_zebra/paypal/billing_agreement.rb +56 -0
 - data/lib/fat_zebra/paypal/capture.rb +36 -0
 - data/lib/fat_zebra/paypal/order.rb +22 -0
 - data/lib/fat_zebra/paypal/refund.rb +22 -0
 - data/lib/fat_zebra/refund.rb +4 -0
 - data/lib/fat_zebra/util.rb +1 -1
 - data/lib/fat_zebra/validation.rb +4 -0
 - data/lib/fat_zebra/version.rb +1 -1
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/validations/1_3_5_1.yml +46 -0
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_challenge_response/1_3_3_1.yml +90 -0
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_challenge_response/1_3_3_2.yml +90 -0
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_frictionless_response/1_3_2_1.yml +90 -0
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_frictionless_response/1_3_2_2.yml +90 -0
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_1.yml +90 -0
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_2.yml +87 -0
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_3.yml +92 -0
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_4.yml +91 -0
 - data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_type_validation/1_3_4_1.yml +46 -0
 - data/spec/cassettes/FatZebra_Authenticate/_decode_session/when_token_is_invalid/returns_error_when_invalid_token.yml +47 -0
 - data/spec/cassettes/FatZebra_Authenticate/_decode_session/when_token_is_valid/decodes_JWT.yml +87 -0
 - data/spec/cassettes/FatZebra_Authenticate/_session/returns_JWT_with_given_params.yml +44 -0
 - data/spec/cassettes/FatZebra_Authenticate/_session/returns_JWT_with_no_amount.yml +44 -0
 - data/spec/cassettes/FatZebra_Authenticate/_session/returns_error_when_amount_is_invalid.yml +44 -0
 - data/spec/cassettes/FatZebra_Authenticate/_session/returns_error_when_currency_is_invalid.yml +46 -0
 - data/spec/cassettes/FatZebra_BankAccount/_create/1_1_1.yml +8 -14
 - data/spec/cassettes/FatZebra_BankAccount/_create/1_1_2.yml +8 -14
 - data/spec/cassettes/FatZebra_BankAccount/_search/1_2_1.yml +34 -52
 - data/spec/cassettes/FatZebra_BankAccount/_search/1_2_2.yml +34 -52
 - data/spec/cassettes/FatZebra_BankAccount/_search/1_2_3.yml +34 -52
 - data/spec/cassettes/FatZebra_Batch/_create/with_file/1_1_1_1.yml +11 -17
 - data/spec/cassettes/FatZebra_Batch/_create/with_file/1_1_1_2.yml +11 -17
 - data/spec/cassettes/FatZebra_Batch/_create/with_path/1_1_2_1.yml +11 -17
 - data/spec/cassettes/FatZebra_Batch/_create/with_path/1_1_2_2.yml +11 -17
 - data/spec/cassettes/FatZebra_Batch/_find/1_2_1.yml +19 -31
 - data/spec/cassettes/FatZebra_Batch/_find/1_2_2.yml +19 -31
 - data/spec/cassettes/FatZebra_Batch/_result/1_4_1.yml +26 -44
 - data/spec/cassettes/FatZebra_Batch/_search/1_3_1.yml +8 -14
 - data/spec/cassettes/FatZebra_Batch/_search/1_3_2.yml +8 -14
 - data/spec/cassettes/FatZebra_Batch/_search/1_3_3.yml +8 -14
 - data/spec/cassettes/FatZebra_Card/_create/1_1_1.yml +7 -13
 - data/spec/cassettes/FatZebra_Card/_create/1_1_2.yml +7 -13
 - data/spec/cassettes/FatZebra_Card/_create/1_1_3.yml +7 -13
 - data/spec/cassettes/FatZebra_Card/_create/1_1_4.yml +7 -13
 - data/spec/cassettes/FatZebra_Card/_create/1_1_5.yml +7 -13
 - data/spec/cassettes/FatZebra_Card/_create/1_1_6.yml +7 -13
 - data/spec/cassettes/FatZebra_Card/_find/1_3_1.yml +111 -0
 - data/spec/cassettes/FatZebra_Card/_find/1_3_2.yml +111 -0
 - data/spec/cassettes/FatZebra_Card/_update/1_2_1.yml +15 -27
 - data/spec/cassettes/FatZebra_Card/_update/1_2_2.yml +15 -27
 - data/spec/cassettes/FatZebra_Card/_update/1_2_3.yml +15 -27
 - data/spec/cassettes/FatZebra_Card/_update/validations/1_2_4_1.yml +7 -13
 - data/spec/cassettes/FatZebra_Customer/_create/1_1_1.yml +9 -15
 - data/spec/cassettes/FatZebra_Customer/_create/1_1_2.yml +9 -15
 - data/spec/cassettes/FatZebra_Customer/_create/1_1_3.yml +9 -15
 - data/spec/cassettes/FatZebra_Customer/_create/1_1_4.yml +9 -15
 - data/spec/cassettes/FatZebra_Customer/_create/1_1_5.yml +9 -15
 - data/spec/cassettes/FatZebra_Customer/_create/1_1_6.yml +9 -15
 - data/spec/cassettes/FatZebra_Customer/_delete/1_5_1.yml +18 -30
 - data/spec/cassettes/FatZebra_Customer/_find/1_3_1.yml +18 -30
 - data/spec/cassettes/FatZebra_Customer/_find/1_3_2.yml +18 -30
 - data/spec/cassettes/FatZebra_Customer/_search/1_2_1.yml +14 -24
 - data/spec/cassettes/FatZebra_Customer/_search/1_2_2.yml +14 -24
 - data/spec/cassettes/FatZebra_Customer/_search/1_2_3.yml +14 -24
 - data/spec/cassettes/FatZebra_Customer/_update/1_4_1.yml +19 -31
 - data/spec/cassettes/FatZebra_Customer/_update/1_4_2.yml +19 -31
 - data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_1.yml +8 -14
 - data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_2.yml +8 -14
 - data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_3.yml +8 -14
 - data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_4.yml +8 -14
 - data/spec/cassettes/FatZebra_DirectCredit/_create/validations/valid/1_1_5_1_1.yml +7 -13
 - data/spec/cassettes/FatZebra_DirectCredit/_delete/1_4_1.yml +16 -28
 - data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_1.yml +16 -28
 - data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_2.yml +16 -28
 - data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_3.yml +103 -0
 - data/spec/cassettes/FatZebra_DirectCredit/_search/1_3_1.yml +24 -42
 - data/spec/cassettes/FatZebra_DirectCredit/_search/1_3_2.yml +24 -42
 - data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_1.yml +8 -14
 - data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_2.yml +8 -14
 - data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_3.yml +8 -14
 - data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_4.yml +8 -14
 - data/spec/cassettes/FatZebra_DirectDebit/_create/validations/valid/1_1_5_1_1.yml +7 -13
 - data/spec/cassettes/FatZebra_DirectDebit/_delete/1_4_1.yml +16 -28
 - data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_1.yml +16 -28
 - data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_2.yml +16 -28
 - data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_3.yml +103 -0
 - data/spec/cassettes/FatZebra_DirectDebit/_search/1_3_1.yml +24 -42
 - data/spec/cassettes/FatZebra_DirectDebit/_search/1_3_2.yml +24 -42
 - data/spec/cassettes/FatZebra_Information/_ping/1_1_1.yml +7 -13
 - data/spec/cassettes/FatZebra_Information/_ping/1_1_2.yml +7 -13
 - data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_8_1.yml +52 -76
 - data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_8_2.yml +52 -76
 - data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_1.yml +22 -34
 - data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_2.yml +22 -34
 - data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_3.yml +22 -34
 - data/spec/cassettes/FatZebra_PaymentPlan/_delete/1_5_1.yml +31 -49
 - data/spec/cassettes/FatZebra_PaymentPlan/_destroy/1_6_1.yml +31 -49
 - data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_1.yml +35 -53
 - data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_2.yml +35 -53
 - data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_3.yml +35 -53
 - data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_7_1.yml +37 -55
 - data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_7_2.yml +37 -55
 - data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_1.yml +31 -49
 - data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_2.yml +31 -49
 - data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_3.yml +31 -49
 - data/spec/cassettes/FatZebra_PaymentPlan/_update/1_4_1.yml +37 -55
 - data/spec/cassettes/FatZebra_PaymentPlan/_update/1_4_2.yml +37 -55
 - data/spec/cassettes/FatZebra_Paypal_Authorization/_capture/returns_a_new_capture_record.yml +45 -0
 - data/spec/cassettes/FatZebra_Paypal_Authorization/_find/when_found/returns_authorization.yml +46 -0
 - data/spec/cassettes/FatZebra_Paypal_Authorization/_search/with_date_filter/returns_records_created_after_start_date.yml +46 -0
 - data/spec/cassettes/FatZebra_Paypal_Authorization/_void/returns_a_voided_capture_record.yml +44 -0
 - data/spec/cassettes/FatZebra_Paypal_BillingAgreement/_charge/Valid_payload/returns_a_new_order_record.yml +48 -0
 - data/spec/cassettes/FatZebra_Paypal_BillingAgreement/_find/when_found/returns_billing_agreement.yml +48 -0
 - data/spec/cassettes/FatZebra_Paypal_BillingAgreement/_search/with_date_filter/returns_records_created_after_start_date.yml +48 -0
 - data/spec/cassettes/FatZebra_Paypal_Capture/_find/when_found/returns_capture.yml +47 -0
 - data/spec/cassettes/FatZebra_Paypal_Capture/_refund/returns_a_new_refund_record.yml +45 -0
 - data/spec/cassettes/FatZebra_Paypal_Capture/_search/with_date_filter/returns_records_created_after_start_date.yml +49 -0
 - data/spec/cassettes/FatZebra_Paypal_Order/_find/when_found/returns_order.yml +48 -0
 - data/spec/cassettes/FatZebra_Paypal_Order/_search/with_date_filter/returns_orders_created_after_start_date.yml +55 -0
 - data/spec/cassettes/FatZebra_Paypal_Refund/_find/when_found/returns_refund.yml +47 -0
 - data/spec/cassettes/FatZebra_Paypal_Refund/_search/with_date_filter/returns_all_refund_records_created_after_start_date.yml +50 -0
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_1.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_10.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_11.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_12.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_13.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_2.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_3.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_4.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_5.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_6.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_7.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_8.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/1_1_9.yml +9 -15
 - data/spec/cassettes/FatZebra_Purchase/_create/bad_request/1_1_14_1.yml +11 -17
 - data/spec/cassettes/FatZebra_Purchase/_create/bad_request/1_1_14_2.yml +11 -17
 - data/spec/cassettes/FatZebra_Purchase/_search/1_3_1.yml +36 -54
 - data/spec/cassettes/FatZebra_Purchase/_search/1_3_2.yml +36 -54
 - data/spec/cassettes/FatZebra_Purchase/_search/1_3_3.yml +36 -54
 - data/spec/cassettes/FatZebra_Purchase/_void/1_6_1.yml +18 -30
 - data/spec/cassettes/FatZebra_Purchase/_void/1_6_2.yml +18 -30
 - data/spec/cassettes/FatZebra_Purchase/_void/1_6_3.yml +18 -30
 - data/spec/cassettes/FatZebra_Purchase/_void/1_6_4.yml +18 -30
 - data/spec/cassettes/FatZebra_Purchase/_void/1_7_1.yml +18 -30
 - data/spec/cassettes/FatZebra_Purchase/_void/1_7_2.yml +18 -30
 - data/spec/cassettes/FatZebra_Purchase/_void/1_7_3.yml +18 -30
 - data/spec/cassettes/FatZebra_Purchase/_void/1_7_4.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_1.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_10.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_2.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_3.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_4.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_5.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_6.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_7.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_8.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_create/1_1_9.yml +18 -30
 - data/spec/cassettes/FatZebra_Refund/_find/1_2_1.yml +27 -45
 - data/spec/cassettes/FatZebra_Refund/_find/1_2_2.yml +27 -45
 - data/spec/cassettes/FatZebra_Refund/_find/1_2_3.yml +27 -45
 - data/spec/cassettes/FatZebra_Refund/_search/responds_with_the_newly-created_refunds.yml +214 -0
 - data/spec/cassettes/FatZebra_Refund/_void/1_4_1.yml +27 -45
 - data/spec/cassettes/FatZebra_Refund/_void/1_4_2.yml +27 -45
 - data/spec/cassettes/FatZebra_Refund/_void/1_4_3.yml +27 -45
 - data/spec/cassettes/FatZebra_Refund/_void/1_4_4.yml +27 -45
 - data/spec/cassettes/FatZebra_WebHook/_create/1_1_1.yml +7 -13
 - data/spec/cassettes/FatZebra_WebHook/_create/1_1_2.yml +7 -13
 - data/spec/cassettes/FatZebra_WebHook/_create/1_1_3.yml +7 -13
 - data/spec/cassettes/FatZebra_WebHook/_delete/1_4_1.yml +15 -27
 - data/spec/cassettes/FatZebra_WebHook/_search/1_2_1.yml +115 -43
 - data/spec/cassettes/FatZebra_WebHook/_search/1_2_2.yml +115 -43
 - data/spec/cassettes/FatZebra_WebHook/_update/1_3_1.yml +15 -27
 - data/spec/cassettes/FatZebra_WebHook/_update/1_3_2.yml +15 -27
 - data/spec/lib/fat_zebra/authenticate_spec.rb +187 -0
 - data/spec/lib/fat_zebra/card_spec.rb +8 -0
 - data/spec/lib/fat_zebra/direct_credit_spec.rb +14 -1
 - data/spec/lib/fat_zebra/direct_debit_spec.rb +14 -1
 - data/spec/lib/fat_zebra/payment_plan_spec.rb +1 -1
 - data/spec/lib/fat_zebra/paypal/authorization_spec.rb +79 -0
 - data/spec/lib/fat_zebra/paypal/billing_agreement_spec.rb +62 -0
 - data/spec/lib/fat_zebra/paypal/capture_spec.rb +60 -0
 - data/spec/lib/fat_zebra/paypal/order_spec.rb +35 -0
 - data/spec/lib/fat_zebra/paypal/refund_spec.rb +36 -0
 - data/spec/lib/fat_zebra/purchase_spec.rb +3 -3
 - data/spec/lib/fat_zebra/refund_spec.rb +37 -17
 - data/spec/spec_helper.rb +0 -1
 - data/spec/support/payloads.rb +135 -0
 - metadata +59 -15
 - data/spec/cassettes/FatZebra_Refund/_search/1_3_1.yml +0 -295
 - data/spec/cassettes/FatZebra_Refund/_search/1_3_2.yml +0 -295
 
| 
         @@ -0,0 +1,90 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 14 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 20 
     | 
    
         
            +
              response:
         
     | 
| 
      
 21 
     | 
    
         
            +
                status:
         
     | 
| 
      
 22 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 23 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 24 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 25 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 27 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 33 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - 4317188e0406cb61d617f50083f888ba
         
     | 
| 
      
 35 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - '0.285764'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 39 
     | 
    
         
            +
                body:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 41 
     | 
    
         
            +
                  string: '{"successful":true,"response":{"token":"fte6oxo0e3m7psaqt9y8","card_holder":"Matthew
         
     | 
| 
      
 42 
     | 
    
         
            +
                    Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
         
     | 
| 
      
 43 
     | 
    
         
            +
                    Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
         
     | 
| 
      
 44 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 45 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 03:36:47 GMT
         
     | 
| 
      
 46 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 47 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 48 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
         
     | 
| 
      
 49 
     | 
    
         
            +
                body:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 51 
     | 
    
         
            +
                  string: '{"card_token":"INVALID","amount":100,"currency":"AUD","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"70e5d673-81f3-484e-a39d-2edcf5c5d972","customer":{"address_1":"23
         
     | 
| 
      
 52 
     | 
    
         
            +
                    Smith Road","address_2":"North Shore","city":"Canberra","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","passport_number":"X1234567890","passport_country":"036","account_changed_at":"20191210","account_created_at":"20191210","account_password_changed_at":"20191210"},"shipping_address":{"address_1":"23
         
     | 
| 
      
 53 
     | 
    
         
            +
                    Smith Road","address_2":"North Shore","city":"Sydney","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","method":"pickup","destination_code":"01"},"custom":{"transaction_mode":"mobile","reference_id":"065013652a629f68fe0c13b062664bde","merchant_name":"TEST","merchant_new_customer":true,"preorder":1,"http_accept":"text/html","http_user_agent":"Mozilla/5.0
         
     | 
| 
      
 54 
     | 
    
         
            +
                    (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0","recurring_end_date":"20201201","recurring_frequency":3,"recurring_original_purchase_date":"2019120112:00:00"},"items":[{"unit_price":23.3,"product_description":"Widgets","product_name":"Watch","quantity":1,"product_sku":"9999","passenger_first_name":"John","passenger_last_name":"Smith"}],"airline_data":{"legs":[{"carrier_code":"code","departure_date":"20221012","destination":"SYD","originating_airport_code":"MEL"}],"number_of_passengers":2,"passengers":[{"first_name":"John","last_name":"Smith"},{"first_name":"Megan","last_name":"Doe"}]}},"test":true}'
         
     | 
| 
      
 55 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 56 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 57 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 58 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 59 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 60 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 61 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 62 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 63 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 64 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 65 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 66 
     | 
    
         
            +
              response:
         
     | 
| 
      
 67 
     | 
    
         
            +
                status:
         
     | 
| 
      
 68 
     | 
    
         
            +
                  code: 422
         
     | 
| 
      
 69 
     | 
    
         
            +
                  message: Unprocessable Entity
         
     | 
| 
      
 70 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 71 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 72 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 73 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 74 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 75 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 76 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 77 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 78 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 79 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 80 
     | 
    
         
            +
                  - 657e9ed464b17ddc7408080b39c08602
         
     | 
| 
      
 81 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 82 
     | 
    
         
            +
                  - '0.090252'
         
     | 
| 
      
 83 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 84 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 85 
     | 
    
         
            +
                body:
         
     | 
| 
      
 86 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 87 
     | 
    
         
            +
                  string: '{"successful":false,"response":null,"errors":["Card not found"],"test":true}'
         
     | 
| 
      
 88 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 89 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 03:36:47 GMT
         
     | 
| 
      
 90 
     | 
    
         
            +
            recorded_with: VCR 3.0.3
         
     | 
| 
         @@ -0,0 +1,87 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 14 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 20 
     | 
    
         
            +
              response:
         
     | 
| 
      
 21 
     | 
    
         
            +
                status:
         
     | 
| 
      
 22 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 23 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 24 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 25 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 27 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 33 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - 43ed2b2d9c154c7e0481c5c355b96cda
         
     | 
| 
      
 35 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - '0.296102'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 39 
     | 
    
         
            +
                body:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 41 
     | 
    
         
            +
                  string: '{"successful":true,"response":{"token":"8zwisd92mo3vj78h3h1g","card_holder":"Matthew
         
     | 
| 
      
 42 
     | 
    
         
            +
                    Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
         
     | 
| 
      
 43 
     | 
    
         
            +
                    Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
         
     | 
| 
      
 44 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 45 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
         
     | 
| 
      
 46 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 47 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 48 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
         
     | 
| 
      
 49 
     | 
    
         
            +
                body:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 51 
     | 
    
         
            +
                  string: '{"card_token":"8zwisd92mo3vj78h3h1g","amount":100,"currency":"AUD","customer_ip":"111.111.111.111","sca":{},"test":true}'
         
     | 
| 
      
 52 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 53 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 54 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 55 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 56 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 57 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 58 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 59 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 61 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 62 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 63 
     | 
    
         
            +
              response:
         
     | 
| 
      
 64 
     | 
    
         
            +
                status:
         
     | 
| 
      
 65 
     | 
    
         
            +
                  code: 422
         
     | 
| 
      
 66 
     | 
    
         
            +
                  message: Unprocessable Entity
         
     | 
| 
      
 67 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 68 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 69 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 70 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 71 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 72 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 73 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 74 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 75 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 76 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 77 
     | 
    
         
            +
                  - f20df6f1e626b1465afd5e7b4c7ed6d8
         
     | 
| 
      
 78 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 79 
     | 
    
         
            +
                  - '0.016688'
         
     | 
| 
      
 80 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 81 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 82 
     | 
    
         
            +
                body:
         
     | 
| 
      
 83 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 84 
     | 
    
         
            +
                  string: '{"successful":false,"response":null,"errors":["Invalid input data"],"test":true}'
         
     | 
| 
      
 85 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 86 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
         
     | 
| 
      
 87 
     | 
    
         
            +
            recorded_with: VCR 3.0.3
         
     | 
| 
         @@ -0,0 +1,92 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 14 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 20 
     | 
    
         
            +
              response:
         
     | 
| 
      
 21 
     | 
    
         
            +
                status:
         
     | 
| 
      
 22 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 23 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 24 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 25 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 27 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 33 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - 9eaac5a0f47c58280c16fac2aeea8967
         
     | 
| 
      
 35 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - '0.276772'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 39 
     | 
    
         
            +
                body:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 41 
     | 
    
         
            +
                  string: '{"successful":true,"response":{"token":"zwjg665ok4olwtkgtxqa","card_holder":"Matthew
         
     | 
| 
      
 42 
     | 
    
         
            +
                    Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
         
     | 
| 
      
 43 
     | 
    
         
            +
                    Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
         
     | 
| 
      
 44 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 45 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
         
     | 
| 
      
 46 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 47 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 48 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
         
     | 
| 
      
 49 
     | 
    
         
            +
                body:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 51 
     | 
    
         
            +
                  string: '{"card_token":"zwjg665ok4olwtkgtxqa","amount":100,"currency":"INVALID","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"b4e1785c-adfc-4f6d-977f-f2d174f11b04","customer":{"address_1":"23
         
     | 
| 
      
 52 
     | 
    
         
            +
                    Smith Road","address_2":"North Shore","city":"Canberra","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","passport_number":"X1234567890","passport_country":"036","account_changed_at":"20191210","account_created_at":"20191210","account_password_changed_at":"20191210"},"shipping_address":{"address_1":"23
         
     | 
| 
      
 53 
     | 
    
         
            +
                    Smith Road","address_2":"North Shore","city":"Sydney","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","method":"pickup","destination_code":"01"},"custom":{"transaction_mode":"mobile","reference_id":"8334c5a5686e00bf11616b7ae5cf9c62","merchant_name":"TEST","merchant_new_customer":true,"preorder":1,"http_accept":"text/html","http_user_agent":"Mozilla/5.0
         
     | 
| 
      
 54 
     | 
    
         
            +
                    (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0","recurring_end_date":"20201201","recurring_frequency":3,"recurring_original_purchase_date":"2019120112:00:00"},"items":[{"unit_price":23.3,"product_description":"Widgets","product_name":"Watch","quantity":1,"product_sku":"9999","passenger_first_name":"John","passenger_last_name":"Smith"}],"airline_data":{"legs":[{"carrier_code":"code","departure_date":"20221012","destination":"SYD","originating_airport_code":"MEL"}],"number_of_passengers":2,"passengers":[{"first_name":"John","last_name":"Smith"},{"first_name":"Megan","last_name":"Doe"}]}},"test":true}'
         
     | 
| 
      
 55 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 56 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 57 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 58 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 59 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 60 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 61 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 62 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 63 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 64 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 65 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 66 
     | 
    
         
            +
              response:
         
     | 
| 
      
 67 
     | 
    
         
            +
                status:
         
     | 
| 
      
 68 
     | 
    
         
            +
                  code: 422
         
     | 
| 
      
 69 
     | 
    
         
            +
                  message: Unprocessable Entity
         
     | 
| 
      
 70 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 71 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 72 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 73 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 74 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 75 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 76 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 77 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 78 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 79 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 80 
     | 
    
         
            +
                  - 96ede94204ae13d0b0172ea816b6f602
         
     | 
| 
      
 81 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 82 
     | 
    
         
            +
                  - '0.029971'
         
     | 
| 
      
 83 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 84 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 85 
     | 
    
         
            +
                body:
         
     | 
| 
      
 86 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 87 
     | 
    
         
            +
                  string: '{"successful":false,"response":null,"errors":["INVALID is not valid
         
     | 
| 
      
 88 
     | 
    
         
            +
                    for this merchant. Permitted currencies: USD, EUR, GBP, AUD, CAD, JPY, CHF,
         
     | 
| 
      
 89 
     | 
    
         
            +
                    HKD, NZD, SGD, and JPY"],"test":true}'
         
     | 
| 
      
 90 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 91 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
         
     | 
| 
      
 92 
     | 
    
         
            +
            recorded_with: VCR 3.0.3
         
     | 
| 
         @@ -0,0 +1,91 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 14 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 20 
     | 
    
         
            +
              response:
         
     | 
| 
      
 21 
     | 
    
         
            +
                status:
         
     | 
| 
      
 22 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 23 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 24 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 25 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 27 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 33 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - 4b4eafb91e6d2725974219a3c6ddb2a4
         
     | 
| 
      
 35 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - '0.276697'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 39 
     | 
    
         
            +
                body:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 41 
     | 
    
         
            +
                  string: '{"successful":true,"response":{"token":"1rtqbn4v5uhfgdq645wb","card_holder":"Matthew
         
     | 
| 
      
 42 
     | 
    
         
            +
                    Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
         
     | 
| 
      
 43 
     | 
    
         
            +
                    Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
         
     | 
| 
      
 44 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 45 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
         
     | 
| 
      
 46 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 47 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 48 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
         
     | 
| 
      
 49 
     | 
    
         
            +
                body:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 51 
     | 
    
         
            +
                  string: '{"card_token":"1rtqbn4v5uhfgdq645wb","amount":"INVALID","currency":"AUD","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"cfddc4c5-7c2c-4b0d-8e6c-92a0b2f585a8","customer":{"address_1":"23
         
     | 
| 
      
 52 
     | 
    
         
            +
                    Smith Road","address_2":"North Shore","city":"Canberra","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","passport_number":"X1234567890","passport_country":"036","account_changed_at":"20191210","account_created_at":"20191210","account_password_changed_at":"20191210"},"shipping_address":{"address_1":"23
         
     | 
| 
      
 53 
     | 
    
         
            +
                    Smith Road","address_2":"North Shore","city":"Sydney","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","method":"pickup","destination_code":"01"},"custom":{"transaction_mode":"mobile","reference_id":"dec94e0b86ce6123064ffb50f4ca33ef","merchant_name":"TEST","merchant_new_customer":true,"preorder":1,"http_accept":"text/html","http_user_agent":"Mozilla/5.0
         
     | 
| 
      
 54 
     | 
    
         
            +
                    (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0","recurring_end_date":"20201201","recurring_frequency":3,"recurring_original_purchase_date":"2019120112:00:00"},"items":[{"unit_price":23.3,"product_description":"Widgets","product_name":"Watch","quantity":1,"product_sku":"9999","passenger_first_name":"John","passenger_last_name":"Smith"}],"airline_data":{"legs":[{"carrier_code":"code","departure_date":"20221012","destination":"SYD","originating_airport_code":"MEL"}],"number_of_passengers":2,"passengers":[{"first_name":"John","last_name":"Smith"},{"first_name":"Megan","last_name":"Doe"}]}},"test":true}'
         
     | 
| 
      
 55 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 56 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 57 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 58 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 59 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 60 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 61 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 62 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 63 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 64 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 65 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 66 
     | 
    
         
            +
              response:
         
     | 
| 
      
 67 
     | 
    
         
            +
                status:
         
     | 
| 
      
 68 
     | 
    
         
            +
                  code: 422
         
     | 
| 
      
 69 
     | 
    
         
            +
                  message: Unprocessable Entity
         
     | 
| 
      
 70 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 71 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 72 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 73 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 74 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 75 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 76 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 77 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 78 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 79 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 80 
     | 
    
         
            +
                  - 27858cda4cc746888b962aeb5d264bb2
         
     | 
| 
      
 81 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 82 
     | 
    
         
            +
                  - '0.079520'
         
     | 
| 
      
 83 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 84 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 85 
     | 
    
         
            +
                body:
         
     | 
| 
      
 86 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 87 
     | 
    
         
            +
                  string: '{"successful":false,"response":null,"errors":["3DS authenticate request
         
     | 
| 
      
 88 
     | 
    
         
            +
                    failed: amount must be filled"],"test":true}'
         
     | 
| 
      
 89 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 90 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
         
     | 
| 
      
 91 
     | 
    
         
            +
            recorded_with: VCR 3.0.3
         
     | 
| 
         @@ -0,0 +1,46 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 14 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 20 
     | 
    
         
            +
              response:
         
     | 
| 
      
 21 
     | 
    
         
            +
                status:
         
     | 
| 
      
 22 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 23 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 24 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 25 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 27 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 33 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - f6dc839b7c8bdbff516d4458cf260431
         
     | 
| 
      
 35 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - '0.275701'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 39 
     | 
    
         
            +
                body:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 41 
     | 
    
         
            +
                  string: '{"successful":true,"response":{"token":"sa0vydbycjer8isyh7ws","card_holder":"Matthew
         
     | 
| 
      
 42 
     | 
    
         
            +
                    Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
         
     | 
| 
      
 43 
     | 
    
         
            +
                    Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
         
     | 
| 
      
 44 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 45 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 03:37:01 GMT
         
     | 
| 
      
 46 
     | 
    
         
            +
            recorded_with: VCR 3.0.3
         
     | 
| 
         @@ -0,0 +1,47 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate/decode_session?test=true&token=INVALID%20TOKEN
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 14 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Host:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - gateway.sandbox.fatzebra.com.au
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Authorization:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - Basic VEVTVDpURVNU
         
     | 
| 
      
 20 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 21 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 22 
     | 
    
         
            +
              response:
         
     | 
| 
      
 23 
     | 
    
         
            +
                status:
         
     | 
| 
      
 24 
     | 
    
         
            +
                  code: 422
         
     | 
| 
      
 25 
     | 
    
         
            +
                  message: Unprocessable Entity
         
     | 
| 
      
 26 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 27 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - no-store
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Pragma:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - no-cache
         
     | 
| 
      
 31 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 33 
     | 
    
         
            +
                  X-Request-Version:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - 1.21.8
         
     | 
| 
      
 35 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - a32509c0289cec10954d4d581bfeb46f
         
     | 
| 
      
 37 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - '0.039686'
         
     | 
| 
      
 39 
     | 
    
         
            +
                  Transfer-Encoding:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  - chunked
         
     | 
| 
      
 41 
     | 
    
         
            +
                body:
         
     | 
| 
      
 42 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 43 
     | 
    
         
            +
                  string: '{"successful":false,"response":null,"errors":["Decoding JWT failed:
         
     | 
| 
      
 44 
     | 
    
         
            +
                    The token is invalid"],"test":true}'
         
     | 
| 
      
 45 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 46 
     | 
    
         
            +
              recorded_at: Fri, 13 Dec 2019 00:52:54 GMT
         
     | 
| 
      
 47 
     | 
    
         
            +
            recorded_with: VCR 3.0.3
         
     |