gocardless_pro 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gocardless_pro/resources/creditor.rb +5 -3
  3. data/lib/gocardless_pro/resources/creditor_bank_account.rb +1 -1
  4. data/lib/gocardless_pro/resources/customer.rb +8 -0
  5. data/lib/gocardless_pro/resources/customer_bank_account.rb +1 -1
  6. data/lib/gocardless_pro/resources/event.rb +4 -2
  7. data/lib/gocardless_pro/resources/mandate.rb +1 -1
  8. data/lib/gocardless_pro/resources/payment.rb +1 -1
  9. data/lib/gocardless_pro/resources/payout.rb +1 -1
  10. data/lib/gocardless_pro/resources/redirect_flow.rb +1 -1
  11. data/lib/gocardless_pro/resources/refund.rb +4 -1
  12. data/lib/gocardless_pro/resources/subscription.rb +1 -1
  13. data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +4 -4
  14. data/lib/gocardless_pro/services/payments_service.rb +3 -3
  15. data/lib/gocardless_pro/version.rb +1 -1
  16. data/spec/resources/bank_details_lookup_spec.rb +0 -1
  17. data/spec/resources/creditor_bank_account_spec.rb +5 -1
  18. data/spec/resources/creditor_spec.rb +9 -1
  19. data/spec/resources/customer_bank_account_spec.rb +5 -1
  20. data/spec/resources/customer_spec.rb +8 -1
  21. data/spec/resources/event_spec.rb +9 -1
  22. data/spec/resources/mandate_pdf_spec.rb +0 -1
  23. data/spec/resources/mandate_spec.rb +5 -1
  24. data/spec/resources/payment_spec.rb +5 -1
  25. data/spec/resources/payout_spec.rb +5 -1
  26. data/spec/resources/redirect_flow_spec.rb +5 -1
  27. data/spec/resources/refund_spec.rb +13 -1
  28. data/spec/resources/subscription_spec.rb +5 -1
  29. data/spec/services/customers_service_spec.rb +13 -0
  30. data/spec/services/refunds_service_spec.rb +13 -0
  31. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5ca1431d78a49ff26580c465b4c27535e05e6f6
4
- data.tar.gz: 30a188b5a480cfb0c1f279460bfd30ee0a89d575
3
+ metadata.gz: 692eca4366bdf3a3a890788b76f755784d369047
4
+ data.tar.gz: 810cdf0fa7569856376b29afbc1df49327ae0842
5
5
  SHA512:
6
- metadata.gz: 9b34fdd08aa1052d048fe9e64a424b74d5562aeccd151fb5669b3fd3982d699ba5f9d921e39f0add6efc08006da072ead01d6f1f6272a58ac04e07a315fb94f7
7
- data.tar.gz: 79d98680c2cfd629c2dff5408107257ac593eda10e2d0f2aa5de0e7b8da8390b3765113d66cb1343fbd6cd7db1e66da7d3b4d09ff81f78a75e0c2390f8c9572f
6
+ metadata.gz: b095b6ab731eb0335966c3adfb0707b4e694ea0b2e2383d8bef7656efe68bd5bb03079ccc137d05027108e2079fb21242df45c1956757ac8adb11bb0b96f2904
7
+ data.tar.gz: b94783f280f48c02f83041fef6271f710b224a53ae52af84f8e228f594ea71611b010f123adf33cf1ba4a08179ba7b19b1c300f0381faf1db6c66558df53c760
@@ -65,15 +65,17 @@ module GoCardlessPro
65
65
 
66
66
  # return the links that the resource has
67
67
  def links
68
- valid_link_keys = %w(default_eur_payout_account default_gbp_payout_account )
69
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
68
+ valid_link_keys = %w(default_eur_payout_account default_gbp_payout_account default_sek_payout_account )
69
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
70
70
 
71
71
  links_class = Struct.new(
72
72
  *{
73
73
 
74
74
  default_eur_payout_account: '',
75
75
 
76
- default_gbp_payout_account: ''
76
+ default_gbp_payout_account: '',
77
+
78
+ default_sek_payout_account: ''
77
79
 
78
80
  }.keys
79
81
  ) do
@@ -65,7 +65,7 @@ module GoCardlessPro
65
65
  # return the links that the resource has
66
66
  def links
67
67
  valid_link_keys = %w(creditor )
68
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
68
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
69
69
 
70
70
  links_class = Struct.new(
71
71
  *{
@@ -15,6 +15,11 @@ module GoCardlessPro
15
15
  # have several [customer bank
16
16
  # accounts](#core-endpoints-customer-bank-accounts), which in turn can have
17
17
  # several Direct Debit [mandates](#core-endpoints-mandates).
18
+ #
19
+ # Note:
20
+ # the `swedish_identity_number` field may only be supplied for Swedish
21
+ # customers, and must be supplied if you intend to set up an Autogiro mandate
22
+ # with the customer.
18
23
  # Represents an instance of a customer resource returned from the API
19
24
  class Customer
20
25
  attr_reader :address_line1
@@ -46,6 +51,8 @@ module GoCardlessPro
46
51
  attr_reader :postal_code
47
52
 
48
53
  attr_reader :region
54
+
55
+ attr_reader :swedish_identity_number
49
56
  # initialize a resource instance
50
57
  # @param object [Hash] an object returned from the API
51
58
  def initialize(object, response = nil)
@@ -66,6 +73,7 @@ module GoCardlessPro
66
73
  @metadata = object['metadata']
67
74
  @postal_code = object['postal_code']
68
75
  @region = object['region']
76
+ @swedish_identity_number = object['swedish_identity_number']
69
77
  @response = response
70
78
  end
71
79
 
@@ -65,7 +65,7 @@ module GoCardlessPro
65
65
  # return the links that the resource has
66
66
  def links
67
67
  valid_link_keys = %w(customer )
68
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
68
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
69
69
 
70
70
  links_class = Struct.new(
71
71
  *{
@@ -48,8 +48,8 @@ module GoCardlessPro
48
48
 
49
49
  # return the links that the resource has
50
50
  def links
51
- valid_link_keys = %w(mandate new_customer_bank_account parent_event payment payout previous_customer_bank_account refund subscription )
52
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
51
+ valid_link_keys = %w(mandate new_customer_bank_account organisation parent_event payment payout previous_customer_bank_account refund subscription )
52
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
53
53
 
54
54
  links_class = Struct.new(
55
55
  *{
@@ -58,6 +58,8 @@ module GoCardlessPro
58
58
 
59
59
  new_customer_bank_account: '',
60
60
 
61
+ organisation: '',
62
+
61
63
  parent_event: '',
62
64
 
63
65
  payment: '',
@@ -54,7 +54,7 @@ module GoCardlessPro
54
54
  # return the links that the resource has
55
55
  def links
56
56
  valid_link_keys = %w(creditor customer_bank_account )
57
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
57
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
58
58
 
59
59
  links_class = Struct.new(
60
60
  *{
@@ -65,7 +65,7 @@ module GoCardlessPro
65
65
  # return the links that the resource has
66
66
  def links
67
67
  valid_link_keys = %w(creditor mandate payout subscription )
68
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
68
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
69
69
 
70
70
  links_class = Struct.new(
71
71
  *{
@@ -51,7 +51,7 @@ module GoCardlessPro
51
51
  # return the links that the resource has
52
52
  def links
53
53
  valid_link_keys = %w(creditor creditor_bank_account )
54
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
54
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
55
55
 
56
56
  links_class = Struct.new(
57
57
  *{
@@ -81,7 +81,7 @@ module GoCardlessPro
81
81
  # return the links that the resource has
82
82
  def links
83
83
  valid_link_keys = %w(creditor customer customer_bank_account mandate )
84
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
84
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
85
85
 
86
86
  links_class = Struct.new(
87
87
  *{
@@ -33,6 +33,8 @@ module GoCardlessPro
33
33
  attr_reader :id
34
34
 
35
35
  attr_reader :metadata
36
+
37
+ attr_reader :reference
36
38
  # initialize a resource instance
37
39
  # @param object [Hash] an object returned from the API
38
40
  def initialize(object, response = nil)
@@ -44,6 +46,7 @@ module GoCardlessPro
44
46
  @id = object['id']
45
47
  @links = object['links']
46
48
  @metadata = object['metadata']
49
+ @reference = object['reference']
47
50
  @response = response
48
51
  end
49
52
 
@@ -54,7 +57,7 @@ module GoCardlessPro
54
57
  # return the links that the resource has
55
58
  def links
56
59
  valid_link_keys = %w(payment )
57
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
60
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
58
61
 
59
62
  links_class = Struct.new(
60
63
  *{
@@ -142,7 +142,7 @@ module GoCardlessPro
142
142
  # return the links that the resource has
143
143
  def links
144
144
  valid_link_keys = %w(mandate )
145
- valid_links = @links.select { |key, _| valid_link_keys.include?(key) }
145
+ valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) }
146
146
 
147
147
  links_class = Struct.new(
148
148
  *{
@@ -16,16 +16,16 @@ module GoCardlessPro
16
16
  # ways to supply bank account details:
17
17
  #
18
18
  # - [Local
19
- # details](#ui-local-bank-details)
19
+ # details](#appendix-local-bank-details)
20
20
  #
21
21
  # - IBAN
22
22
  #
23
- # - [Customer Bank Account
24
- # Tokens](#js-flow-create-a-customer-bank-account-token)
23
+ # - [Customer Bank
24
+ # Account Tokens](#js-flow-create-a-customer-bank-account-token)
25
25
  #
26
26
  # For more
27
27
  # information on the different fields required in each country, see [local bank
28
- # details](#ui-local-bank-details).
28
+ # details](#appendix-local-bank-details).
29
29
  # Example URL: /customer_bank_accounts
30
30
  # @param options [Hash] parameters as a hash, under a params key.
31
31
  def create(options = {})
@@ -14,9 +14,9 @@ module GoCardlessPro
14
14
  #
15
15
  # This
16
16
  # fails with a `mandate_is_inactive` error if the linked
17
- # [mandate](#core-endpoints-mandates) is cancelled. Payments can be created
18
- # against `pending_submission` mandates, but they will not be submitted until
19
- # the mandate becomes active.
17
+ # [mandate](#core-endpoints-mandates) is cancelled or has failed. Payments can
18
+ # be created against `pending_submission` and `submitted` as well as `active`
19
+ # mandates.
20
20
  # Example URL: /payments
21
21
  # @param options [Hash] parameters as a hash, under a params key.
22
22
  def create(options = {})
@@ -4,5 +4,5 @@ end
4
4
 
5
5
  module GoCardlessPro
6
6
  # Current version of the GC gem
7
- VERSION = '1.0.2'
7
+ VERSION = '1.0.3'
8
8
  end
@@ -51,4 +51,3 @@ describe GoCardlessPro::Resources::BankDetailsLookup do
51
51
  end
52
52
  end
53
53
  end
54
-
@@ -109,6 +109,11 @@ describe GoCardlessPro::Resources::CreditorBankAccount do
109
109
  data["links"]["foo"] = "bar"
110
110
  expect { described_class.new(data) }.to_not raise_error
111
111
  end
112
+
113
+ it "can handle a nil links value" do
114
+ data["links"] = nil
115
+ expect { described_class.new(data).links }.to_not raise_error
116
+ end
112
117
 
113
118
 
114
119
  describe "#to_h" do
@@ -118,4 +123,3 @@ describe GoCardlessPro::Resources::CreditorBankAccount do
118
123
  end
119
124
  end
120
125
  end
121
-
@@ -40,6 +40,8 @@ describe GoCardlessPro::Resources::Creditor do
40
40
 
41
41
  "default_gbp_payout_account" => "default_gbp_payout_account-input",
42
42
 
43
+ "default_sek_payout_account" => "default_sek_payout_account-input",
44
+
43
45
  },
44
46
 
45
47
 
@@ -95,6 +97,8 @@ describe GoCardlessPro::Resources::Creditor do
95
97
 
96
98
  expect(resource.links.default_gbp_payout_account).to eq("default_gbp_payout_account-input")
97
99
 
100
+ expect(resource.links.default_sek_payout_account).to eq("default_sek_payout_account-input")
101
+
98
102
 
99
103
 
100
104
 
@@ -121,6 +125,11 @@ describe GoCardlessPro::Resources::Creditor do
121
125
  data["links"]["foo"] = "bar"
122
126
  expect { described_class.new(data) }.to_not raise_error
123
127
  end
128
+
129
+ it "can handle a nil links value" do
130
+ data["links"] = nil
131
+ expect { described_class.new(data).links }.to_not raise_error
132
+ end
124
133
 
125
134
 
126
135
  describe "#to_h" do
@@ -130,4 +139,3 @@ describe GoCardlessPro::Resources::Creditor do
130
139
  end
131
140
  end
132
141
  end
133
-
@@ -109,6 +109,11 @@ describe GoCardlessPro::Resources::CustomerBankAccount do
109
109
  data["links"]["foo"] = "bar"
110
110
  expect { described_class.new(data) }.to_not raise_error
111
111
  end
112
+
113
+ it "can handle a nil links value" do
114
+ data["links"] = nil
115
+ expect { described_class.new(data).links }.to_not raise_error
116
+ end
112
117
 
113
118
 
114
119
  describe "#to_h" do
@@ -118,4 +123,3 @@ describe GoCardlessPro::Resources::CustomerBankAccount do
118
123
  end
119
124
  end
120
125
  end
121
-
@@ -65,6 +65,10 @@ describe GoCardlessPro::Resources::Customer do
65
65
  "region" => "region-input",
66
66
 
67
67
 
68
+
69
+ "swedish_identity_number" => "swedish_identity_number-input",
70
+
71
+
68
72
  }
69
73
  end
70
74
 
@@ -131,6 +135,10 @@ describe GoCardlessPro::Resources::Customer do
131
135
  expect(resource.region).to eq("region-input")
132
136
 
133
137
 
138
+
139
+ expect(resource.swedish_identity_number).to eq("swedish_identity_number-input")
140
+
141
+
134
142
  end
135
143
 
136
144
  it "can handle new attributes without erroring" do
@@ -147,4 +155,3 @@ describe GoCardlessPro::Resources::Customer do
147
155
  end
148
156
  end
149
157
  end
150
-
@@ -28,6 +28,8 @@ describe GoCardlessPro::Resources::Event do
28
28
 
29
29
  "new_customer_bank_account" => "new_customer_bank_account-input",
30
30
 
31
+ "organisation" => "organisation-input",
32
+
31
33
  "parent_event" => "parent_event-input",
32
34
 
33
35
  "payment" => "payment-input",
@@ -79,6 +81,8 @@ describe GoCardlessPro::Resources::Event do
79
81
 
80
82
  expect(resource.links.new_customer_bank_account).to eq("new_customer_bank_account-input")
81
83
 
84
+ expect(resource.links.organisation).to eq("organisation-input")
85
+
82
86
  expect(resource.links.parent_event).to eq("parent_event-input")
83
87
 
84
88
  expect(resource.links.payment).to eq("payment-input")
@@ -113,6 +117,11 @@ describe GoCardlessPro::Resources::Event do
113
117
  data["links"]["foo"] = "bar"
114
118
  expect { described_class.new(data) }.to_not raise_error
115
119
  end
120
+
121
+ it "can handle a nil links value" do
122
+ data["links"] = nil
123
+ expect { described_class.new(data).links }.to_not raise_error
124
+ end
116
125
 
117
126
 
118
127
  describe "#to_h" do
@@ -122,4 +131,3 @@ describe GoCardlessPro::Resources::Event do
122
131
  end
123
132
  end
124
133
  end
125
-
@@ -43,4 +43,3 @@ describe GoCardlessPro::Resources::MandatePdf do
43
43
  end
44
44
  end
45
45
  end
46
-
@@ -97,6 +97,11 @@ describe GoCardlessPro::Resources::Mandate do
97
97
  data["links"]["foo"] = "bar"
98
98
  expect { described_class.new(data) }.to_not raise_error
99
99
  end
100
+
101
+ it "can handle a nil links value" do
102
+ data["links"] = nil
103
+ expect { described_class.new(data).links }.to_not raise_error
104
+ end
100
105
 
101
106
 
102
107
  describe "#to_h" do
@@ -106,4 +111,3 @@ describe GoCardlessPro::Resources::Mandate do
106
111
  end
107
112
  end
108
113
  end
109
-
@@ -129,6 +129,11 @@ describe GoCardlessPro::Resources::Payment do
129
129
  data["links"]["foo"] = "bar"
130
130
  expect { described_class.new(data) }.to_not raise_error
131
131
  end
132
+
133
+ it "can handle a nil links value" do
134
+ data["links"] = nil
135
+ expect { described_class.new(data).links }.to_not raise_error
136
+ end
132
137
 
133
138
 
134
139
  describe "#to_h" do
@@ -138,4 +143,3 @@ describe GoCardlessPro::Resources::Payment do
138
143
  end
139
144
  end
140
145
  end
141
-
@@ -89,6 +89,11 @@ describe GoCardlessPro::Resources::Payout do
89
89
  data["links"]["foo"] = "bar"
90
90
  expect { described_class.new(data) }.to_not raise_error
91
91
  end
92
+
93
+ it "can handle a nil links value" do
94
+ data["links"] = nil
95
+ expect { described_class.new(data).links }.to_not raise_error
96
+ end
92
97
 
93
98
 
94
99
  describe "#to_h" do
@@ -98,4 +103,3 @@ describe GoCardlessPro::Resources::Payout do
98
103
  end
99
104
  end
100
105
  end
101
-
@@ -105,6 +105,11 @@ describe GoCardlessPro::Resources::RedirectFlow do
105
105
  data["links"]["foo"] = "bar"
106
106
  expect { described_class.new(data) }.to_not raise_error
107
107
  end
108
+
109
+ it "can handle a nil links value" do
110
+ data["links"] = nil
111
+ expect { described_class.new(data).links }.to_not raise_error
112
+ end
108
113
 
109
114
 
110
115
  describe "#to_h" do
@@ -114,4 +119,3 @@ describe GoCardlessPro::Resources::RedirectFlow do
114
119
  end
115
120
  end
116
121
  end
117
-
@@ -33,6 +33,10 @@ describe GoCardlessPro::Resources::Refund do
33
33
  "metadata" => "metadata-input",
34
34
 
35
35
 
36
+
37
+ "reference" => "reference-input",
38
+
39
+
36
40
  }
37
41
  end
38
42
 
@@ -65,6 +69,10 @@ describe GoCardlessPro::Resources::Refund do
65
69
  expect(resource.metadata).to eq("metadata-input")
66
70
 
67
71
 
72
+
73
+ expect(resource.reference).to eq("reference-input")
74
+
75
+
68
76
  end
69
77
 
70
78
  it "can handle new attributes without erroring" do
@@ -77,6 +85,11 @@ describe GoCardlessPro::Resources::Refund do
77
85
  data["links"]["foo"] = "bar"
78
86
  expect { described_class.new(data) }.to_not raise_error
79
87
  end
88
+
89
+ it "can handle a nil links value" do
90
+ data["links"] = nil
91
+ expect { described_class.new(data).links }.to_not raise_error
92
+ end
80
93
 
81
94
 
82
95
  describe "#to_h" do
@@ -86,4 +99,3 @@ describe GoCardlessPro::Resources::Refund do
86
99
  end
87
100
  end
88
101
  end
89
-
@@ -165,6 +165,11 @@ describe GoCardlessPro::Resources::Subscription do
165
165
  data["links"]["foo"] = "bar"
166
166
  expect { described_class.new(data) }.to_not raise_error
167
167
  end
168
+
169
+ it "can handle a nil links value" do
170
+ data["links"] = nil
171
+ expect { described_class.new(data).links }.to_not raise_error
172
+ end
168
173
 
169
174
 
170
175
  describe "#to_h" do
@@ -174,4 +179,3 @@ describe GoCardlessPro::Resources::Subscription do
174
179
  end
175
180
  end
176
181
  end
177
-
@@ -34,6 +34,7 @@ describe GoCardlessPro::Services::CustomersService do
34
34
  "metadata" => "metadata-input",
35
35
  "postal_code" => "postal_code-input",
36
36
  "region" => "region-input",
37
+ "swedish_identity_number" => "swedish_identity_number-input",
37
38
  }
38
39
  end
39
40
 
@@ -58,6 +59,7 @@ describe GoCardlessPro::Services::CustomersService do
58
59
  "metadata" => "metadata-input",
59
60
  "postal_code" => "postal_code-input",
60
61
  "region" => "region-input",
62
+ "swedish_identity_number" => "swedish_identity_number-input",
61
63
  }
62
64
  }
63
65
  ).
@@ -80,6 +82,7 @@ describe GoCardlessPro::Services::CustomersService do
80
82
  "metadata" => "metadata-input",
81
83
  "postal_code" => "postal_code-input",
82
84
  "region" => "region-input",
85
+ "swedish_identity_number" => "swedish_identity_number-input",
83
86
  }
84
87
  }.to_json,
85
88
  :headers => {'Content-Type' => 'application/json'}
@@ -144,6 +147,7 @@ describe GoCardlessPro::Services::CustomersService do
144
147
  "metadata" => "metadata-input",
145
148
  "postal_code" => "postal_code-input",
146
149
  "region" => "region-input",
150
+ "swedish_identity_number" => "swedish_identity_number-input",
147
151
  }],
148
152
  meta: {
149
153
  cursors: {
@@ -220,6 +224,10 @@ describe GoCardlessPro::Services::CustomersService do
220
224
  expect(get_list_response.records.first.region).to eq("region-input")
221
225
 
222
226
 
227
+
228
+ expect(get_list_response.records.first.swedish_identity_number).to eq("swedish_identity_number-input")
229
+
230
+
223
231
  end
224
232
 
225
233
  it "exposes the cursors for before and after" do
@@ -252,6 +260,7 @@ describe GoCardlessPro::Services::CustomersService do
252
260
  "metadata" => "metadata-input",
253
261
  "postal_code" => "postal_code-input",
254
262
  "region" => "region-input",
263
+ "swedish_identity_number" => "swedish_identity_number-input",
255
264
  }],
256
265
  meta: {
257
266
  cursors: { after: 'AB345' },
@@ -282,6 +291,7 @@ describe GoCardlessPro::Services::CustomersService do
282
291
  "metadata" => "metadata-input",
283
292
  "postal_code" => "postal_code-input",
284
293
  "region" => "region-input",
294
+ "swedish_identity_number" => "swedish_identity_number-input",
285
295
  }],
286
296
  meta: {
287
297
  limit: 2,
@@ -333,6 +343,7 @@ describe GoCardlessPro::Services::CustomersService do
333
343
  "metadata" => "metadata-input",
334
344
  "postal_code" => "postal_code-input",
335
345
  "region" => "region-input",
346
+ "swedish_identity_number" => "swedish_identity_number-input",
336
347
  }
337
348
  }.to_json,
338
349
  :headers => {'Content-Type' => 'application/json'}
@@ -373,6 +384,7 @@ describe GoCardlessPro::Services::CustomersService do
373
384
  "metadata" => "metadata-input",
374
385
  "postal_code" => "postal_code-input",
375
386
  "region" => "region-input",
387
+ "swedish_identity_number" => "swedish_identity_number-input",
376
388
  }
377
389
  }.to_json,
378
390
  :headers => {'Content-Type' => 'application/json'}
@@ -432,6 +444,7 @@ describe GoCardlessPro::Services::CustomersService do
432
444
  "metadata" => "metadata-input",
433
445
  "postal_code" => "postal_code-input",
434
446
  "region" => "region-input",
447
+ "swedish_identity_number" => "swedish_identity_number-input",
435
448
  }
436
449
  }.to_json,
437
450
  :headers => {'Content-Type' => 'application/json'}
@@ -25,6 +25,7 @@ describe GoCardlessPro::Services::RefundsService do
25
25
  "id" => "id-input",
26
26
  "links" => "links-input",
27
27
  "metadata" => "metadata-input",
28
+ "reference" => "reference-input",
28
29
  }
29
30
  end
30
31
 
@@ -40,6 +41,7 @@ describe GoCardlessPro::Services::RefundsService do
40
41
  "id" => "id-input",
41
42
  "links" => "links-input",
42
43
  "metadata" => "metadata-input",
44
+ "reference" => "reference-input",
43
45
  }
44
46
  }
45
47
  ).
@@ -53,6 +55,7 @@ describe GoCardlessPro::Services::RefundsService do
53
55
  "id" => "id-input",
54
56
  "links" => "links-input",
55
57
  "metadata" => "metadata-input",
58
+ "reference" => "reference-input",
56
59
  }
57
60
  }.to_json,
58
61
  :headers => {'Content-Type' => 'application/json'}
@@ -108,6 +111,7 @@ describe GoCardlessPro::Services::RefundsService do
108
111
  "id" => "id-input",
109
112
  "links" => "links-input",
110
113
  "metadata" => "metadata-input",
114
+ "reference" => "reference-input",
111
115
  }],
112
116
  meta: {
113
117
  cursors: {
@@ -146,6 +150,10 @@ describe GoCardlessPro::Services::RefundsService do
146
150
  expect(get_list_response.records.first.metadata).to eq("metadata-input")
147
151
 
148
152
 
153
+
154
+ expect(get_list_response.records.first.reference).to eq("reference-input")
155
+
156
+
149
157
  end
150
158
 
151
159
  it "exposes the cursors for before and after" do
@@ -169,6 +177,7 @@ describe GoCardlessPro::Services::RefundsService do
169
177
  "id" => "id-input",
170
178
  "links" => "links-input",
171
179
  "metadata" => "metadata-input",
180
+ "reference" => "reference-input",
172
181
  }],
173
182
  meta: {
174
183
  cursors: { after: 'AB345' },
@@ -190,6 +199,7 @@ describe GoCardlessPro::Services::RefundsService do
190
199
  "id" => "id-input",
191
200
  "links" => "links-input",
192
201
  "metadata" => "metadata-input",
202
+ "reference" => "reference-input",
193
203
  }],
194
204
  meta: {
195
205
  limit: 2,
@@ -232,6 +242,7 @@ describe GoCardlessPro::Services::RefundsService do
232
242
  "id" => "id-input",
233
243
  "links" => "links-input",
234
244
  "metadata" => "metadata-input",
245
+ "reference" => "reference-input",
235
246
  }
236
247
  }.to_json,
237
248
  :headers => {'Content-Type' => 'application/json'}
@@ -263,6 +274,7 @@ describe GoCardlessPro::Services::RefundsService do
263
274
  "id" => "id-input",
264
275
  "links" => "links-input",
265
276
  "metadata" => "metadata-input",
277
+ "reference" => "reference-input",
266
278
  }
267
279
  }.to_json,
268
280
  :headers => {'Content-Type' => 'application/json'}
@@ -313,6 +325,7 @@ describe GoCardlessPro::Services::RefundsService do
313
325
  "id" => "id-input",
314
326
  "links" => "links-input",
315
327
  "metadata" => "metadata-input",
328
+ "reference" => "reference-input",
316
329
  }
317
330
  }.to_json,
318
331
  :headers => {'Content-Type' => 'application/json'}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gocardless_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  requirements: []
196
196
  rubyforge_project:
197
- rubygems_version: 2.4.6
197
+ rubygems_version: 2.4.8
198
198
  signing_key:
199
199
  specification_version: 4
200
200
  summary: A gem for calling the GoCardless Pro API
@@ -231,4 +231,3 @@ test_files:
231
231
  - spec/services/refunds_service_spec.rb
232
232
  - spec/services/subscriptions_service_spec.rb
233
233
  - spec/spec_helper.rb
234
- has_rdoc: