processout 2.24.0 → 2.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d280911eda6faab611f67131bfcb86fa143214033cb29b86e20ea03afc4324b
4
- data.tar.gz: c7e980553c880a3f46970cf860e7476754791e8fd504d3f5566dcfef31816922
3
+ metadata.gz: 83ace6e67375ae6b46a5a1fd0dfc2af3b001f863a0d9a44b8da60f1359fbeb02
4
+ data.tar.gz: cbade71729992e6d8ae231f79b8f5e4f7695fdc1f89dc27744f8abe85a039112
5
5
  SHA512:
6
- metadata.gz: 76fe38fb62279b51207413862efb607f718c4ccf48302ba5a5d0b2c120438669bfb80bfb02f81e8dff58a91765e7f0af3dff1b8af37ca71797c7fd810fcf1170
7
- data.tar.gz: 0373ddbffac8ed98de2b084343a1ba96d94a7fd1f48c19062a6fc1d7c4edecc61a3819f728d7e8917452a3122ba05c4c9306ce78833022d15b39e326b5172c9a
6
+ metadata.gz: 382b4725123ee5fa694c5858c8423f6d9e704d6d82450b729803cdd27aab01b810402c6c84ef52b3215a7b2c31361d11fab4ffc2dda99c76d33d11aa1962819d
7
+ data.tar.gz: 5a71c2bb4871d97efacfe4816b8e7e850b9ff20f9346bd7d7261fc364ba1a2f1eb4bbdee396b111ba4d5c7cfae43a6dd104fe99bbc01432dd43b2fdbcc7ae566
@@ -0,0 +1,2 @@
1
+ # Backend Developers will be notified of PRs and will be required to Review changes.
2
+ * @processout/api
data/.github/stale.yml ADDED
@@ -0,0 +1,17 @@
1
+ # Number of days of inactivity before an issue becomes stale
2
+ daysUntilStale: 30
3
+ # Number of days of inactivity before a stale issue is closed
4
+ daysUntilClose: 7
5
+ # Issues with these labels will never be considered stale
6
+ exemptLabels:
7
+ - pinned
8
+ - security
9
+ # Label to use when marking an issue as stale
10
+ staleLabel: stale
11
+ # Comment to post when marking an issue as stale. Set to `false` to disable
12
+ markComment: >
13
+ This issue has been automatically marked as stale because it has not had
14
+ recent activity. It will be closed if no further activity occurs. Thank you
15
+ for your contributions.
16
+ # Comment to post when closing a stale issue. Set to `false` to disable
17
+ closeComment: false
@@ -0,0 +1,19 @@
1
+ name: "CI"
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ semrel:
10
+ name: Generate Release
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: go-semantic-release/action@v1
16
+ id: semrel
17
+ with:
18
+ github-token: ${{ secrets.GITHUB_TOKEN }}
19
+ force-bump-patch-version: true
@@ -35,6 +35,8 @@ module ProcessOut
35
35
  attr_reader :ip_address
36
36
  attr_reader :fingerprint
37
37
  attr_reader :token_type
38
+ attr_reader :used
39
+ attr_reader :has_been_authorized
38
40
  attr_reader :metadata
39
41
  attr_reader :expires_soon
40
42
  attr_reader :sandbox
@@ -173,6 +175,14 @@ module ProcessOut
173
175
  @token_type = val
174
176
  end
175
177
 
178
+ def used=(val)
179
+ @used = val
180
+ end
181
+
182
+ def has_been_authorized=(val)
183
+ @has_been_authorized = val
184
+ end
185
+
176
186
  def metadata=(val)
177
187
  @metadata = val
178
188
  end
@@ -224,6 +234,8 @@ module ProcessOut
224
234
  self.ip_address = data.fetch(:ip_address, nil)
225
235
  self.fingerprint = data.fetch(:fingerprint, nil)
226
236
  self.token_type = data.fetch(:token_type, nil)
237
+ self.used = data.fetch(:used, nil)
238
+ self.has_been_authorized = data.fetch(:has_been_authorized, nil)
227
239
  self.metadata = data.fetch(:metadata, nil)
228
240
  self.expires_soon = data.fetch(:expires_soon, nil)
229
241
  self.sandbox = data.fetch(:sandbox, nil)
@@ -266,6 +278,8 @@ module ProcessOut
266
278
  "ip_address": self.ip_address,
267
279
  "fingerprint": self.fingerprint,
268
280
  "token_type": self.token_type,
281
+ "used": self.used,
282
+ "has_been_authorized": self.has_been_authorized,
269
283
  "metadata": self.metadata,
270
284
  "expires_soon": self.expires_soon,
271
285
  "sandbox": self.sandbox,
@@ -361,6 +375,12 @@ module ProcessOut
361
375
  if data.include? "token_type"
362
376
  self.token_type = data["token_type"]
363
377
  end
378
+ if data.include? "used"
379
+ self.used = data["used"]
380
+ end
381
+ if data.include? "has_been_authorized"
382
+ self.has_been_authorized = data["has_been_authorized"]
383
+ end
364
384
  if data.include? "metadata"
365
385
  self.metadata = data["metadata"]
366
386
  end
@@ -411,6 +431,8 @@ module ProcessOut
411
431
  self.ip_address = data.fetch(:ip_address, self.ip_address)
412
432
  self.fingerprint = data.fetch(:fingerprint, self.fingerprint)
413
433
  self.token_type = data.fetch(:token_type, self.token_type)
434
+ self.used = data.fetch(:used, self.used)
435
+ self.has_been_authorized = data.fetch(:has_been_authorized, self.has_been_authorized)
414
436
  self.metadata = data.fetch(:metadata, self.metadata)
415
437
  self.expires_soon = data.fetch(:expires_soon, self.expires_soon)
416
438
  self.sandbox = data.fetch(:sandbox, self.sandbox)
@@ -0,0 +1,180 @@
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 CategoryErrorCodes
10
+
11
+ attr_reader :generic
12
+ attr_reader :service
13
+ attr_reader :gateway
14
+ attr_reader :card
15
+ attr_reader :check
16
+ attr_reader :shipping
17
+ attr_reader :customer
18
+ attr_reader :payment
19
+ attr_reader :refund
20
+ attr_reader :wallet
21
+ attr_reader :request
22
+
23
+
24
+ def generic=(val)
25
+ @generic = val
26
+ end
27
+
28
+ def service=(val)
29
+ @service = val
30
+ end
31
+
32
+ def gateway=(val)
33
+ @gateway = val
34
+ end
35
+
36
+ def card=(val)
37
+ @card = val
38
+ end
39
+
40
+ def check=(val)
41
+ @check = val
42
+ end
43
+
44
+ def shipping=(val)
45
+ @shipping = val
46
+ end
47
+
48
+ def customer=(val)
49
+ @customer = val
50
+ end
51
+
52
+ def payment=(val)
53
+ @payment = val
54
+ end
55
+
56
+ def refund=(val)
57
+ @refund = val
58
+ end
59
+
60
+ def wallet=(val)
61
+ @wallet = val
62
+ end
63
+
64
+ def request=(val)
65
+ @request = val
66
+ end
67
+
68
+
69
+ # Initializes the CategoryErrorCodes object
70
+ # Params:
71
+ # +client+:: +ProcessOut+ client instance
72
+ # +data+:: data that can be used to fill the object
73
+ def initialize(client, data = {})
74
+ @client = client
75
+
76
+ self.generic = data.fetch(:generic, nil)
77
+ self.service = data.fetch(:service, nil)
78
+ self.gateway = data.fetch(:gateway, nil)
79
+ self.card = data.fetch(:card, nil)
80
+ self.check = data.fetch(:check, nil)
81
+ self.shipping = data.fetch(:shipping, nil)
82
+ self.customer = data.fetch(:customer, nil)
83
+ self.payment = data.fetch(:payment, nil)
84
+ self.refund = data.fetch(:refund, nil)
85
+ self.wallet = data.fetch(:wallet, nil)
86
+ self.request = data.fetch(:request, nil)
87
+
88
+ end
89
+
90
+ # Create a new CategoryErrorCodes using the current client
91
+ def new(data = {})
92
+ CategoryErrorCodes.new(@client, data)
93
+ end
94
+
95
+ # Overrides the JSON marshaller to only send the fields we want
96
+ def to_json(options)
97
+ {
98
+ "generic": self.generic,
99
+ "service": self.service,
100
+ "gateway": self.gateway,
101
+ "card": self.card,
102
+ "check": self.check,
103
+ "shipping": self.shipping,
104
+ "customer": self.customer,
105
+ "payment": self.payment,
106
+ "refund": self.refund,
107
+ "wallet": self.wallet,
108
+ "request": self.request,
109
+ }.to_json
110
+ end
111
+
112
+ # Fills the object with data coming from the API
113
+ # Params:
114
+ # +data+:: +Hash+ of data coming from the API
115
+ def fill_with_data(data)
116
+ if data.nil?
117
+ return self
118
+ end
119
+ if data.include? "generic"
120
+ self.generic = data["generic"]
121
+ end
122
+ if data.include? "service"
123
+ self.service = data["service"]
124
+ end
125
+ if data.include? "gateway"
126
+ self.gateway = data["gateway"]
127
+ end
128
+ if data.include? "card"
129
+ self.card = data["card"]
130
+ end
131
+ if data.include? "check"
132
+ self.check = data["check"]
133
+ end
134
+ if data.include? "shipping"
135
+ self.shipping = data["shipping"]
136
+ end
137
+ if data.include? "customer"
138
+ self.customer = data["customer"]
139
+ end
140
+ if data.include? "payment"
141
+ self.payment = data["payment"]
142
+ end
143
+ if data.include? "refund"
144
+ self.refund = data["refund"]
145
+ end
146
+ if data.include? "wallet"
147
+ self.wallet = data["wallet"]
148
+ end
149
+ if data.include? "request"
150
+ self.request = data["request"]
151
+ end
152
+
153
+ self
154
+ end
155
+
156
+ # Prefills the object with the data passed as parameters
157
+ # Params:
158
+ # +data+:: +Hash+ of data
159
+ def prefill(data)
160
+ if data.nil?
161
+ return self
162
+ end
163
+ self.generic = data.fetch(:generic, self.generic)
164
+ self.service = data.fetch(:service, self.service)
165
+ self.gateway = data.fetch(:gateway, self.gateway)
166
+ self.card = data.fetch(:card, self.card)
167
+ self.check = data.fetch(:check, self.check)
168
+ self.shipping = data.fetch(:shipping, self.shipping)
169
+ self.customer = data.fetch(:customer, self.customer)
170
+ self.payment = data.fetch(:payment, self.payment)
171
+ self.refund = data.fetch(:refund, self.refund)
172
+ self.wallet = data.fetch(:wallet, self.wallet)
173
+ self.request = data.fetch(:request, self.request)
174
+
175
+ self
176
+ end
177
+
178
+
179
+ end
180
+ end
@@ -29,6 +29,7 @@ module ProcessOut
29
29
  attr_reader :country_code
30
30
  attr_reader :ip_address
31
31
  attr_reader :phone_number
32
+ attr_reader :phone
32
33
  attr_reader :legal_document
33
34
  attr_reader :sex
34
35
  attr_reader :is_business
@@ -195,6 +196,22 @@ module ProcessOut
195
196
  @phone_number = val
196
197
  end
197
198
 
199
+ def phone=(val)
200
+ if val.nil?
201
+ @phone = val
202
+ return
203
+ end
204
+
205
+ if val.instance_of? CustomerPhone
206
+ @phone = val
207
+ else
208
+ obj = CustomerPhone.new(@client)
209
+ obj.fill_with_data(val)
210
+ @phone = obj
211
+ end
212
+
213
+ end
214
+
198
215
  def legal_document=(val)
199
216
  @legal_document = val
200
217
  end
@@ -256,6 +273,7 @@ module ProcessOut
256
273
  self.country_code = data.fetch(:country_code, nil)
257
274
  self.ip_address = data.fetch(:ip_address, nil)
258
275
  self.phone_number = data.fetch(:phone_number, nil)
276
+ self.phone = data.fetch(:phone, nil)
259
277
  self.legal_document = data.fetch(:legal_document, nil)
260
278
  self.sex = data.fetch(:sex, nil)
261
279
  self.is_business = data.fetch(:is_business, nil)
@@ -296,6 +314,7 @@ module ProcessOut
296
314
  "country_code": self.country_code,
297
315
  "ip_address": self.ip_address,
298
316
  "phone_number": self.phone_number,
317
+ "phone": self.phone,
299
318
  "legal_document": self.legal_document,
300
319
  "sex": self.sex,
301
320
  "is_business": self.is_business,
@@ -377,6 +396,9 @@ module ProcessOut
377
396
  if data.include? "phone_number"
378
397
  self.phone_number = data["phone_number"]
379
398
  end
399
+ if data.include? "phone"
400
+ self.phone = data["phone"]
401
+ end
380
402
  if data.include? "legal_document"
381
403
  self.legal_document = data["legal_document"]
382
404
  end
@@ -433,6 +455,7 @@ module ProcessOut
433
455
  self.country_code = data.fetch(:country_code, self.country_code)
434
456
  self.ip_address = data.fetch(:ip_address, self.ip_address)
435
457
  self.phone_number = data.fetch(:phone_number, self.phone_number)
458
+ self.phone = data.fetch(:phone, self.phone)
436
459
  self.legal_document = data.fetch(:legal_document, self.legal_document)
437
460
  self.sex = data.fetch(:sex, self.sex)
438
461
  self.is_business = data.fetch(:is_business, self.is_business)
@@ -633,14 +656,15 @@ module ProcessOut
633
656
  "zip" => @zip,
634
657
  "country_code" => @country_code,
635
658
  "ip_address" => @ip_address,
636
- "phone_number" => @phone_number,
659
+ "phone" => @phone,
637
660
  "legal_document" => @legal_document,
638
661
  "date_of_birth" => @date_of_birth,
639
662
  "is_business" => @is_business,
640
663
  "sex" => @sex,
641
664
  "metadata" => @metadata,
642
665
  "id" => @id,
643
- "registered_at" => @registered_at
666
+ "registered_at" => @registered_at,
667
+ "phone_number" => @phone_number
644
668
  }
645
669
 
646
670
  response = Response.new(request.post(path, data, options))
@@ -706,13 +730,14 @@ module ProcessOut
706
730
  "zip" => @zip,
707
731
  "country_code" => @country_code,
708
732
  "ip_address" => @ip_address,
709
- "phone_number" => @phone_number,
733
+ "phone" => @phone,
710
734
  "legal_document" => @legal_document,
711
735
  "date_of_birth" => @date_of_birth,
712
736
  "is_business" => @is_business,
713
737
  "sex" => @sex,
714
738
  "metadata" => @metadata,
715
- "registered_at" => @registered_at
739
+ "registered_at" => @registered_at,
740
+ "phone_number" => @phone_number
716
741
  }
717
742
 
718
743
  response = Response.new(request.put(path, data, options))
@@ -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 CustomerPhone
10
+
11
+ attr_reader :number
12
+ attr_reader :dialing_code
13
+
14
+
15
+ def number=(val)
16
+ @number = val
17
+ end
18
+
19
+ def dialing_code=(val)
20
+ @dialing_code = val
21
+ end
22
+
23
+
24
+ # Initializes the CustomerPhone 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.number = data.fetch(:number, nil)
32
+ self.dialing_code = data.fetch(:dialing_code, nil)
33
+
34
+ end
35
+
36
+ # Create a new CustomerPhone using the current client
37
+ def new(data = {})
38
+ CustomerPhone.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
+ "number": self.number,
45
+ "dialing_code": self.dialing_code,
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? "number"
57
+ self.number = data["number"]
58
+ end
59
+ if data.include? "dialing_code"
60
+ self.dialing_code = data["dialing_code"]
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.number = data.fetch(:number, self.number)
74
+ self.dialing_code = data.fetch(:dialing_code, self.dialing_code)
75
+
76
+ self
77
+ end
78
+
79
+
80
+ end
81
+ end
@@ -0,0 +1,107 @@
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 ErrorCodes
10
+
11
+ attr_reader :gateway
12
+
13
+
14
+ def gateway=(val)
15
+ if val.nil?
16
+ @gateway = val
17
+ return
18
+ end
19
+
20
+ if val.instance_of? CategoryErrorCodes
21
+ @gateway = val
22
+ else
23
+ obj = CategoryErrorCodes.new(@client)
24
+ obj.fill_with_data(val)
25
+ @gateway = obj
26
+ end
27
+
28
+ end
29
+
30
+
31
+ # Initializes the ErrorCodes object
32
+ # Params:
33
+ # +client+:: +ProcessOut+ client instance
34
+ # +data+:: data that can be used to fill the object
35
+ def initialize(client, data = {})
36
+ @client = client
37
+
38
+ self.gateway = data.fetch(:gateway, nil)
39
+
40
+ end
41
+
42
+ # Create a new ErrorCodes using the current client
43
+ def new(data = {})
44
+ ErrorCodes.new(@client, data)
45
+ end
46
+
47
+ # Overrides the JSON marshaller to only send the fields we want
48
+ def to_json(options)
49
+ {
50
+ "gateway": self.gateway,
51
+ }.to_json
52
+ end
53
+
54
+ # Fills the object with data coming from the API
55
+ # Params:
56
+ # +data+:: +Hash+ of data coming from the API
57
+ def fill_with_data(data)
58
+ if data.nil?
59
+ return self
60
+ end
61
+ if data.include? "gateway"
62
+ self.gateway = data["gateway"]
63
+ end
64
+
65
+ self
66
+ end
67
+
68
+ # Prefills the object with the data passed as parameters
69
+ # Params:
70
+ # +data+:: +Hash+ of data
71
+ def prefill(data)
72
+ if data.nil?
73
+ return self
74
+ end
75
+ self.gateway = data.fetch(:gateway, self.gateway)
76
+
77
+ self
78
+ end
79
+
80
+ # Get all error codes.
81
+ # Params:
82
+ # +options+:: +Hash+ of options
83
+ def all(options = {})
84
+ self.prefill(options)
85
+
86
+ request = Request.new(@client)
87
+ path = "/error-codes"
88
+ data = {
89
+
90
+ }
91
+
92
+ response = Response.new(request.get(path, data, options))
93
+ return_values = Array.new
94
+
95
+ body = response.body
96
+
97
+ obj = ErrorCodes.new(@client)
98
+ return_values.push(obj.fill_with_data(body))
99
+
100
+
101
+
102
+ return_values[0]
103
+ end
104
+
105
+
106
+ end
107
+ end
@@ -20,6 +20,7 @@ module ProcessOut
20
20
  attr_reader :created_at
21
21
  attr_reader :enabled_at
22
22
  attr_reader :processing_region
23
+ attr_reader :metadata
23
24
 
24
25
 
25
26
  def id=(val)
@@ -94,6 +95,10 @@ module ProcessOut
94
95
  @processing_region = val
95
96
  end
96
97
 
98
+ def metadata=(val)
99
+ @metadata = val
100
+ end
101
+
97
102
 
98
103
  # Initializes the GatewayConfiguration object
99
104
  # Params:
@@ -114,6 +119,7 @@ module ProcessOut
114
119
  self.created_at = data.fetch(:created_at, nil)
115
120
  self.enabled_at = data.fetch(:enabled_at, nil)
116
121
  self.processing_region = data.fetch(:processing_region, nil)
122
+ self.metadata = data.fetch(:metadata, nil)
117
123
 
118
124
  end
119
125
 
@@ -137,6 +143,7 @@ module ProcessOut
137
143
  "created_at": self.created_at,
138
144
  "enabled_at": self.enabled_at,
139
145
  "processing_region": self.processing_region,
146
+ "metadata": self.metadata,
140
147
  }.to_json
141
148
  end
142
149
 
@@ -183,6 +190,9 @@ module ProcessOut
183
190
  if data.include? "processing_region"
184
191
  self.processing_region = data["processing_region"]
185
192
  end
193
+ if data.include? "metadata"
194
+ self.metadata = data["metadata"]
195
+ end
186
196
 
187
197
  self
188
198
  end
@@ -206,6 +216,7 @@ module ProcessOut
206
216
  self.created_at = data.fetch(:created_at, self.created_at)
207
217
  self.enabled_at = data.fetch(:enabled_at, self.enabled_at)
208
218
  self.processing_region = data.fetch(:processing_region, self.processing_region)
219
+ self.metadata = data.fetch(:metadata, self.metadata)
209
220
 
210
221
  self
211
222
  end
@@ -282,6 +293,7 @@ module ProcessOut
282
293
  "enabled" => @enabled,
283
294
  "default_currency" => @default_currency,
284
295
  "processing_region" => @processing_region,
296
+ "metadata" => @metadata,
285
297
  "settings" => options.fetch(:settings, nil),
286
298
  "sub_accounts_enabled" => options.fetch(:sub_accounts_enabled, nil)
287
299
  }
@@ -336,6 +348,7 @@ module ProcessOut
336
348
  "enabled" => @enabled,
337
349
  "default_currency" => @default_currency,
338
350
  "processing_region" => @processing_region,
351
+ "metadata" => @metadata,
339
352
  "settings" => options.fetch(:settings, nil),
340
353
  "sub_accounts_enabled" => options.fetch(:sub_accounts_enabled, nil)
341
354
  }