Business-GoCardless
    
    
  
  
  
view release on metacpan or search on metacpan
t/business/gocardless.t view on Meta::CPAN
    like(
        my $new_pre_auth_url = $GoCardless->new_pre_authorization_url(
            max_amount         => 100,
            interval_length    => 10,
            interval_unit      => 'day',
            expires_at         => '2020-01-01',
            name               => "Test PreAuthorization",
            description        => "Test PreAuthorization for testing",
            interval_count     => 10,
            setup_fee          => 500,
            calendar_intervals => 0,
            redirect_uri       => "http://localhost/success",
            cancel_uri         => "http://localhost/cancel",
            state              => "id_9SX5G36",
            user               => {
                first_name     => "Lee",
            }
        ),
        qr!https://gocardless\.com/connect/pre_authorizations/new\?cancel_uri=http%3A%2F%2Flocalhost%2Fcancel&client_id=foo&nonce=.*?&pre_authorization%5Bcalendar_intervals%5D=0&pre_authorization%5Bdescription%5D=Test%20PreAuthorization%20for%20testi...
        '->new_pre_authorization_url returns a url'
    );
    $mock->mock( 'content',sub { _pre_auth_json() } );
    cmp_deeply(
        my $PreAuthorization = $GoCardless->confirm_resource(
            resource_id   => 'foo',
            resource_type => 'pre_authorization',
        ),
        _pre_auth_obj(),
( run in 0.659 second using v1.01-cache-2.11-cpan-5dc5da66d9d )