Sha256: 6d29f895071af8dae0240097b6f6598bc5352307c16ace8e115f4de8403e9f5a

Contents?: true

Size: 860 Bytes

Versions: 44

Compression:

Stored size: 860 Bytes

Contents

describe MangoPay::Report do

  def create
    params = {
      Tag: 'custom meta',
      CallbackURL: 'http://www.my-site.com/callbackURL/',
      DownloadFormat: 'CSV',
      Sort: 'CreationDate:DESC',
      Preview: false,
      Filters: {},
      Columns: [ 'Id', 'CreationDate' ],
      ReportType: 'wallets'
    }
    MangoPay::Report.create(params)
  end

  describe 'CREATE' do
    it 'creates a report' do
      created = create
      expect(created['Id']).to_not be_nil
    end
  end

  describe 'FETCH' do

    it 'fetches a report' do
      created = create
      fetched = MangoPay::Report.fetch(created['Id'])
      expect(fetched['Id']).to eq(created['Id'])
    end

    it 'fetches all the reports' do
      reports = MangoPay::Report.fetch()
      expect(reports).to be_kind_of(Array)
      expect(reports).not_to be_empty
    end

  end

end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
mangopay-3.11.1 spec/mangopay/report_wallets_spec.rb
mangopay-3.11.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.10.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.9.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.8.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.7.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.6.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.5.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.4.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.3.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.2.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.1.0 spec/mangopay/report_wallets_spec.rb
mangopay-3.0.38 spec/mangopay/report_wallets_spec.rb
mangopay-3.0.37 spec/mangopay/report_wallets_spec.rb
mangopay-3.0.36 spec/mangopay/report_wallets_spec.rb
mangopay-3.0.35 spec/mangopay/report_wallets_spec.rb
mangopay-3.0.34 spec/mangopay/report_wallets_spec.rb
mangopay-3.0.33 spec/mangopay/report_wallets_spec.rb
mangopay-3.0.32 spec/mangopay/report_wallets_spec.rb
mangopay-3.0.31 spec/mangopay/report_wallets_spec.rb