processout 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e8daa8d1cc656514933e0ec155f7122c3ebf83dc38d0822fe84b35f564d21b3
4
- data.tar.gz: e7368e3ca75fbb6fa7433b9be63eb17b08b4ea5a4ff6efa1ac24a9d0731b1900
3
+ metadata.gz: 75601257145ef1eb4375638b5ca39be8b73645409ab8a7cf25f1d8d6b65b58e1
4
+ data.tar.gz: e23c62e04974f47300b5904bf3e3eb5a4d331c236a8e14696baca24e6784ee75
5
5
  SHA512:
6
- metadata.gz: 2e480c86976daefe7ba9a42a43c3d370460b153ab9fd741060c2223cc33377cdb1b577fdaa91babc56eb5ac68ac2583196fbdc92712a267f0caaf87404c8fd76
7
- data.tar.gz: bef5723beeea07634c8bf20b83358e2c83688961d6446b63f27c9d8aeb3af7378127f907aff70f7f93ee29265169a24ed00d1501deaff628e9c2cbbe7fa42111
6
+ metadata.gz: a6d3bfc576fcbb6b4789d12a5be1e70e5d5f6b9878f29dd5a34e26a83e1c6312b1360846cfca14fc42630d847aa9d329744515201cdc03b1f80fea136737f724
7
+ data.tar.gz: f5d3980b0c3d7b859ece2d75f5c46af5a296582b08e38d81c53f36206a4251e76b6189e8f9869e46fba697c4694dc3d424b9b589b39f7f31978e5fbd813e2727
@@ -20,6 +20,7 @@ module ProcessOut
20
20
  attr_reader :token
21
21
  attr_reader :token_id
22
22
  attr_reader :details
23
+ attr_reader :submerchant
23
24
  attr_reader :url
24
25
  attr_reader :url_qrcode
25
26
  attr_reader :name
@@ -184,6 +185,22 @@ module ProcessOut
184
185
 
185
186
  end
186
187
 
188
+ def submerchant=(val)
189
+ if val.nil?
190
+ @submerchant = val
191
+ return
192
+ end
193
+
194
+ if val.instance_of? InvoiceSubmerchant
195
+ @submerchant = val
196
+ else
197
+ obj = InvoiceSubmerchant.new(@client)
198
+ obj.fill_with_data(val)
199
+ @submerchant = obj
200
+ end
201
+
202
+ end
203
+
187
204
  def url=(val)
188
205
  @url = val
189
206
  end
@@ -452,6 +469,7 @@ module ProcessOut
452
469
  self.token = data.fetch(:token, nil)
453
470
  self.token_id = data.fetch(:token_id, nil)
454
471
  self.details = data.fetch(:details, nil)
472
+ self.submerchant = data.fetch(:submerchant, nil)
455
473
  self.url = data.fetch(:url, nil)
456
474
  self.url_qrcode = data.fetch(:url_qrcode, nil)
457
475
  self.name = data.fetch(:name, nil)
@@ -513,6 +531,7 @@ module ProcessOut
513
531
  "token": self.token,
514
532
  "token_id": self.token_id,
515
533
  "details": self.details,
534
+ "submerchant": self.submerchant,
516
535
  "url": self.url,
517
536
  "url_qrcode": self.url_qrcode,
518
537
  "name": self.name,
@@ -597,6 +616,9 @@ module ProcessOut
597
616
  if data.include? "details"
598
617
  self.details = data["details"]
599
618
  end
619
+ if data.include? "submerchant"
620
+ self.submerchant = data["submerchant"]
621
+ end
600
622
  if data.include? "url"
601
623
  self.url = data["url"]
602
624
  end
@@ -734,6 +756,7 @@ module ProcessOut
734
756
  self.token = data.fetch(:token, self.token)
735
757
  self.token_id = data.fetch(:token_id, self.token_id)
736
758
  self.details = data.fetch(:details, self.details)
759
+ self.submerchant = data.fetch(:submerchant, self.submerchant)
737
760
  self.url = data.fetch(:url, self.url)
738
761
  self.url_qrcode = data.fetch(:url_qrcode, self.url_qrcode)
739
762
  self.name = data.fetch(:name, self.name)
@@ -1139,6 +1162,7 @@ module ProcessOut
1139
1162
  "currency" => @currency,
1140
1163
  "metadata" => @metadata,
1141
1164
  "details" => @details,
1165
+ "submerchant" => @submerchant,
1142
1166
  "exemption_reason_3ds2" => @exemption_reason_3ds2,
1143
1167
  "sca_exemption_reason" => @sca_exemption_reason,
1144
1168
  "challenge_indicator" => @challenge_indicator,
@@ -0,0 +1,182 @@
1
+ # The content of this file was automatically generated
2
+
3
+ require "cgi"
4
+ require "json"
5
+ require "processout/networking/request"
6
+ require "processout/networking/response"
7
+
8
+ module ProcessOut
9
+ class InvoiceSubmerchant
10
+
11
+ attr_reader :id
12
+ attr_reader :name
13
+ attr_reader :reference
14
+ attr_reader :mcc
15
+ attr_reader :phone_number
16
+ attr_reader :email
17
+ attr_reader :address
18
+ attr_reader :tax_reference
19
+ attr_reader :service_establishment_number
20
+
21
+
22
+ def id=(val)
23
+ @id = val
24
+ end
25
+
26
+ def name=(val)
27
+ @name = val
28
+ end
29
+
30
+ def reference=(val)
31
+ @reference = val
32
+ end
33
+
34
+ def mcc=(val)
35
+ @mcc = val
36
+ end
37
+
38
+ def phone_number=(val)
39
+ if val.nil?
40
+ @phone_number = val
41
+ return
42
+ end
43
+
44
+ if val.instance_of? SubmerchantPhoneNumber
45
+ @phone_number = val
46
+ else
47
+ obj = SubmerchantPhoneNumber.new(@client)
48
+ obj.fill_with_data(val)
49
+ @phone_number = obj
50
+ end
51
+
52
+ end
53
+
54
+ def email=(val)
55
+ @email = val
56
+ end
57
+
58
+ def address=(val)
59
+ if val.nil?
60
+ @address = val
61
+ return
62
+ end
63
+
64
+ if val.instance_of? SubmerchantAddress
65
+ @address = val
66
+ else
67
+ obj = SubmerchantAddress.new(@client)
68
+ obj.fill_with_data(val)
69
+ @address = obj
70
+ end
71
+
72
+ end
73
+
74
+ def tax_reference=(val)
75
+ @tax_reference = val
76
+ end
77
+
78
+ def service_establishment_number=(val)
79
+ @service_establishment_number = val
80
+ end
81
+
82
+
83
+ # Initializes the InvoiceSubmerchant object
84
+ # Params:
85
+ # +client+:: +ProcessOut+ client instance
86
+ # +data+:: data that can be used to fill the object
87
+ def initialize(client, data = {})
88
+ @client = client
89
+
90
+ self.id = data.fetch(:id, nil)
91
+ self.name = data.fetch(:name, nil)
92
+ self.reference = data.fetch(:reference, nil)
93
+ self.mcc = data.fetch(:mcc, nil)
94
+ self.phone_number = data.fetch(:phone_number, nil)
95
+ self.email = data.fetch(:email, nil)
96
+ self.address = data.fetch(:address, nil)
97
+ self.tax_reference = data.fetch(:tax_reference, nil)
98
+ self.service_establishment_number = data.fetch(:service_establishment_number, nil)
99
+
100
+ end
101
+
102
+ # Create a new InvoiceSubmerchant using the current client
103
+ def new(data = {})
104
+ InvoiceSubmerchant.new(@client, data)
105
+ end
106
+
107
+ # Overrides the JSON marshaller to only send the fields we want
108
+ def to_json(options)
109
+ {
110
+ "id": self.id,
111
+ "name": self.name,
112
+ "reference": self.reference,
113
+ "mcc": self.mcc,
114
+ "phone_number": self.phone_number,
115
+ "email": self.email,
116
+ "address": self.address,
117
+ "tax_reference": self.tax_reference,
118
+ "service_establishment_number": self.service_establishment_number,
119
+ }.to_json
120
+ end
121
+
122
+ # Fills the object with data coming from the API
123
+ # Params:
124
+ # +data+:: +Hash+ of data coming from the API
125
+ def fill_with_data(data)
126
+ if data.nil?
127
+ return self
128
+ end
129
+ if data.include? "id"
130
+ self.id = data["id"]
131
+ end
132
+ if data.include? "name"
133
+ self.name = data["name"]
134
+ end
135
+ if data.include? "reference"
136
+ self.reference = data["reference"]
137
+ end
138
+ if data.include? "mcc"
139
+ self.mcc = data["mcc"]
140
+ end
141
+ if data.include? "phone_number"
142
+ self.phone_number = data["phone_number"]
143
+ end
144
+ if data.include? "email"
145
+ self.email = data["email"]
146
+ end
147
+ if data.include? "address"
148
+ self.address = data["address"]
149
+ end
150
+ if data.include? "tax_reference"
151
+ self.tax_reference = data["tax_reference"]
152
+ end
153
+ if data.include? "service_establishment_number"
154
+ self.service_establishment_number = data["service_establishment_number"]
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Prefills the object with the data passed as parameters
161
+ # Params:
162
+ # +data+:: +Hash+ of data
163
+ def prefill(data)
164
+ if data.nil?
165
+ return self
166
+ end
167
+ self.id = data.fetch(:id, self.id)
168
+ self.name = data.fetch(:name, self.name)
169
+ self.reference = data.fetch(:reference, self.reference)
170
+ self.mcc = data.fetch(:mcc, self.mcc)
171
+ self.phone_number = data.fetch(:phone_number, self.phone_number)
172
+ self.email = data.fetch(:email, self.email)
173
+ self.address = data.fetch(:address, self.address)
174
+ self.tax_reference = data.fetch(:tax_reference, self.tax_reference)
175
+ self.service_establishment_number = data.fetch(:service_establishment_number, self.service_establishment_number)
176
+
177
+ self
178
+ end
179
+
180
+
181
+ end
182
+ end
@@ -13,7 +13,7 @@ module ProcessOut
13
13
  req.basic_auth @client.project_id, @client.project_secret
14
14
  req.content_type = "application/json"
15
15
  req["API-Version"] = "1.4.0.0"
16
- req["User-Agent"] = "ProcessOut Ruby-Bindings/3.2.0"
16
+ req["User-Agent"] = "ProcessOut Ruby-Bindings/3.3.0"
17
17
 
18
18
  unless options.nil?
19
19
  req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
@@ -0,0 +1,136 @@
1
+ # The content of this file was automatically generated
2
+
3
+ require "cgi"
4
+ require "json"
5
+ require "processout/networking/request"
6
+ require "processout/networking/response"
7
+
8
+ module ProcessOut
9
+ class SubmerchantAddress
10
+
11
+ attr_reader :line1
12
+ attr_reader :line2
13
+ attr_reader :city
14
+ attr_reader :state
15
+ attr_reader :country_code
16
+ attr_reader :zip
17
+ attr_reader :county
18
+
19
+
20
+ def line1=(val)
21
+ @line1 = val
22
+ end
23
+
24
+ def line2=(val)
25
+ @line2 = val
26
+ end
27
+
28
+ def city=(val)
29
+ @city = val
30
+ end
31
+
32
+ def state=(val)
33
+ @state = val
34
+ end
35
+
36
+ def country_code=(val)
37
+ @country_code = val
38
+ end
39
+
40
+ def zip=(val)
41
+ @zip = val
42
+ end
43
+
44
+ def county=(val)
45
+ @county = val
46
+ end
47
+
48
+
49
+ # Initializes the SubmerchantAddress object
50
+ # Params:
51
+ # +client+:: +ProcessOut+ client instance
52
+ # +data+:: data that can be used to fill the object
53
+ def initialize(client, data = {})
54
+ @client = client
55
+
56
+ self.line1 = data.fetch(:line1, nil)
57
+ self.line2 = data.fetch(:line2, nil)
58
+ self.city = data.fetch(:city, nil)
59
+ self.state = data.fetch(:state, nil)
60
+ self.country_code = data.fetch(:country_code, nil)
61
+ self.zip = data.fetch(:zip, nil)
62
+ self.county = data.fetch(:county, nil)
63
+
64
+ end
65
+
66
+ # Create a new SubmerchantAddress using the current client
67
+ def new(data = {})
68
+ SubmerchantAddress.new(@client, data)
69
+ end
70
+
71
+ # Overrides the JSON marshaller to only send the fields we want
72
+ def to_json(options)
73
+ {
74
+ "line1": self.line1,
75
+ "line2": self.line2,
76
+ "city": self.city,
77
+ "state": self.state,
78
+ "country_code": self.country_code,
79
+ "zip": self.zip,
80
+ "county": self.county,
81
+ }.to_json
82
+ end
83
+
84
+ # Fills the object with data coming from the API
85
+ # Params:
86
+ # +data+:: +Hash+ of data coming from the API
87
+ def fill_with_data(data)
88
+ if data.nil?
89
+ return self
90
+ end
91
+ if data.include? "line1"
92
+ self.line1 = data["line1"]
93
+ end
94
+ if data.include? "line2"
95
+ self.line2 = data["line2"]
96
+ end
97
+ if data.include? "city"
98
+ self.city = data["city"]
99
+ end
100
+ if data.include? "state"
101
+ self.state = data["state"]
102
+ end
103
+ if data.include? "country_code"
104
+ self.country_code = data["country_code"]
105
+ end
106
+ if data.include? "zip"
107
+ self.zip = data["zip"]
108
+ end
109
+ if data.include? "county"
110
+ self.county = data["county"]
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ # Prefills the object with the data passed as parameters
117
+ # Params:
118
+ # +data+:: +Hash+ of data
119
+ def prefill(data)
120
+ if data.nil?
121
+ return self
122
+ end
123
+ self.line1 = data.fetch(:line1, self.line1)
124
+ self.line2 = data.fetch(:line2, self.line2)
125
+ self.city = data.fetch(:city, self.city)
126
+ self.state = data.fetch(:state, self.state)
127
+ self.country_code = data.fetch(:country_code, self.country_code)
128
+ self.zip = data.fetch(:zip, self.zip)
129
+ self.county = data.fetch(:county, self.county)
130
+
131
+ self
132
+ end
133
+
134
+
135
+ end
136
+ end
@@ -0,0 +1,81 @@
1
+ # The content of this file was automatically generated
2
+
3
+ require "cgi"
4
+ require "json"
5
+ require "processout/networking/request"
6
+ require "processout/networking/response"
7
+
8
+ module ProcessOut
9
+ class SubmerchantPhoneNumber
10
+
11
+ attr_reader :dialing_code
12
+ attr_reader :number
13
+
14
+
15
+ def dialing_code=(val)
16
+ @dialing_code = val
17
+ end
18
+
19
+ def number=(val)
20
+ @number = val
21
+ end
22
+
23
+
24
+ # Initializes the SubmerchantPhoneNumber object
25
+ # Params:
26
+ # +client+:: +ProcessOut+ client instance
27
+ # +data+:: data that can be used to fill the object
28
+ def initialize(client, data = {})
29
+ @client = client
30
+
31
+ self.dialing_code = data.fetch(:dialing_code, nil)
32
+ self.number = data.fetch(:number, nil)
33
+
34
+ end
35
+
36
+ # Create a new SubmerchantPhoneNumber using the current client
37
+ def new(data = {})
38
+ SubmerchantPhoneNumber.new(@client, data)
39
+ end
40
+
41
+ # Overrides the JSON marshaller to only send the fields we want
42
+ def to_json(options)
43
+ {
44
+ "dialing_code": self.dialing_code,
45
+ "number": self.number,
46
+ }.to_json
47
+ end
48
+
49
+ # Fills the object with data coming from the API
50
+ # Params:
51
+ # +data+:: +Hash+ of data coming from the API
52
+ def fill_with_data(data)
53
+ if data.nil?
54
+ return self
55
+ end
56
+ if data.include? "dialing_code"
57
+ self.dialing_code = data["dialing_code"]
58
+ end
59
+ if data.include? "number"
60
+ self.number = data["number"]
61
+ end
62
+
63
+ self
64
+ end
65
+
66
+ # Prefills the object with the data passed as parameters
67
+ # Params:
68
+ # +data+:: +Hash+ of data
69
+ def prefill(data)
70
+ if data.nil?
71
+ return self
72
+ end
73
+ self.dialing_code = data.fetch(:dialing_code, self.dialing_code)
74
+ self.number = data.fetch(:number, self.number)
75
+
76
+ self
77
+ end
78
+
79
+
80
+ end
81
+ end
@@ -30,6 +30,7 @@ module ProcessOut
30
30
  attr_reader :manual_invoice_cancellation
31
31
  attr_reader :verification_status
32
32
  attr_reader :can_get_balance
33
+ attr_reader :webhook_url
33
34
 
34
35
 
35
36
  def id=(val)
@@ -168,6 +169,10 @@ module ProcessOut
168
169
  @can_get_balance = val
169
170
  end
170
171
 
172
+ def webhook_url=(val)
173
+ @webhook_url = val
174
+ end
175
+
171
176
 
172
177
  # Initializes the Token object
173
178
  # Params:
@@ -198,6 +203,7 @@ module ProcessOut
198
203
  self.manual_invoice_cancellation = data.fetch(:manual_invoice_cancellation, nil)
199
204
  self.verification_status = data.fetch(:verification_status, nil)
200
205
  self.can_get_balance = data.fetch(:can_get_balance, nil)
206
+ self.webhook_url = data.fetch(:webhook_url, nil)
201
207
 
202
208
  end
203
209
 
@@ -231,6 +237,7 @@ module ProcessOut
231
237
  "manual_invoice_cancellation": self.manual_invoice_cancellation,
232
238
  "verification_status": self.verification_status,
233
239
  "can_get_balance": self.can_get_balance,
240
+ "webhook_url": self.webhook_url,
234
241
  }.to_json
235
242
  end
236
243
 
@@ -307,6 +314,9 @@ module ProcessOut
307
314
  if data.include? "can_get_balance"
308
315
  self.can_get_balance = data["can_get_balance"]
309
316
  end
317
+ if data.include? "webhook_url"
318
+ self.webhook_url = data["webhook_url"]
319
+ end
310
320
 
311
321
  self
312
322
  end
@@ -340,6 +350,7 @@ module ProcessOut
340
350
  self.manual_invoice_cancellation = data.fetch(:manual_invoice_cancellation, self.manual_invoice_cancellation)
341
351
  self.verification_status = data.fetch(:verification_status, self.verification_status)
342
352
  self.can_get_balance = data.fetch(:can_get_balance, self.can_get_balance)
353
+ self.webhook_url = data.fetch(:webhook_url, self.webhook_url)
343
354
 
344
355
  self
345
356
  end
@@ -419,6 +430,7 @@ module ProcessOut
419
430
  "description" => @description,
420
431
  "invoice_id" => @invoice_id,
421
432
  "manual_invoice_cancellation" => @manual_invoice_cancellation,
433
+ "webhook_url" => @webhook_url,
422
434
  "source" => options.fetch(:source, nil),
423
435
  "settings" => options.fetch(:settings, nil),
424
436
  "device" => options.fetch(:device, nil),
@@ -1,3 +1,3 @@
1
1
  module ProcessOut
2
- VERSION = "3.2.0"
2
+ VERSION = "3.3.0"
3
3
  end
data/lib/processout.rb CHANGED
@@ -38,6 +38,9 @@ require "processout/invoice_shipping_phone"
38
38
  require "processout/invoice_billing"
39
39
  require "processout/unsupported_feature_bypass"
40
40
  require "processout/invoice_detail"
41
+ require "processout/invoice_submerchant"
42
+ require "processout/submerchant_phone_number"
43
+ require "processout/submerchant_address"
41
44
  require "processout/customer_action"
42
45
  require "processout/dunning_action"
43
46
  require "processout/payout"
@@ -274,6 +277,21 @@ module ProcessOut
274
277
  obj = InvoiceDetail.new(self, data)
275
278
  end
276
279
 
280
+ # Create a new InvoiceSubmerchant instance
281
+ def invoice_submerchant(data = {})
282
+ obj = InvoiceSubmerchant.new(self, data)
283
+ end
284
+
285
+ # Create a new SubmerchantPhoneNumber instance
286
+ def submerchant_phone_number(data = {})
287
+ obj = SubmerchantPhoneNumber.new(self, data)
288
+ end
289
+
290
+ # Create a new SubmerchantAddress instance
291
+ def submerchant_address(data = {})
292
+ obj = SubmerchantAddress.new(self, data)
293
+ end
294
+
277
295
  # Create a new CustomerAction instance
278
296
  def customer_action(data = {})
279
297
  obj = CustomerAction.new(self, data)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: processout
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel HUEZ
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-17 00:00:00.000000000 Z
11
+ date: 2025-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,6 +122,7 @@ files:
122
122
  - lib/processout/invoice_risk.rb
123
123
  - lib/processout/invoice_shipping.rb
124
124
  - lib/processout/invoice_shipping_phone.rb
125
+ - lib/processout/invoice_submerchant.rb
125
126
  - lib/processout/invoice_tax.rb
126
127
  - lib/processout/native_apm_parameter_definition.rb
127
128
  - lib/processout/native_apm_parameter_value.rb
@@ -146,6 +147,8 @@ files:
146
147
  - lib/processout/project_sftp_settings.rb
147
148
  - lib/processout/project_sftp_settings_public.rb
148
149
  - lib/processout/refund.rb
150
+ - lib/processout/submerchant_address.rb
151
+ - lib/processout/submerchant_phone_number.rb
149
152
  - lib/processout/subscription.rb
150
153
  - lib/processout/three_ds.rb
151
154
  - lib/processout/token.rb
@@ -175,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
178
  - !ruby/object:Gem::Version
176
179
  version: '0'
177
180
  requirements: []
178
- rubygems_version: 3.4.20
181
+ rubygems_version: 3.0.3.1
179
182
  signing_key:
180
183
  specification_version: 4
181
184
  summary: Ruby bindings for the ProcessOut API