Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Added next_payment_date method #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/paypal/recurring/response/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Profile < Base
:remaining => :NUMCYCLESREMAINING,
:outstanding_balance => :OUTSTANDINGBALANCE,
:failed_count => :FAILEDPAYMENTCOUNT,
:next_payment_date => :NEXTBILLINGDATE,
:last_payment_date => :LASTPAYMENTDATE,
:last_payment_amount => :LASTPAYMENTAMT,
:period => :BILLINGPERIOD,
Expand Down Expand Up @@ -65,6 +66,7 @@ def build_period(value)

alias_method :build_start_at, :build_date
alias_method :build_last_payment_date, :build_date
alias_method :build_next_payment_date, :build_date
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/profile/success.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions spec/paypal/response/profile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
its(:remaining) { should == "0" }
its(:outstanding_balance) { should == "0.00" }
its(:failed_count) { should == "0" }
its(:next_payment_date) { should be_a(Time) }
its(:last_payment_date) { should be_a(Time) }
its(:last_payment_amount) { should == "9.00" }
its(:period) { should == :monthly }
Expand Down