-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#26] WIP: Add option to return embeds for payments
- Loading branch information
1 parent
469871f
commit 09a0383
Showing
11 changed files
with
136 additions
and
26 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(ns com.adgoji.mollie.order | ||
(:require | ||
[clojure.spec.alpha :as s] | ||
[com.adgoji.common :as common])) | ||
|
||
(s/def ::resource #{"order"}) | ||
(s/def ::id string?) | ||
;; TODO: Add profiles | ||
(s/def ::profile-id string?) | ||
(s/def ::method ::common/payment-method) | ||
(s/def ::mode ::common/mode) |
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,8 @@ | ||
(ns com.adgoji.mollie.order-line | ||
(:require | ||
[clojure.spec.alpha :as s] | ||
[com.adgoji.mollie.order :as order])) | ||
|
||
(s/def ::resource #{"orderline"}) | ||
(s/def ::id string?) | ||
(s/def ::order-id ::order/id) |
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,26 @@ | ||
(ns com.adgoji.mollie.refund | ||
(:require | ||
[clojure.spec.alpha :as s] | ||
[com.adgoji.mollie.amount :as amount] | ||
[com.adgoji.mollie.payment :as payment] | ||
[com.adgoji.mollie.settlement :as settlement])) | ||
|
||
(s/def ::resource #{"refund"}) | ||
(s/def ::id string?) | ||
(s/def ::amount (s/keys :req [::amount/currency ::amount/value])) | ||
(s/def ::description string?) | ||
(s/def ::metadata map?) | ||
(s/def ::status | ||
#{:queued | ||
:pending | ||
:processing | ||
:refunded | ||
:failed | ||
:canceled}) | ||
(s/def ::payment-id ::payment/id) | ||
(s/def ::created-at inst?) | ||
(s/def ::settlement-id ::settlement/id) | ||
(s/def ::settlement-amount ::settlement/amount) | ||
;; TODO: Replace with order | ||
(s/def ::order-id string?) | ||
(s/def ::lines any?) |
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,8 @@ | ||
(ns com.adgoji.mollie.refund.request | ||
(:require | ||
[clojure.spec.alpha :as s] | ||
[com.adgoji.mollie.amount :as amount])) | ||
|
||
(s/def ::amount (s/keys :req-un [::amount/currency ::amount/value])) | ||
(s/def ::description string?) | ||
(s/def ::metadata map?) |
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,17 @@ | ||
(ns com.adgoji.mollie.settlement | ||
(:require | ||
[clojure.spec.alpha :as s] | ||
[com.adgoji.mollie.amount :as amount])) | ||
|
||
(s/def ::resource #{"settlement"}) | ||
(s/def ::id string?) | ||
(s/def ::reference string?) | ||
(s/def ::created-at inst?) | ||
(s/def ::settled-at inst?) | ||
(s/def ::status | ||
#{:open | ||
:pending | ||
:paidout | ||
:failed}) | ||
(s/def ::amount (s/keys :req [::amount/currency ::amount/value])) | ||
(s/def ::periods map?) |
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
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