Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
knowmalaria
stripe-ruby-mock
Commits
bdb8cdd4
Commit
bdb8cdd4
authored
Feb 11, 2016
by
Daniel Podaru
Browse files
Add `currency` attribute to customer
parent
6ad891de
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/stripe_mock/data.rb
View file @
bdb8cdd4
...
...
@@ -32,6 +32,7 @@ module StripeMock
delinquent:
false
,
discount:
nil
,
account_balance:
0
,
currency:
nil
,
sources:
{
object:
"list"
,
total_count:
sources
.
size
,
...
...
lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb
View file @
bdb8cdd4
...
...
@@ -30,6 +30,7 @@ module StripeMock
charges
[
id
]
=
Data
.
mock_charge
(
:id
=>
id
,
:customer
=>
cus
[
:id
],
:amount
=>
sub
[
:plan
][
:amount
])
cus
[
:subscriptions
][
:total_count
]
=
(
cus
[
:subscriptions
][
:total_count
]
||
0
)
+
1
cus
[
:subscriptions
][
:data
].
unshift
sub
cus
[
:currency
]
=
sub
[
:plan
][
:currency
]
end
def
delete_subscription_from_customer
(
cus
,
subscription
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment