Sha256: c32a2b0deb398929bcc83e62e018e818f62620c3ebfc35b10cadea514483699c

Contents?: true

Size: 800 Bytes

Versions: 12

Compression:

Stored size: 800 Bytes

Contents

describe MangoPay::Refund do
  include_context 'transfers'

  describe 'FETCH' do
    it 'fetches a refund' do
      transfer = new_transfer
      resource = MangoPay::Transfer.refund(transfer['Id'], { AuthorId: transfer['AuthorId'] })

      refund = MangoPay::Refund.fetch(resource['Id'])

      expect(refund['Id']).not_to be_nil
      expect(refund['Status']).to eq('SUCCEEDED')
      expect(refund['Type']).to eq('TRANSFER')
      expect(refund['Nature']).to eq('REFUND')
      expect(refund['InitialTransactionType']).to eq('TRANSFER')
      expect(refund['InitialTransactionId']).to eq(transfer['Id'])
      expect(refund['DebitedWalletId']).to eq(transfer['CreditedWalletId'])
      expect(refund['CreditedWalletId']).to eq(transfer['DebitedWalletId'])
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mangopay-3.0.25 spec/mangopay/refund_spec.rb
mangopay-3.0.23 spec/mangopay/refund_spec.rb
mangopay-3.0.21 spec/mangopay/refund_spec.rb
mangopay-3.0.20 spec/mangopay/refund_spec.rb
mangopay-3.0.19 spec/mangopay/refund_spec.rb
mangopay-3.0.18 spec/mangopay/refund_spec.rb
mangopay-3.0.17 spec/mangopay/refund_spec.rb
mangopay-3.0.16 spec/mangopay/refund_spec.rb
mangopay-3.0.15 spec/mangopay/refund_spec.rb
mangopay-3.0.14 spec/mangopay/refund_spec.rb
mangopay-3.0.13 spec/mangopay/refund_spec.rb
mangopay-3.0.12 spec/mangopay/refund_spec.rb