-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daan van Marsbergen
committed
May 10, 2016
1 parent
4affa24
commit 754f2ea
Showing
6 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module Mollie | ||
module API | ||
class Client | ||
CLIENT_VERSION = "1.2.2" | ||
CLIENT_VERSION = "1.3.0" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Mollie | ||
module API | ||
module Object | ||
class Mandate < Base | ||
STATUS_VALID = "valid" | ||
STATUS_INVALID = "invalid" | ||
|
||
attr_accessor :resource, | ||
:id, | ||
:status, | ||
:method, | ||
:customerId, | ||
:details, | ||
:createdDatetime | ||
|
||
def valid? | ||
@status == STATUS_VALID | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require 'open-uri' | ||
|
||
module Mollie | ||
module API | ||
module Resource | ||
class Customers | ||
class Mandates < Base | ||
@customer_id = nil | ||
|
||
def getResourceObject | ||
Mollie::API::Object::Mandate | ||
end | ||
|
||
def getResourceName | ||
customer_id = URI::encode(@customer_id) | ||
"customers/#{customer_id}/mandates" | ||
end | ||
|
||
def with(customer) | ||
@customer_id = customer.id | ||
self | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |