mollie-api-ruby 4.9.0 → 4.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +25 -0
  3. data/CHANGELOG.md +22 -0
  4. data/README.md +1 -1
  5. data/examples/methods/list.rb +4 -0
  6. data/examples/orders/create-payment.rb +1 -0
  7. data/examples/orders/get.rb +4 -1
  8. data/examples/orders/update-orderline.rb +7 -0
  9. data/examples/organisations/get-partner.rb +1 -0
  10. data/examples/profiles/create.rb +6 -6
  11. data/lib/mollie/list.rb +4 -2
  12. data/lib/mollie/method.rb +7 -1
  13. data/lib/mollie/onboarding.rb +1 -1
  14. data/lib/mollie/order/line.rb +4 -0
  15. data/lib/mollie/order/payment.rb +6 -0
  16. data/lib/mollie/order.rb +29 -1
  17. data/lib/mollie/partner.rb +52 -0
  18. data/lib/mollie/payment.rb +6 -1
  19. data/lib/mollie/profile.rb +3 -1
  20. data/lib/mollie/version.rb +1 -1
  21. data/lib/mollie.rb +2 -0
  22. data/test/fixtures/customer/get.json +36 -0
  23. data/test/fixtures/customer/list-payments-next.json +30 -0
  24. data/test/fixtures/customer/list-payments.json +30 -0
  25. data/test/fixtures/methods/all.json +92 -0
  26. data/test/fixtures/onboarding/me.json +1 -1
  27. data/test/fixtures/orders/create_payment.json +38 -0
  28. data/test/fixtures/orders/get.json +0 -38
  29. data/test/fixtures/orders/get_embedded_resources.json +369 -0
  30. data/test/fixtures/orders/update_line.json +226 -0
  31. data/test/fixtures/organizations/partner.json +26 -0
  32. data/test/mollie/list_test.rb +60 -0
  33. data/test/mollie/method_test.rb +13 -0
  34. data/test/mollie/order/create_payment_test.rb +20 -0
  35. data/test/mollie/order/line_test.rb +18 -0
  36. data/test/mollie/order_test.rb +33 -0
  37. data/test/mollie/partner_test.rb +47 -0
  38. data/test/mollie/profile_test.rb +2 -0
  39. metadata +27 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: daa3c6e8a7c880ce66a0207c1ea3785e013095d605ad0c3a39b52fe0675c0bab
4
- data.tar.gz: 67135ecb024b74073aa35a0235a929d0a17c2f2ddf495d74eb47afc098963653
3
+ metadata.gz: 3771f281c214f0e44afd28c576b79c25aaddb41e8cbb0bb660a17a5ce0381e7e
4
+ data.tar.gz: 958f0d36aae881909578c746b936f16dbf67a94ae3a7f8d79113f2e9d026b8cc
5
5
  SHA512:
6
- metadata.gz: 8b7deb45b0c8537e38f4f72640398eb93a9a90108fefa9930b2575f8cb9e3c03cbaacdab2e37062d318cedbabe73d4f37a662627440605c1967388026763c015
7
- data.tar.gz: 1d18195babbf2b7a4204849e1ff4fcaf57ce49fbaec01fe238d43cadb2319f01cab3fd08bdad56e745bbcac6748358e33730b564e2b5667f9f8ab3307780a252
6
+ metadata.gz: 223833841d3d5c122a81df8985f456a447d5ed1bee91e8daea7b1ffda1ba4c50ec73254dbead5c6efd444e091b9e18038985fb3a3559d1ab33bb8ee665025901
7
+ data.tar.gz: e57c84fb83b53b0c6ac59dfecc7fbb407f4c33fd84c9c5110e68ac8e381c42eb346f027123554a85d5d8f927178976a872efc0b9005a02b7a808811da687dc54
@@ -0,0 +1,25 @@
1
+ name: build
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
16
+
17
+ name: Ruby (${{ matrix.ruby-version }})
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+ - name: Run tests
25
+ run: bundle install && bundle exec rake test
data/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@
4
4
 
5
5
  All notable changes to this project will be documented in this file.
6
6
 
7
+ ## 4.11.0 - 2022-03-01
8
+
9
+ - (1ef339e) Add Partner API
10
+
11
+ ## 4.10.0 - 2021-11-20
12
+
13
+ :warning: The `Profile#category_code` attribute is deprecated and will be removed in 2022. Please use the `business_category` parameter instead.
14
+
15
+ - (f0e695c) Order: add methods to retrieve embedded resources
16
+ - (e16864c) Order: add class to create order payments
17
+ - (5175cd3) Profile: add `business_category` attribute
18
+ - (3d2e370) Payment: add `amount_charged_back` attribute
19
+ - (3d6b403) Fix assignment method for `amount_captured`
20
+ - (37280c3) Migrate from Travis CI to GitHub Actions
21
+ - (33bb6bb) Add example to update orderlines
22
+ - (c70dbf6) fix: orderline update returns incorrect class
23
+ - (ca5935d) Add example to retrieve all available payment methods
24
+ - (457b853) Add "List all payment methods" API
25
+ - (9d8eebc) Method: add status attribute (#147)
26
+ - (506d52e) fix: Include parent resource in pagination calls
27
+ - (7e3b98d) Fix onboarding dashboard URL.
28
+
7
29
  ## 4.9.0 - 2020-05-17
8
30
 
9
31
  - Settlement: add `captures` helper method.
data/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  > LOOKING FOR VERSION v3.1.X README? [CLICK HERE](https://github.com/mollie/mollie-api-ruby/tree/v3.1.6)
11
11
 
12
12
  [![Gem Version](https://badge.fury.io/rb/mollie-api-ruby.svg)](https://badge.fury.io/rb/mollie-api-ruby)
13
- [![](https://travis-ci.org/mollie/mollie-api-ruby.png)](https://travis-ci.org/mollie/mollie-api-ruby)
13
+ [![Build Status](https://github.com/mollie/mollie-api-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/mollie/mollie-api-ruby/actions/workflows/build.yml)
14
14
 
15
15
  Accepting [iDEAL](https://www.mollie.com/en/payments/ideal), [Bancontact](https://www.mollie.com/en/payments/bancontact), [SOFORT Banking](https://www.mollie.com/en/payments/sofort), [Creditcard](https://www.mollie.com/en/payments/credit-card), [SEPA Bank transfer](https://www.mollie.com/en/payments/bank-transfer), [SEPA Direct debit](https://www.mollie.com/en/payments/direct-debit), [PayPal](https://www.mollie.com/en/payments/paypal), [KBC/CBC Payment Button](https://www.mollie.com/en/payments/kbc-cbc), [Belfius Direct Net](https://www.mollie.com/en/payments/belfius), [paysafecard](https://www.mollie.com/en/payments/paysafecard), [ING Home’Pay](https://www.mollie.com/en/payments/ing-homepay), [Gift cards](https://www.mollie.com/en/payments/gift-cards), [EPS](https://www.mollie.com/en/payments/eps), [Giropay](https://www.mollie.com/en/payments/giropay) and [Apple Pay](https://www.mollie.com/en/payments/apple-pay) online payments without fixed monthly costs or any punishing registration procedures. Just use the Mollie API to receive payments directly on your website or easily refund transactions to your customers.
16
16
 
@@ -2,3 +2,7 @@ methods = Mollie::Method.all
2
2
 
3
3
  # Filter by amount and currency
4
4
  methods = Mollie::Method.all(amount: { value: '100.00', currency: 'EUR' })
5
+
6
+ # Retrieve all payment methods that Mollie offers and can be activated by
7
+ # the Organization.
8
+ methods = Mollie::Method.all_available
@@ -0,0 +1 @@
1
+ payment = Mollie::Order::Payment.create(order_id: "ord_kEn1PlbGa")
@@ -1 +1,4 @@
1
- order = Mollie::Order.get('ord_kEn1PlbGa')
1
+ order = Mollie::Order.get("ord_kEn1PlbGa")
2
+
3
+ # Embed related resources
4
+ order = Mollie::Order.get("ord_kEn1PlbGa", embed: "payments,refunds,shipments")
@@ -0,0 +1,7 @@
1
+ orderline_id = "odl_dgtxyl"
2
+
3
+ order = Mollie::Order::Line.update(
4
+ orderline_id,
5
+ order_id: "ord_kEn1PlbGa",
6
+ sku: "new-sku-12345678"
7
+ )
@@ -0,0 +1 @@
1
+ partner = Mollie::Partner.current
@@ -1,8 +1,8 @@
1
1
  profile = Mollie::Profile.create(
2
- name: 'My website name',
3
- website: 'https://www.mywebsite.com',
4
- email: 'info@mywebsite.com',
5
- phone: '+31208202070',
6
- categoryCode: '5399',
7
- mode: 'live'
2
+ name: 'My website name',
3
+ website: 'https://www.mywebsite.com',
4
+ email: 'info@mywebsite.com',
5
+ phone: '+31208202070',
6
+ business_category: 'OTHER_MERCHANDISE',
7
+ mode: 'live'
8
8
  )
data/lib/mollie/list.rb CHANGED
@@ -38,7 +38,8 @@ module Mollie
38
38
  href = URI.parse(links['next']['href'])
39
39
  query = URI.decode_www_form(href.query).to_h
40
40
 
41
- klass.all(options.merge(query))
41
+ response = Mollie::Client.instance.perform_http_call('GET', links['next']['href'], nil, {}, options.merge(query))
42
+ self.class.new(response, klass)
42
43
  end
43
44
 
44
45
  def previous(options = {})
@@ -47,7 +48,8 @@ module Mollie
47
48
  href = URI.parse(links['previous']['href'])
48
49
  query = URI.decode_www_form(href.query).to_h
49
50
 
50
- klass.all(options.merge(query))
51
+ response = Mollie::Client.instance.perform_http_call('GET', links['previous']['href'], nil, {}, options.merge(query))
52
+ self.class.new(response, klass)
51
53
  end
52
54
  end
53
55
  end
data/lib/mollie/method.rb CHANGED
@@ -25,7 +25,13 @@ module Mollie
25
25
  :maximum_amount,
26
26
  :image,
27
27
  :issuers,
28
- :pricing
28
+ :pricing,
29
+ :status
30
+
31
+ def self.all_available(options = {})
32
+ response = Client.instance.perform_http_call("GET", "methods", "all", {}, options)
33
+ Mollie::List.new(response, Mollie::Method)
34
+ end
29
35
 
30
36
  def minimum_amount=(minimum_amount)
31
37
  @minimum_amount = Mollie::Amount.new(minimum_amount)
@@ -20,7 +20,7 @@ module Mollie
20
20
  end
21
21
 
22
22
  def dashboard
23
- Util.extract_url(links, 'onboarding')
23
+ Util.extract_url(links, 'dashboard')
24
24
  end
25
25
 
26
26
  def organization(options = {})
@@ -29,6 +29,10 @@ module Mollie
29
29
 
30
30
  alias links _links
31
31
 
32
+ def self.update(id, data = {})
33
+ request('PATCH', id, data) { |response| Order.new(response) }
34
+ end
35
+
32
36
  def cancelable?
33
37
  is_cancelable == true
34
38
  end
@@ -0,0 +1,6 @@
1
+ module Mollie
2
+ class Order
3
+ class Payment < ::Mollie::Payment
4
+ end
5
+ end
6
+ end
data/lib/mollie/order.rb CHANGED
@@ -130,8 +130,36 @@ module Mollie
130
130
  @completed_at = Time.parse(completed_at.to_s)
131
131
  end
132
132
 
133
+ def payments
134
+ resources = (attributes['_embedded']['payments'] if attributes['_embedded'])
135
+
136
+ if resources.nil?
137
+ List.new({}, Order::Payment)
138
+ else
139
+ List.new({ '_embedded' => { 'payments' => resources } }, Order::Payment)
140
+ end
141
+ end
142
+
133
143
  def refunds(options = {})
134
- Order::Refund.all(options.merge(order_id: id))
144
+ resources = (attributes['_embedded']['refunds'] if attributes['_embedded'])
145
+
146
+ if resources.nil?
147
+ # To avoid breaking changes, fallback to /v2/order/*orderId*/refunds
148
+ # if the order was retrieved without embedded refunds.
149
+ Order::Refund.all(options.merge(order_id: id))
150
+ else
151
+ List.new({ '_embedded' => { 'refunds' => resources } }, Order::Refund)
152
+ end
153
+ end
154
+
155
+ def shipments
156
+ resources = (attributes['_embedded']['shipments'] if attributes['_embedded'])
157
+
158
+ if resources.nil?
159
+ List.new({}, Order::Shipment)
160
+ else
161
+ List.new({ '_embedded' => { 'shipments' => resources } }, Order::Shipment)
162
+ end
135
163
  end
136
164
 
137
165
  def refund!(options = {})
@@ -0,0 +1,52 @@
1
+ module Mollie
2
+ class Partner < Base
3
+ attr_accessor :partner_type,
4
+ :is_commission_partner,
5
+ :partner_contract_signed_at,
6
+ :partner_contract_update_available,
7
+ :_links
8
+
9
+ attr_reader :user_agent_tokens
10
+
11
+ alias links _links
12
+
13
+ def self.current(options = {})
14
+ response = Client.instance.perform_http_call('GET', 'organizations/me/partner', nil, {}, options)
15
+ new(response)
16
+ end
17
+
18
+ def type
19
+ partner_type
20
+ end
21
+
22
+ def commission_partner?
23
+ is_commission_partner
24
+ end
25
+
26
+ def contract_signed_at
27
+ @contract_signed_at = begin
28
+ Time.parse(partner_contract_signed_at)
29
+ rescue StandardError
30
+ nil
31
+ end
32
+ end
33
+
34
+ def contract_update_available?
35
+ partner_contract_update_available
36
+ end
37
+
38
+ def user_agent_tokens=(tokens)
39
+ @user_agent_tokens = tokens.map do |token|
40
+ OpenStruct.new(
41
+ token: token['token'],
42
+ starts_at: Time.parse(token['starts_at']),
43
+ ends_at: (Time.parse(token['ends_at']) unless token['ends_at'].nil?)
44
+ )
45
+ end
46
+ end
47
+
48
+ def signuplink
49
+ Util.extract_url(links, 'signuplink')
50
+ end
51
+ end
52
+ end
@@ -25,6 +25,7 @@ module Mollie
25
25
  :failed_at,
26
26
  :amount,
27
27
  :amount_captured,
28
+ :amount_charged_back,
28
29
  :amount_refunded,
29
30
  :amount_remaining,
30
31
  :description,
@@ -167,10 +168,14 @@ module Mollie
167
168
  @settlement_amount = Mollie::Amount.new(settlement_amount)
168
169
  end
169
170
 
170
- def amount_captured
171
+ def amount_captured=(amount_captured)
171
172
  @amount_captured = Mollie::Amount.new(amount_captured)
172
173
  end
173
174
 
175
+ def amount_charged_back=(amount_charged_back)
176
+ @amount_charged_back = Mollie::Amount.new(amount_charged_back)
177
+ end
178
+
174
179
  def amount_remaining=(amount_remaining)
175
180
  @amount_remaining = Mollie::Amount.new(amount_remaining)
176
181
  end
@@ -24,7 +24,9 @@ module Mollie
24
24
  :website,
25
25
  :email,
26
26
  :phone,
27
- :category_code,
27
+ :business_category,
28
+ :category_code, # This parameter is deprecated and will be removed in 2022.
29
+ # Please use the businessCategory parameter instead.
28
30
  :status,
29
31
  :review,
30
32
  :created_at,
@@ -1,3 +1,3 @@
1
1
  module Mollie
2
- VERSION = '4.9.0'.freeze
2
+ VERSION = '4.11.0'.freeze
3
3
  end
data/lib/mollie.rb CHANGED
@@ -21,6 +21,7 @@ require 'mollie/list'
21
21
  require 'mollie/method'
22
22
  require 'mollie/order'
23
23
  require 'mollie/organization'
24
+ require 'mollie/partner'
24
25
  require 'mollie/payment'
25
26
  require 'mollie/permission'
26
27
  require 'mollie/profile'
@@ -33,6 +34,7 @@ require 'mollie/customer/payment'
33
34
  require 'mollie/customer/subscription'
34
35
  require 'mollie/onboarding'
35
36
  require 'mollie/order/line'
37
+ require 'mollie/order/payment'
36
38
  require 'mollie/order/refund'
37
39
  require 'mollie/order/shipment'
38
40
  require 'mollie/payment/capture'
@@ -0,0 +1,36 @@
1
+ {
2
+ "resource": "customer",
3
+ "id": "cst_8wmqcHMN4U",
4
+ "mode": "test",
5
+ "name": "Customer A",
6
+ "email": "customer@example.org",
7
+ "locale": "nl_NL",
8
+ "metadata": null,
9
+ "createdAt": "2018-04-06T13:23:21.0Z",
10
+ "_links": {
11
+ "self": {
12
+ "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U",
13
+ "type": "application/hal+json"
14
+ },
15
+ "dashboard": {
16
+ "href": "https://www.mollie.com/dashboard/org_123456789/customers/cst_8wmqcHMN4U",
17
+ "type": "text/html"
18
+ },
19
+ "mandates": {
20
+ "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/mandates",
21
+ "type": "application/hal+json"
22
+ },
23
+ "subscriptions": {
24
+ "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/subscriptions",
25
+ "type": "application/hal+json"
26
+ },
27
+ "payments": {
28
+ "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/payments",
29
+ "type": "application/hal+json"
30
+ },
31
+ "documentation": {
32
+ "href": "https://docs.mollie.com/reference/v2/customers-api/get-customer",
33
+ "type": "text/html"
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "count": 2,
3
+ "_embedded": {
4
+ "payments": [
5
+ {
6
+ "resource": "payment",
7
+ "id":"tr_3"
8
+ },
9
+ {
10
+ "resource": "payment",
11
+ "id":"tr_4"
12
+ }
13
+ ]
14
+ },
15
+ "_links": {
16
+ "documentation": {
17
+ "href": "https://docs.mollie.com/reference/v2/customers-api/list-customer-payments",
18
+ "type": "text/html"
19
+ },
20
+ "self": {
21
+ "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/payments?from=tr_3&limit=2",
22
+ "type": "application/hal+json"
23
+ },
24
+ "previous": {
25
+ "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/payments?from=tr_1&limit=2",
26
+ "type": "application/hal+json"
27
+ },
28
+ "next": null
29
+ }
30
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "count": 2,
3
+ "_embedded": {
4
+ "payments": [
5
+ {
6
+ "resource": "payment",
7
+ "id":"tr_1"
8
+ },
9
+ {
10
+ "resource": "payment",
11
+ "id":"tr_2"
12
+ }
13
+ ]
14
+ },
15
+ "_links": {
16
+ "documentation": {
17
+ "href": "https://docs.mollie.com/reference/v2/customers-api/list-customer-payments",
18
+ "type": "text/html"
19
+ },
20
+ "self": {
21
+ "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/payments?limit=2",
22
+ "type": "application/hal+json"
23
+ },
24
+ "previous": null,
25
+ "next": {
26
+ "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/payments?from=tr_3&limit=2",
27
+ "type": "application/hal+json"
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "count": 3,
3
+ "_embedded": {
4
+ "methods": [
5
+ {
6
+ "resource": "method",
7
+ "id": "ideal",
8
+ "description": "iDEAL",
9
+ "minimumAmount": {
10
+ "value": "0.01",
11
+ "currency": "EUR"
12
+ },
13
+ "maximumAmount": {
14
+ "value": "50000.00",
15
+ "currency": "EUR"
16
+ },
17
+ "image": {
18
+ "size1x": "https://www.mollie.com/external/icons/payment-methods/ideal.png",
19
+ "size2x": "https://www.mollie.com/external/icons/payment-methods/ideal%402x.png",
20
+ "svg": "https://www.mollie.com/external/icons/payment-methods/ideal.svg"
21
+ },
22
+ "status": "pending-boarding",
23
+ "_links": {
24
+ "self": {
25
+ "href": "https://api.mollie.com/v2/methods/ideal",
26
+ "type": "application/hal+json"
27
+ }
28
+ }
29
+ },
30
+ {
31
+ "resource": "method",
32
+ "id": "creditcard",
33
+ "description": "Credit card",
34
+ "minimumAmount": {
35
+ "value": "0.01",
36
+ "currency": "EUR"
37
+ },
38
+ "maximumAmount": {
39
+ "value": "2000.00",
40
+ "currency": "EUR"
41
+ },
42
+ "image": {
43
+ "size1x": "https://www.mollie.com/external/icons/payment-methods/creditcard.png",
44
+ "size2x": "https://www.mollie.com/external/icons/payment-methods/creditcard%402x.png",
45
+ "svg": "https://www.mollie.com/external/icons/payment-methods/creditcard.svg"
46
+ },
47
+ "status": "pending-boarding",
48
+ "_links": {
49
+ "self": {
50
+ "href": "https://api.mollie.com/v2/methods/creditcard",
51
+ "type": "application/hal+json"
52
+ }
53
+ }
54
+ },
55
+ {
56
+ "resource": "method",
57
+ "id": "bancontact",
58
+ "description": "Bancontact",
59
+ "minimumAmount": {
60
+ "value": "0.02",
61
+ "currency": "EUR"
62
+ },
63
+ "maximumAmount": {
64
+ "value": "50000.00",
65
+ "currency": "EUR"
66
+ },
67
+ "image": {
68
+ "size1x": "https://www.mollie.com/external/icons/payment-methods/bancontact.png",
69
+ "size2x": "https://www.mollie.com/external/icons/payment-methods/bancontact%402x.png",
70
+ "svg": "https://www.mollie.com/external/icons/payment-methods/bancontact.svg"
71
+ },
72
+ "status": null,
73
+ "_links": {
74
+ "self": {
75
+ "href": "https://api.mollie.com/v2/methods/bancontact",
76
+ "type": "application/hal+json"
77
+ }
78
+ }
79
+ }
80
+ ]
81
+ },
82
+ "_links": {
83
+ "documentation": {
84
+ "href": "https://docs.mollie.com/reference/v2/methods-api/list-all-methods",
85
+ "type": "text/html"
86
+ },
87
+ "self": {
88
+ "href": "https://api.mollie.com/v2/methods/all",
89
+ "type": "application/hal+json"
90
+ }
91
+ }
92
+ }
@@ -10,7 +10,7 @@
10
10
  "href": "https://api.mollie.com/v2/onboarding/me",
11
11
  "type": "application/hal+json"
12
12
  },
13
- "onboarding": {
13
+ "dashboard": {
14
14
  "href": "https://www.mollie.com/dashboard/onboarding",
15
15
  "type": "text/html"
16
16
  },
@@ -0,0 +1,38 @@
1
+ {
2
+ "resource": "payment",
3
+ "id": "tr_ncaPcAhuUV",
4
+ "mode": "live",
5
+ "createdAt": "2018-09-07T12:00:05+00:00",
6
+ "amount": {
7
+ "value": "1027.99",
8
+ "currency": "EUR"
9
+ },
10
+ "description": "Order #1337 (Lego cars)",
11
+ "method": null,
12
+ "metadata": null,
13
+ "status": "open",
14
+ "isCancelable": false,
15
+ "locale": "nl_NL",
16
+ "profileId": "pfl_URR55HPMGx",
17
+ "orderId": "ord_kEn1PlbGa",
18
+ "sequenceType": "oneoff",
19
+ "redirectUrl": "https://example.org/redirect",
20
+ "_links": {
21
+ "self": {
22
+ "href": "https://api.mollie.com/v2/payments/tr_ncaPcAhuUV",
23
+ "type": "application/hal+json"
24
+ },
25
+ "checkout": {
26
+ "href": "https://www.mollie.com/payscreen/select-method/ncaPcAhuUV",
27
+ "type": "text/html"
28
+ },
29
+ "dashboard": {
30
+ "href": "https://www.mollie.com/dashboard/org_123456789/payments/tr_ncaPcAhuUV",
31
+ "type": "text/html"
32
+ },
33
+ "order": {
34
+ "href": "https://api.mollie.com/v2/orders/ord_kEn1PlbGa",
35
+ "type": "application/hal+json"
36
+ }
37
+ }
38
+ }
@@ -171,44 +171,6 @@
171
171
  }
172
172
  }
173
173
  ],
174
- "_embedded": {
175
- "payments": [
176
- {
177
- "resource": "payment",
178
- "id": "tr_ncaPcAhuUV",
179
- "mode": "live",
180
- "createdAt": "2018-09-07T12:00:05+00:00",
181
- "amount": {
182
- "value": "1027.99",
183
- "currency": "EUR"
184
- },
185
- "description": "Order #1337 (Lego cars)",
186
- "method": null,
187
- "metadata": null,
188
- "status": "open",
189
- "isCancelable": false,
190
- "locale": "nl_NL",
191
- "profileId": "pfl_URR55HPMGx",
192
- "orderId": "ord_kEn1PlbGa",
193
- "sequenceType": "oneoff",
194
- "redirectUrl": "https://example.org/redirect",
195
- "_links": {
196
- "self": {
197
- "href": "https://api.mollie.com/v2/payments/tr_ncaPcAhuUV",
198
- "type": "application/hal+json"
199
- },
200
- "checkout": {
201
- "href": "https://www.mollie.com/payscreen/select-method/ncaPcAhuUV",
202
- "type": "text/html"
203
- },
204
- "order": {
205
- "href": "https://api.mollie.com/v2/orders/ord_kEn1PlbGa",
206
- "type": "application/hal+json"
207
- }
208
- }
209
- }
210
- ]
211
- },
212
174
  "_links": {
213
175
  "self": {
214
176
  "href": "https://api.mollie.com/v2/orders/ord_kEn1PlbGa",