processout 2.14.0 → 2.14.4
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 +5 -5
 - data/lib/processout.rb +12 -0
 - data/lib/processout/card.rb +43 -0
 - data/lib/processout/customer.rb +28 -2
 - data/lib/processout/event.rb +0 -31
 - data/lib/processout/invoice.rb +61 -1
 - data/lib/processout/invoice_device.rb +11 -0
 - data/lib/processout/invoice_external_fraud_tools.rb +70 -0
 - data/lib/processout/networking/request.rb +1 -1
 - data/lib/processout/three_ds.rb +103 -0
 - data/lib/processout/token.rb +57 -0
 - data/lib/processout/transaction.rb +56 -0
 - data/lib/processout/version.rb +1 -1
 - metadata +5 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 0ca11711f3387a3bebf5c64eb3d8e3dd60c6147b669a0d967ce88f1753f9c2f6
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 95ce72ee215524f276bbb5da6926b289574ea63589e6c6ef4f0c133364aed1ca
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 28925f1ea68596b08723735d06006c90efe6cb53da284b6a751bddb88bcff2783d59b33c94619a8c30571e9bc5b5bee00d407a6578e5c7d4a356ca423b0c984b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 9aaa5b1e7dd5d8d869c459fccd71f9346fa114d827fe9c9895e9a9569148fc156e01be413c16e3268dd5b3cd4ac84902287da32fac8068a56ee9189758159ed2
         
     | 
    
        data/lib/processout.rb
    CHANGED
    
    | 
         @@ -14,6 +14,7 @@ require "processout/event" 
     | 
|
| 
       14 
14 
     | 
    
         
             
            require "processout/gateway"
         
     | 
| 
       15 
15 
     | 
    
         
             
            require "processout/gateway_configuration"
         
     | 
| 
       16 
16 
     | 
    
         
             
            require "processout/invoice"
         
     | 
| 
      
 17 
     | 
    
         
            +
            require "processout/invoice_external_fraud_tools"
         
     | 
| 
       17 
18 
     | 
    
         
             
            require "processout/invoice_risk"
         
     | 
| 
       18 
19 
     | 
    
         
             
            require "processout/invoice_device"
         
     | 
| 
       19 
20 
     | 
    
         
             
            require "processout/invoice_shipping"
         
     | 
| 
         @@ -28,6 +29,7 @@ require "processout/project" 
     | 
|
| 
       28 
29 
     | 
    
         
             
            require "processout/refund"
         
     | 
| 
       29 
30 
     | 
    
         
             
            require "processout/subscription"
         
     | 
| 
       30 
31 
     | 
    
         
             
            require "processout/transaction"
         
     | 
| 
      
 32 
     | 
    
         
            +
            require "processout/three_ds"
         
     | 
| 
       31 
33 
     | 
    
         
             
            require "processout/payment_data_three_ds_request"
         
     | 
| 
       32 
34 
     | 
    
         
             
            require "processout/payment_data_network_authentication"
         
     | 
| 
       33 
35 
     | 
    
         
             
            require "processout/payment_data_three_ds_authentication"
         
     | 
| 
         @@ -116,6 +118,11 @@ module ProcessOut 
     | 
|
| 
       116 
118 
     | 
    
         
             
                  obj = Invoice.new(self, data)
         
     | 
| 
       117 
119 
     | 
    
         
             
                end
         
     | 
| 
       118 
120 
     | 
    
         | 
| 
      
 121 
     | 
    
         
            +
                # Create a new InvoiceExternalFraudTools instance
         
     | 
| 
      
 122 
     | 
    
         
            +
                def invoice_external_fraud_tools(data = {})
         
     | 
| 
      
 123 
     | 
    
         
            +
                  obj = InvoiceExternalFraudTools.new(self, data)
         
     | 
| 
      
 124 
     | 
    
         
            +
                end
         
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
       119 
126 
     | 
    
         
             
                # Create a new InvoiceRisk instance
         
     | 
| 
       120 
127 
     | 
    
         
             
                def invoice_risk(data = {})
         
     | 
| 
       121 
128 
     | 
    
         
             
                  obj = InvoiceRisk.new(self, data)
         
     | 
| 
         @@ -186,6 +193,11 @@ module ProcessOut 
     | 
|
| 
       186 
193 
     | 
    
         
             
                  obj = Transaction.new(self, data)
         
     | 
| 
       187 
194 
     | 
    
         
             
                end
         
     | 
| 
       188 
195 
     | 
    
         | 
| 
      
 196 
     | 
    
         
            +
                # Create a new ThreeDS instance
         
     | 
| 
      
 197 
     | 
    
         
            +
                def three_ds(data = {})
         
     | 
| 
      
 198 
     | 
    
         
            +
                  obj = ThreeDS.new(self, data)
         
     | 
| 
      
 199 
     | 
    
         
            +
                end
         
     | 
| 
      
 200 
     | 
    
         
            +
             
     | 
| 
       189 
201 
     | 
    
         
             
                # Create a new PaymentDataThreeDSRequest instance
         
     | 
| 
       190 
202 
     | 
    
         
             
                def payment_data_three_ds_request(data = {})
         
     | 
| 
       191 
203 
     | 
    
         
             
                  obj = PaymentDataThreeDSRequest.new(self, data)
         
     | 
    
        data/lib/processout/card.rb
    CHANGED
    
    | 
         @@ -18,6 +18,7 @@ module ProcessOut 
     | 
|
| 
       18 
18 
     | 
    
         
             
                attr_reader :type
         
     | 
| 
       19 
19 
     | 
    
         
             
                attr_reader :bank_name
         
     | 
| 
       20 
20 
     | 
    
         
             
                attr_reader :brand
         
     | 
| 
      
 21 
     | 
    
         
            +
                attr_reader :category
         
     | 
| 
       21 
22 
     | 
    
         
             
                attr_reader :iin
         
     | 
| 
       22 
23 
     | 
    
         
             
                attr_reader :last_4_digits
         
     | 
| 
       23 
24 
     | 
    
         
             
                attr_reader :exp_month
         
     | 
| 
         @@ -33,6 +34,7 @@ module ProcessOut 
     | 
|
| 
       33 
34 
     | 
    
         
             
                attr_reader :country_code
         
     | 
| 
       34 
35 
     | 
    
         
             
                attr_reader :ip_address
         
     | 
| 
       35 
36 
     | 
    
         
             
                attr_reader :fingerprint
         
     | 
| 
      
 37 
     | 
    
         
            +
                attr_reader :token_type
         
     | 
| 
       36 
38 
     | 
    
         
             
                attr_reader :metadata
         
     | 
| 
       37 
39 
     | 
    
         
             
                attr_reader :expires_soon
         
     | 
| 
       38 
40 
     | 
    
         
             
                attr_reader :sandbox
         
     | 
| 
         @@ -103,6 +105,10 @@ module ProcessOut 
     | 
|
| 
       103 
105 
     | 
    
         
             
                  @brand = val
         
     | 
| 
       104 
106 
     | 
    
         
             
                end
         
     | 
| 
       105 
107 
     | 
    
         | 
| 
      
 108 
     | 
    
         
            +
                def category=(val)
         
     | 
| 
      
 109 
     | 
    
         
            +
                  @category = val
         
     | 
| 
      
 110 
     | 
    
         
            +
                end
         
     | 
| 
      
 111 
     | 
    
         
            +
                
         
     | 
| 
       106 
112 
     | 
    
         
             
                def iin=(val)
         
     | 
| 
       107 
113 
     | 
    
         
             
                  @iin = val
         
     | 
| 
       108 
114 
     | 
    
         
             
                end
         
     | 
| 
         @@ -163,6 +169,10 @@ module ProcessOut 
     | 
|
| 
       163 
169 
     | 
    
         
             
                  @fingerprint = val
         
     | 
| 
       164 
170 
     | 
    
         
             
                end
         
     | 
| 
       165 
171 
     | 
    
         | 
| 
      
 172 
     | 
    
         
            +
                def token_type=(val)
         
     | 
| 
      
 173 
     | 
    
         
            +
                  @token_type = val
         
     | 
| 
      
 174 
     | 
    
         
            +
                end
         
     | 
| 
      
 175 
     | 
    
         
            +
                
         
     | 
| 
       166 
176 
     | 
    
         
             
                def metadata=(val)
         
     | 
| 
       167 
177 
     | 
    
         
             
                  @metadata = val
         
     | 
| 
       168 
178 
     | 
    
         
             
                end
         
     | 
| 
         @@ -197,6 +207,7 @@ module ProcessOut 
     | 
|
| 
       197 
207 
     | 
    
         
             
                  self.type = data.fetch(:type, nil)
         
     | 
| 
       198 
208 
     | 
    
         
             
                  self.bank_name = data.fetch(:bank_name, nil)
         
     | 
| 
       199 
209 
     | 
    
         
             
                  self.brand = data.fetch(:brand, nil)
         
     | 
| 
      
 210 
     | 
    
         
            +
                  self.category = data.fetch(:category, nil)
         
     | 
| 
       200 
211 
     | 
    
         
             
                  self.iin = data.fetch(:iin, nil)
         
     | 
| 
       201 
212 
     | 
    
         
             
                  self.last_4_digits = data.fetch(:last_4_digits, nil)
         
     | 
| 
       202 
213 
     | 
    
         
             
                  self.exp_month = data.fetch(:exp_month, nil)
         
     | 
| 
         @@ -212,6 +223,7 @@ module ProcessOut 
     | 
|
| 
       212 
223 
     | 
    
         
             
                  self.country_code = data.fetch(:country_code, nil)
         
     | 
| 
       213 
224 
     | 
    
         
             
                  self.ip_address = data.fetch(:ip_address, nil)
         
     | 
| 
       214 
225 
     | 
    
         
             
                  self.fingerprint = data.fetch(:fingerprint, nil)
         
     | 
| 
      
 226 
     | 
    
         
            +
                  self.token_type = data.fetch(:token_type, nil)
         
     | 
| 
       215 
227 
     | 
    
         
             
                  self.metadata = data.fetch(:metadata, nil)
         
     | 
| 
       216 
228 
     | 
    
         
             
                  self.expires_soon = data.fetch(:expires_soon, nil)
         
     | 
| 
       217 
229 
     | 
    
         
             
                  self.sandbox = data.fetch(:sandbox, nil)
         
     | 
| 
         @@ -237,6 +249,7 @@ module ProcessOut 
     | 
|
| 
       237 
249 
     | 
    
         
             
                      "type": self.type,
         
     | 
| 
       238 
250 
     | 
    
         
             
                      "bank_name": self.bank_name,
         
     | 
| 
       239 
251 
     | 
    
         
             
                      "brand": self.brand,
         
     | 
| 
      
 252 
     | 
    
         
            +
                      "category": self.category,
         
     | 
| 
       240 
253 
     | 
    
         
             
                      "iin": self.iin,
         
     | 
| 
       241 
254 
     | 
    
         
             
                      "last_4_digits": self.last_4_digits,
         
     | 
| 
       242 
255 
     | 
    
         
             
                      "exp_month": self.exp_month,
         
     | 
| 
         @@ -252,6 +265,7 @@ module ProcessOut 
     | 
|
| 
       252 
265 
     | 
    
         
             
                      "country_code": self.country_code,
         
     | 
| 
       253 
266 
     | 
    
         
             
                      "ip_address": self.ip_address,
         
     | 
| 
       254 
267 
     | 
    
         
             
                      "fingerprint": self.fingerprint,
         
     | 
| 
      
 268 
     | 
    
         
            +
                      "token_type": self.token_type,
         
     | 
| 
       255 
269 
     | 
    
         
             
                      "metadata": self.metadata,
         
     | 
| 
       256 
270 
     | 
    
         
             
                      "expires_soon": self.expires_soon,
         
     | 
| 
       257 
271 
     | 
    
         
             
                      "sandbox": self.sandbox,
         
     | 
| 
         @@ -296,6 +310,9 @@ module ProcessOut 
     | 
|
| 
       296 
310 
     | 
    
         
             
                  if data.include? "brand"
         
     | 
| 
       297 
311 
     | 
    
         
             
                    self.brand = data["brand"]
         
     | 
| 
       298 
312 
     | 
    
         
             
                  end
         
     | 
| 
      
 313 
     | 
    
         
            +
                  if data.include? "category"
         
     | 
| 
      
 314 
     | 
    
         
            +
                    self.category = data["category"]
         
     | 
| 
      
 315 
     | 
    
         
            +
                  end
         
     | 
| 
       299 
316 
     | 
    
         
             
                  if data.include? "iin"
         
     | 
| 
       300 
317 
     | 
    
         
             
                    self.iin = data["iin"]
         
     | 
| 
       301 
318 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -341,6 +358,9 @@ module ProcessOut 
     | 
|
| 
       341 
358 
     | 
    
         
             
                  if data.include? "fingerprint"
         
     | 
| 
       342 
359 
     | 
    
         
             
                    self.fingerprint = data["fingerprint"]
         
     | 
| 
       343 
360 
     | 
    
         
             
                  end
         
     | 
| 
      
 361 
     | 
    
         
            +
                  if data.include? "token_type"
         
     | 
| 
      
 362 
     | 
    
         
            +
                    self.token_type = data["token_type"]
         
     | 
| 
      
 363 
     | 
    
         
            +
                  end
         
     | 
| 
       344 
364 
     | 
    
         
             
                  if data.include? "metadata"
         
     | 
| 
       345 
365 
     | 
    
         
             
                    self.metadata = data["metadata"]
         
     | 
| 
       346 
366 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -374,6 +394,7 @@ module ProcessOut 
     | 
|
| 
       374 
394 
     | 
    
         
             
                  self.type = data.fetch(:type, self.type)
         
     | 
| 
       375 
395 
     | 
    
         
             
                  self.bank_name = data.fetch(:bank_name, self.bank_name)
         
     | 
| 
       376 
396 
     | 
    
         
             
                  self.brand = data.fetch(:brand, self.brand)
         
     | 
| 
      
 397 
     | 
    
         
            +
                  self.category = data.fetch(:category, self.category)
         
     | 
| 
       377 
398 
     | 
    
         
             
                  self.iin = data.fetch(:iin, self.iin)
         
     | 
| 
       378 
399 
     | 
    
         
             
                  self.last_4_digits = data.fetch(:last_4_digits, self.last_4_digits)
         
     | 
| 
       379 
400 
     | 
    
         
             
                  self.exp_month = data.fetch(:exp_month, self.exp_month)
         
     | 
| 
         @@ -389,6 +410,7 @@ module ProcessOut 
     | 
|
| 
       389 
410 
     | 
    
         
             
                  self.country_code = data.fetch(:country_code, self.country_code)
         
     | 
| 
       390 
411 
     | 
    
         
             
                  self.ip_address = data.fetch(:ip_address, self.ip_address)
         
     | 
| 
       391 
412 
     | 
    
         
             
                  self.fingerprint = data.fetch(:fingerprint, self.fingerprint)
         
     | 
| 
      
 413 
     | 
    
         
            +
                  self.token_type = data.fetch(:token_type, self.token_type)
         
     | 
| 
       392 
414 
     | 
    
         
             
                  self.metadata = data.fetch(:metadata, self.metadata)
         
     | 
| 
       393 
415 
     | 
    
         
             
                  self.expires_soon = data.fetch(:expires_soon, self.expires_soon)
         
     | 
| 
       394 
416 
     | 
    
         
             
                  self.sandbox = data.fetch(:sandbox, self.sandbox)
         
     | 
| 
         @@ -452,6 +474,27 @@ module ProcessOut 
     | 
|
| 
       452 
474 
     | 
    
         | 
| 
       453 
475 
     | 
    
         | 
| 
       454 
476 
     | 
    
         | 
| 
      
 477 
     | 
    
         
            +
                  return_values[0]
         
     | 
| 
      
 478 
     | 
    
         
            +
                end
         
     | 
| 
      
 479 
     | 
    
         
            +
             
     | 
| 
      
 480 
     | 
    
         
            +
                # Anonymize the card.
         
     | 
| 
      
 481 
     | 
    
         
            +
                # Params:
         
     | 
| 
      
 482 
     | 
    
         
            +
                # +options+:: +Hash+ of options
         
     | 
| 
      
 483 
     | 
    
         
            +
                def anonymize(options = {})
         
     | 
| 
      
 484 
     | 
    
         
            +
                  self.prefill(options)
         
     | 
| 
      
 485 
     | 
    
         
            +
             
     | 
| 
      
 486 
     | 
    
         
            +
                  request = Request.new(@client)
         
     | 
| 
      
 487 
     | 
    
         
            +
                  path    = "/cards/" + CGI.escape(@id) + ""
         
     | 
| 
      
 488 
     | 
    
         
            +
                  data    = {
         
     | 
| 
      
 489 
     | 
    
         
            +
             
     | 
| 
      
 490 
     | 
    
         
            +
                  }
         
     | 
| 
      
 491 
     | 
    
         
            +
             
     | 
| 
      
 492 
     | 
    
         
            +
                  response = Response.new(request.delete(path, data, options))
         
     | 
| 
      
 493 
     | 
    
         
            +
                  return_values = Array.new
         
     | 
| 
      
 494 
     | 
    
         
            +
                  
         
     | 
| 
      
 495 
     | 
    
         
            +
                  return_values.push(response.success)
         
     | 
| 
      
 496 
     | 
    
         
            +
             
     | 
| 
      
 497 
     | 
    
         
            +
                  
         
     | 
| 
       455 
498 
     | 
    
         
             
                  return_values[0]
         
     | 
| 
       456 
499 
     | 
    
         
             
                end
         
     | 
| 
       457 
500 
     | 
    
         | 
    
        data/lib/processout/customer.rb
    CHANGED
    
    | 
         @@ -35,6 +35,8 @@ module ProcessOut 
     | 
|
| 
       35 
35 
     | 
    
         
             
                attr_reader :metadata
         
     | 
| 
       36 
36 
     | 
    
         
             
                attr_reader :sandbox
         
     | 
| 
       37 
37 
     | 
    
         
             
                attr_reader :created_at
         
     | 
| 
      
 38 
     | 
    
         
            +
                attr_reader :registered_at
         
     | 
| 
      
 39 
     | 
    
         
            +
                attr_reader :date_of_birth
         
     | 
| 
       38 
40 
     | 
    
         | 
| 
       39 
41 
     | 
    
         | 
| 
       40 
42 
     | 
    
         
             
                def id=(val)
         
     | 
| 
         @@ -217,6 +219,14 @@ module ProcessOut 
     | 
|
| 
       217 
219 
     | 
    
         
             
                  @created_at = val
         
     | 
| 
       218 
220 
     | 
    
         
             
                end
         
     | 
| 
       219 
221 
     | 
    
         | 
| 
      
 222 
     | 
    
         
            +
                def registered_at=(val)
         
     | 
| 
      
 223 
     | 
    
         
            +
                  @registered_at = val
         
     | 
| 
      
 224 
     | 
    
         
            +
                end
         
     | 
| 
      
 225 
     | 
    
         
            +
                
         
     | 
| 
      
 226 
     | 
    
         
            +
                def date_of_birth=(val)
         
     | 
| 
      
 227 
     | 
    
         
            +
                  @date_of_birth = val
         
     | 
| 
      
 228 
     | 
    
         
            +
                end
         
     | 
| 
      
 229 
     | 
    
         
            +
                
         
     | 
| 
       220 
230 
     | 
    
         | 
| 
       221 
231 
     | 
    
         
             
                # Initializes the Customer object
         
     | 
| 
       222 
232 
     | 
    
         
             
                # Params:
         
     | 
| 
         @@ -252,6 +262,8 @@ module ProcessOut 
     | 
|
| 
       252 
262 
     | 
    
         
             
                  self.metadata = data.fetch(:metadata, nil)
         
     | 
| 
       253 
263 
     | 
    
         
             
                  self.sandbox = data.fetch(:sandbox, nil)
         
     | 
| 
       254 
264 
     | 
    
         
             
                  self.created_at = data.fetch(:created_at, nil)
         
     | 
| 
      
 265 
     | 
    
         
            +
                  self.registered_at = data.fetch(:registered_at, nil)
         
     | 
| 
      
 266 
     | 
    
         
            +
                  self.date_of_birth = data.fetch(:date_of_birth, nil)
         
     | 
| 
       255 
267 
     | 
    
         | 
| 
       256 
268 
     | 
    
         
             
                end
         
     | 
| 
       257 
269 
     | 
    
         | 
| 
         @@ -290,6 +302,8 @@ module ProcessOut 
     | 
|
| 
       290 
302 
     | 
    
         
             
                      "metadata": self.metadata,
         
     | 
| 
       291 
303 
     | 
    
         
             
                      "sandbox": self.sandbox,
         
     | 
| 
       292 
304 
     | 
    
         
             
                      "created_at": self.created_at,
         
     | 
| 
      
 305 
     | 
    
         
            +
                      "registered_at": self.registered_at,
         
     | 
| 
      
 306 
     | 
    
         
            +
                      "date_of_birth": self.date_of_birth,
         
     | 
| 
       293 
307 
     | 
    
         
             
                  }.to_json
         
     | 
| 
       294 
308 
     | 
    
         
             
                end
         
     | 
| 
       295 
309 
     | 
    
         | 
| 
         @@ -381,6 +395,12 @@ module ProcessOut 
     | 
|
| 
       381 
395 
     | 
    
         
             
                  if data.include? "created_at"
         
     | 
| 
       382 
396 
     | 
    
         
             
                    self.created_at = data["created_at"]
         
     | 
| 
       383 
397 
     | 
    
         
             
                  end
         
     | 
| 
      
 398 
     | 
    
         
            +
                  if data.include? "registered_at"
         
     | 
| 
      
 399 
     | 
    
         
            +
                    self.registered_at = data["registered_at"]
         
     | 
| 
      
 400 
     | 
    
         
            +
                  end
         
     | 
| 
      
 401 
     | 
    
         
            +
                  if data.include? "date_of_birth"
         
     | 
| 
      
 402 
     | 
    
         
            +
                    self.date_of_birth = data["date_of_birth"]
         
     | 
| 
      
 403 
     | 
    
         
            +
                  end
         
     | 
| 
       384 
404 
     | 
    
         | 
| 
       385 
405 
     | 
    
         
             
                  self
         
     | 
| 
       386 
406 
     | 
    
         
             
                end
         
     | 
| 
         @@ -419,6 +439,8 @@ module ProcessOut 
     | 
|
| 
       419 
439 
     | 
    
         
             
                  self.metadata = data.fetch(:metadata, self.metadata)
         
     | 
| 
       420 
440 
     | 
    
         
             
                  self.sandbox = data.fetch(:sandbox, self.sandbox)
         
     | 
| 
       421 
441 
     | 
    
         
             
                  self.created_at = data.fetch(:created_at, self.created_at)
         
     | 
| 
      
 442 
     | 
    
         
            +
                  self.registered_at = data.fetch(:registered_at, self.registered_at)
         
     | 
| 
      
 443 
     | 
    
         
            +
                  self.date_of_birth = data.fetch(:date_of_birth, self.date_of_birth)
         
     | 
| 
       422 
444 
     | 
    
         | 
| 
       423 
445 
     | 
    
         
             
                  self
         
     | 
| 
       424 
446 
     | 
    
         
             
                end
         
     | 
| 
         @@ -613,10 +635,12 @@ module ProcessOut 
     | 
|
| 
       613 
635 
     | 
    
         
             
                    "ip_address" => @ip_address, 
         
     | 
| 
       614 
636 
     | 
    
         
             
                    "phone_number" => @phone_number, 
         
     | 
| 
       615 
637 
     | 
    
         
             
                    "legal_document" => @legal_document, 
         
     | 
| 
      
 638 
     | 
    
         
            +
                    "date_of_birth" => @date_of_birth, 
         
     | 
| 
       616 
639 
     | 
    
         
             
                    "is_business" => @is_business, 
         
     | 
| 
       617 
640 
     | 
    
         
             
                    "sex" => @sex, 
         
     | 
| 
       618 
641 
     | 
    
         
             
                    "metadata" => @metadata, 
         
     | 
| 
       619 
     | 
    
         
            -
                    "id" => @id
         
     | 
| 
      
 642 
     | 
    
         
            +
                    "id" => @id, 
         
     | 
| 
      
 643 
     | 
    
         
            +
                    "registered_at" => @registered_at
         
     | 
| 
       620 
644 
     | 
    
         
             
                  }
         
     | 
| 
       621 
645 
     | 
    
         | 
| 
       622 
646 
     | 
    
         
             
                  response = Response.new(request.post(path, data, options))
         
     | 
| 
         @@ -684,9 +708,11 @@ module ProcessOut 
     | 
|
| 
       684 
708 
     | 
    
         
             
                    "ip_address" => @ip_address, 
         
     | 
| 
       685 
709 
     | 
    
         
             
                    "phone_number" => @phone_number, 
         
     | 
| 
       686 
710 
     | 
    
         
             
                    "legal_document" => @legal_document, 
         
     | 
| 
      
 711 
     | 
    
         
            +
                    "date_of_birth" => @date_of_birth, 
         
     | 
| 
       687 
712 
     | 
    
         
             
                    "is_business" => @is_business, 
         
     | 
| 
       688 
713 
     | 
    
         
             
                    "sex" => @sex, 
         
     | 
| 
       689 
     | 
    
         
            -
                    "metadata" => @metadata
         
     | 
| 
      
 714 
     | 
    
         
            +
                    "metadata" => @metadata, 
         
     | 
| 
      
 715 
     | 
    
         
            +
                    "registered_at" => @registered_at
         
     | 
| 
       690 
716 
     | 
    
         
             
                  }
         
     | 
| 
       691 
717 
     | 
    
         | 
| 
       692 
718 
     | 
    
         
             
                  response = Response.new(request.put(path, data, options))
         
     | 
    
        data/lib/processout/event.rb
    CHANGED
    
    | 
         @@ -229,37 +229,6 @@ module ProcessOut 
     | 
|
| 
       229 
229 
     | 
    
         | 
| 
       230 
230 
     | 
    
         | 
| 
       231 
231 
     | 
    
         | 
| 
       232 
     | 
    
         
            -
                  return_values[0]
         
     | 
| 
       233 
     | 
    
         
            -
                end
         
     | 
| 
       234 
     | 
    
         
            -
             
     | 
| 
       235 
     | 
    
         
            -
                # Find an event by the Resource ID that generated it.
         
     | 
| 
       236 
     | 
    
         
            -
                # Params:
         
     | 
| 
       237 
     | 
    
         
            -
                # +resource_id+:: Resource ID
         
     | 
| 
       238 
     | 
    
         
            -
                # +options+:: +Hash+ of options
         
     | 
| 
       239 
     | 
    
         
            -
                def find_by_resource_id(resource_id, options = {})
         
     | 
| 
       240 
     | 
    
         
            -
                  self.prefill(options)
         
     | 
| 
       241 
     | 
    
         
            -
             
     | 
| 
       242 
     | 
    
         
            -
                  request = Request.new(@client)
         
     | 
| 
       243 
     | 
    
         
            -
                  path    = "/events/by_resource_id/" + CGI.escape(resource_id) + ""
         
     | 
| 
       244 
     | 
    
         
            -
                  data    = {
         
     | 
| 
       245 
     | 
    
         
            -
             
     | 
| 
       246 
     | 
    
         
            -
                  }
         
     | 
| 
       247 
     | 
    
         
            -
             
     | 
| 
       248 
     | 
    
         
            -
                  response = Response.new(request.get(path, data, options))
         
     | 
| 
       249 
     | 
    
         
            -
                  return_values = Array.new
         
     | 
| 
       250 
     | 
    
         
            -
                  
         
     | 
| 
       251 
     | 
    
         
            -
                  a    = Array.new
         
     | 
| 
       252 
     | 
    
         
            -
                  body = response.body
         
     | 
| 
       253 
     | 
    
         
            -
                  for v in body['events']
         
     | 
| 
       254 
     | 
    
         
            -
                    tmp = Event.new(@client)
         
     | 
| 
       255 
     | 
    
         
            -
                    tmp.fill_with_data(v)
         
     | 
| 
       256 
     | 
    
         
            -
                    a.push(tmp)
         
     | 
| 
       257 
     | 
    
         
            -
                  end
         
     | 
| 
       258 
     | 
    
         
            -
             
     | 
| 
       259 
     | 
    
         
            -
                  return_values.push(a)
         
     | 
| 
       260 
     | 
    
         
            -
                  
         
     | 
| 
       261 
     | 
    
         
            -
             
     | 
| 
       262 
     | 
    
         
            -
                  
         
     | 
| 
       263 
232 
     | 
    
         
             
                  return_values[0]
         
     | 
| 
       264 
233 
     | 
    
         
             
                end
         
     | 
| 
       265 
234 
     | 
    
         | 
    
        data/lib/processout/invoice.rb
    CHANGED
    
    | 
         @@ -41,6 +41,10 @@ module ProcessOut 
     | 
|
| 
       41 
41 
     | 
    
         
             
                attr_reader :risk
         
     | 
| 
       42 
42 
     | 
    
         
             
                attr_reader :shipping
         
     | 
| 
       43 
43 
     | 
    
         
             
                attr_reader :device
         
     | 
| 
      
 44 
     | 
    
         
            +
                attr_reader :external_fraud_tools
         
     | 
| 
      
 45 
     | 
    
         
            +
                attr_reader :exemption_reason_3ds2
         
     | 
| 
      
 46 
     | 
    
         
            +
                attr_reader :sca_exemption_reason
         
     | 
| 
      
 47 
     | 
    
         
            +
                attr_reader :challenge_indicator
         
     | 
| 
       44 
48 
     | 
    
         | 
| 
       45 
49 
     | 
    
         | 
| 
       46 
50 
     | 
    
         
             
                def id=(val)
         
     | 
| 
         @@ -287,6 +291,34 @@ module ProcessOut 
     | 
|
| 
       287 
291 
     | 
    
         | 
| 
       288 
292 
     | 
    
         
             
                end
         
     | 
| 
       289 
293 
     | 
    
         | 
| 
      
 294 
     | 
    
         
            +
                def external_fraud_tools=(val)
         
     | 
| 
      
 295 
     | 
    
         
            +
                  if val.nil?
         
     | 
| 
      
 296 
     | 
    
         
            +
                    @external_fraud_tools = val
         
     | 
| 
      
 297 
     | 
    
         
            +
                    return
         
     | 
| 
      
 298 
     | 
    
         
            +
                  end
         
     | 
| 
      
 299 
     | 
    
         
            +
             
     | 
| 
      
 300 
     | 
    
         
            +
                  if val.instance_of? InvoiceExternalFraudTools
         
     | 
| 
      
 301 
     | 
    
         
            +
                    @external_fraud_tools = val
         
     | 
| 
      
 302 
     | 
    
         
            +
                  else
         
     | 
| 
      
 303 
     | 
    
         
            +
                    obj = InvoiceExternalFraudTools.new(@client)
         
     | 
| 
      
 304 
     | 
    
         
            +
                    obj.fill_with_data(val)
         
     | 
| 
      
 305 
     | 
    
         
            +
                    @external_fraud_tools = obj
         
     | 
| 
      
 306 
     | 
    
         
            +
                  end
         
     | 
| 
      
 307 
     | 
    
         
            +
                  
         
     | 
| 
      
 308 
     | 
    
         
            +
                end
         
     | 
| 
      
 309 
     | 
    
         
            +
                
         
     | 
| 
      
 310 
     | 
    
         
            +
                def exemption_reason_3ds2=(val)
         
     | 
| 
      
 311 
     | 
    
         
            +
                  @exemption_reason_3ds2 = val
         
     | 
| 
      
 312 
     | 
    
         
            +
                end
         
     | 
| 
      
 313 
     | 
    
         
            +
                
         
     | 
| 
      
 314 
     | 
    
         
            +
                def sca_exemption_reason=(val)
         
     | 
| 
      
 315 
     | 
    
         
            +
                  @sca_exemption_reason = val
         
     | 
| 
      
 316 
     | 
    
         
            +
                end
         
     | 
| 
      
 317 
     | 
    
         
            +
                
         
     | 
| 
      
 318 
     | 
    
         
            +
                def challenge_indicator=(val)
         
     | 
| 
      
 319 
     | 
    
         
            +
                  @challenge_indicator = val
         
     | 
| 
      
 320 
     | 
    
         
            +
                end
         
     | 
| 
      
 321 
     | 
    
         
            +
                
         
     | 
| 
       290 
322 
     | 
    
         | 
| 
       291 
323 
     | 
    
         
             
                # Initializes the Invoice object
         
     | 
| 
       292 
324 
     | 
    
         
             
                # Params:
         
     | 
| 
         @@ -328,6 +360,10 @@ module ProcessOut 
     | 
|
| 
       328 
360 
     | 
    
         
             
                  self.risk = data.fetch(:risk, nil)
         
     | 
| 
       329 
361 
     | 
    
         
             
                  self.shipping = data.fetch(:shipping, nil)
         
     | 
| 
       330 
362 
     | 
    
         
             
                  self.device = data.fetch(:device, nil)
         
     | 
| 
      
 363 
     | 
    
         
            +
                  self.external_fraud_tools = data.fetch(:external_fraud_tools, nil)
         
     | 
| 
      
 364 
     | 
    
         
            +
                  self.exemption_reason_3ds2 = data.fetch(:exemption_reason_3ds2, nil)
         
     | 
| 
      
 365 
     | 
    
         
            +
                  self.sca_exemption_reason = data.fetch(:sca_exemption_reason, nil)
         
     | 
| 
      
 366 
     | 
    
         
            +
                  self.challenge_indicator = data.fetch(:challenge_indicator, nil)
         
     | 
| 
       331 
367 
     | 
    
         | 
| 
       332 
368 
     | 
    
         
             
                end
         
     | 
| 
       333 
369 
     | 
    
         | 
| 
         @@ -372,6 +408,10 @@ module ProcessOut 
     | 
|
| 
       372 
408 
     | 
    
         
             
                      "risk": self.risk,
         
     | 
| 
       373 
409 
     | 
    
         
             
                      "shipping": self.shipping,
         
     | 
| 
       374 
410 
     | 
    
         
             
                      "device": self.device,
         
     | 
| 
      
 411 
     | 
    
         
            +
                      "external_fraud_tools": self.external_fraud_tools,
         
     | 
| 
      
 412 
     | 
    
         
            +
                      "exemption_reason_3ds2": self.exemption_reason_3ds2,
         
     | 
| 
      
 413 
     | 
    
         
            +
                      "sca_exemption_reason": self.sca_exemption_reason,
         
     | 
| 
      
 414 
     | 
    
         
            +
                      "challenge_indicator": self.challenge_indicator,
         
     | 
| 
       375 
415 
     | 
    
         
             
                  }.to_json
         
     | 
| 
       376 
416 
     | 
    
         
             
                end
         
     | 
| 
       377 
417 
     | 
    
         | 
| 
         @@ -481,6 +521,18 @@ module ProcessOut 
     | 
|
| 
       481 
521 
     | 
    
         
             
                  if data.include? "device"
         
     | 
| 
       482 
522 
     | 
    
         
             
                    self.device = data["device"]
         
     | 
| 
       483 
523 
     | 
    
         
             
                  end
         
     | 
| 
      
 524 
     | 
    
         
            +
                  if data.include? "external_fraud_tools"
         
     | 
| 
      
 525 
     | 
    
         
            +
                    self.external_fraud_tools = data["external_fraud_tools"]
         
     | 
| 
      
 526 
     | 
    
         
            +
                  end
         
     | 
| 
      
 527 
     | 
    
         
            +
                  if data.include? "exemption_reason_3ds2"
         
     | 
| 
      
 528 
     | 
    
         
            +
                    self.exemption_reason_3ds2 = data["exemption_reason_3ds2"]
         
     | 
| 
      
 529 
     | 
    
         
            +
                  end
         
     | 
| 
      
 530 
     | 
    
         
            +
                  if data.include? "sca_exemption_reason"
         
     | 
| 
      
 531 
     | 
    
         
            +
                    self.sca_exemption_reason = data["sca_exemption_reason"]
         
     | 
| 
      
 532 
     | 
    
         
            +
                  end
         
     | 
| 
      
 533 
     | 
    
         
            +
                  if data.include? "challenge_indicator"
         
     | 
| 
      
 534 
     | 
    
         
            +
                    self.challenge_indicator = data["challenge_indicator"]
         
     | 
| 
      
 535 
     | 
    
         
            +
                  end
         
     | 
| 
       484 
536 
     | 
    
         | 
| 
       485 
537 
     | 
    
         
             
                  self
         
     | 
| 
       486 
538 
     | 
    
         
             
                end
         
     | 
| 
         @@ -525,6 +577,10 @@ module ProcessOut 
     | 
|
| 
       525 
577 
     | 
    
         
             
                  self.risk = data.fetch(:risk, self.risk)
         
     | 
| 
       526 
578 
     | 
    
         
             
                  self.shipping = data.fetch(:shipping, self.shipping)
         
     | 
| 
       527 
579 
     | 
    
         
             
                  self.device = data.fetch(:device, self.device)
         
     | 
| 
      
 580 
     | 
    
         
            +
                  self.external_fraud_tools = data.fetch(:external_fraud_tools, self.external_fraud_tools)
         
     | 
| 
      
 581 
     | 
    
         
            +
                  self.exemption_reason_3ds2 = data.fetch(:exemption_reason_3ds2, self.exemption_reason_3ds2)
         
     | 
| 
      
 582 
     | 
    
         
            +
                  self.sca_exemption_reason = data.fetch(:sca_exemption_reason, self.sca_exemption_reason)
         
     | 
| 
      
 583 
     | 
    
         
            +
                  self.challenge_indicator = data.fetch(:challenge_indicator, self.challenge_indicator)
         
     | 
| 
       528 
584 
     | 
    
         | 
| 
       529 
585 
     | 
    
         
             
                  self
         
     | 
| 
       530 
586 
     | 
    
         
             
                end
         
     | 
| 
         @@ -760,6 +816,9 @@ module ProcessOut 
     | 
|
| 
       760 
816 
     | 
    
         
             
                    "currency" => @currency, 
         
     | 
| 
       761 
817 
     | 
    
         
             
                    "metadata" => @metadata, 
         
     | 
| 
       762 
818 
     | 
    
         
             
                    "details" => @details, 
         
     | 
| 
      
 819 
     | 
    
         
            +
                    "exemption_reason_3ds2" => @exemption_reason_3ds2, 
         
     | 
| 
      
 820 
     | 
    
         
            +
                    "sca_exemption_reason" => @sca_exemption_reason, 
         
     | 
| 
      
 821 
     | 
    
         
            +
                    "challenge_indicator" => @challenge_indicator, 
         
     | 
| 
       763 
822 
     | 
    
         
             
                    "gateway_data" => @gateway_data, 
         
     | 
| 
       764 
823 
     | 
    
         
             
                    "merchant_initiator_type" => @merchant_initiator_type, 
         
     | 
| 
       765 
824 
     | 
    
         
             
                    "statement_descriptor" => @statement_descriptor, 
         
     | 
| 
         @@ -773,7 +832,8 @@ module ProcessOut 
     | 
|
| 
       773 
832 
     | 
    
         
             
                    "risk" => @risk, 
         
     | 
| 
       774 
833 
     | 
    
         
             
                    "shipping" => @shipping, 
         
     | 
| 
       775 
834 
     | 
    
         
             
                    "device" => @device, 
         
     | 
| 
       776 
     | 
    
         
            -
                    "require_backend_capture" => @require_backend_capture
         
     | 
| 
      
 835 
     | 
    
         
            +
                    "require_backend_capture" => @require_backend_capture, 
         
     | 
| 
      
 836 
     | 
    
         
            +
                    "external_fraud_tools" => @external_fraud_tools
         
     | 
| 
       777 
837 
     | 
    
         
             
                  }
         
     | 
| 
       778 
838 
     | 
    
         | 
| 
       779 
839 
     | 
    
         
             
                  response = Response.new(request.post(path, data, options))
         
     | 
| 
         @@ -10,6 +10,7 @@ module ProcessOut 
     | 
|
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
                attr_reader :channel
         
     | 
| 
       12 
12 
     | 
    
         
             
                attr_reader :ip_address
         
     | 
| 
      
 13 
     | 
    
         
            +
                attr_reader :id
         
     | 
| 
       13 
14 
     | 
    
         | 
| 
       14 
15 
     | 
    
         | 
| 
       15 
16 
     | 
    
         
             
                def channel=(val)
         
     | 
| 
         @@ -20,6 +21,10 @@ module ProcessOut 
     | 
|
| 
       20 
21 
     | 
    
         
             
                  @ip_address = val
         
     | 
| 
       21 
22 
     | 
    
         
             
                end
         
     | 
| 
       22 
23 
     | 
    
         | 
| 
      
 24 
     | 
    
         
            +
                def id=(val)
         
     | 
| 
      
 25 
     | 
    
         
            +
                  @id = val
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
                
         
     | 
| 
       23 
28 
     | 
    
         | 
| 
       24 
29 
     | 
    
         
             
                # Initializes the InvoiceDevice object
         
     | 
| 
       25 
30 
     | 
    
         
             
                # Params:
         
     | 
| 
         @@ -30,6 +35,7 @@ module ProcessOut 
     | 
|
| 
       30 
35 
     | 
    
         | 
| 
       31 
36 
     | 
    
         
             
                  self.channel = data.fetch(:channel, nil)
         
     | 
| 
       32 
37 
     | 
    
         
             
                  self.ip_address = data.fetch(:ip_address, nil)
         
     | 
| 
      
 38 
     | 
    
         
            +
                  self.id = data.fetch(:id, nil)
         
     | 
| 
       33 
39 
     | 
    
         | 
| 
       34 
40 
     | 
    
         
             
                end
         
     | 
| 
       35 
41 
     | 
    
         | 
| 
         @@ -43,6 +49,7 @@ module ProcessOut 
     | 
|
| 
       43 
49 
     | 
    
         
             
                  {
         
     | 
| 
       44 
50 
     | 
    
         
             
                      "channel": self.channel,
         
     | 
| 
       45 
51 
     | 
    
         
             
                      "ip_address": self.ip_address,
         
     | 
| 
      
 52 
     | 
    
         
            +
                      "id": self.id,
         
     | 
| 
       46 
53 
     | 
    
         
             
                  }.to_json
         
     | 
| 
       47 
54 
     | 
    
         
             
                end
         
     | 
| 
       48 
55 
     | 
    
         | 
| 
         @@ -59,6 +66,9 @@ module ProcessOut 
     | 
|
| 
       59 
66 
     | 
    
         
             
                  if data.include? "ip_address"
         
     | 
| 
       60 
67 
     | 
    
         
             
                    self.ip_address = data["ip_address"]
         
     | 
| 
       61 
68 
     | 
    
         
             
                  end
         
     | 
| 
      
 69 
     | 
    
         
            +
                  if data.include? "id"
         
     | 
| 
      
 70 
     | 
    
         
            +
                    self.id = data["id"]
         
     | 
| 
      
 71 
     | 
    
         
            +
                  end
         
     | 
| 
       62 
72 
     | 
    
         | 
| 
       63 
73 
     | 
    
         
             
                  self
         
     | 
| 
       64 
74 
     | 
    
         
             
                end
         
     | 
| 
         @@ -72,6 +82,7 @@ module ProcessOut 
     | 
|
| 
       72 
82 
     | 
    
         
             
                  end
         
     | 
| 
       73 
83 
     | 
    
         
             
                  self.channel = data.fetch(:channel, self.channel)
         
     | 
| 
       74 
84 
     | 
    
         
             
                  self.ip_address = data.fetch(:ip_address, self.ip_address)
         
     | 
| 
      
 85 
     | 
    
         
            +
                  self.id = data.fetch(:id, self.id)
         
     | 
| 
       75 
86 
     | 
    
         | 
| 
       76 
87 
     | 
    
         
             
                  self
         
     | 
| 
       77 
88 
     | 
    
         
             
                end
         
     | 
| 
         @@ -0,0 +1,70 @@ 
     | 
|
| 
      
 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 InvoiceExternalFraudTools
         
     | 
| 
      
 10 
     | 
    
         
            +
                
         
     | 
| 
      
 11 
     | 
    
         
            +
                attr_reader :forter
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                
         
     | 
| 
      
 14 
     | 
    
         
            +
                def forter=(val)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  @forter = val
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
                
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                # Initializes the InvoiceExternalFraudTools object
         
     | 
| 
      
 20 
     | 
    
         
            +
                # Params:
         
     | 
| 
      
 21 
     | 
    
         
            +
                # +client+:: +ProcessOut+ client instance
         
     | 
| 
      
 22 
     | 
    
         
            +
                # +data+:: data that can be used to fill the object
         
     | 
| 
      
 23 
     | 
    
         
            +
                def initialize(client, data = {})
         
     | 
| 
      
 24 
     | 
    
         
            +
                  @client = client
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                  self.forter = data.fetch(:forter, nil)
         
     | 
| 
      
 27 
     | 
    
         
            +
                  
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                # Create a new InvoiceExternalFraudTools using the current client
         
     | 
| 
      
 31 
     | 
    
         
            +
                def new(data = {})
         
     | 
| 
      
 32 
     | 
    
         
            +
                  InvoiceExternalFraudTools.new(@client, data)
         
     | 
| 
      
 33 
     | 
    
         
            +
                end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                # Overrides the JSON marshaller to only send the fields we want
         
     | 
| 
      
 36 
     | 
    
         
            +
                def to_json(options)
         
     | 
| 
      
 37 
     | 
    
         
            +
                  {
         
     | 
| 
      
 38 
     | 
    
         
            +
                      "forter": self.forter,
         
     | 
| 
      
 39 
     | 
    
         
            +
                  }.to_json
         
     | 
| 
      
 40 
     | 
    
         
            +
                end
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                # Fills the object with data coming from the API
         
     | 
| 
      
 43 
     | 
    
         
            +
                # Params:
         
     | 
| 
      
 44 
     | 
    
         
            +
                # +data+:: +Hash+ of data coming from the API
         
     | 
| 
      
 45 
     | 
    
         
            +
                def fill_with_data(data)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  if data.nil?
         
     | 
| 
      
 47 
     | 
    
         
            +
                    return self
         
     | 
| 
      
 48 
     | 
    
         
            +
                  end
         
     | 
| 
      
 49 
     | 
    
         
            +
                  if data.include? "forter"
         
     | 
| 
      
 50 
     | 
    
         
            +
                    self.forter = data["forter"]
         
     | 
| 
      
 51 
     | 
    
         
            +
                  end
         
     | 
| 
      
 52 
     | 
    
         
            +
                  
         
     | 
| 
      
 53 
     | 
    
         
            +
                  self
         
     | 
| 
      
 54 
     | 
    
         
            +
                end
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
                # Prefills the object with the data passed as parameters
         
     | 
| 
      
 57 
     | 
    
         
            +
                # Params:
         
     | 
| 
      
 58 
     | 
    
         
            +
                # +data+:: +Hash+ of data
         
     | 
| 
      
 59 
     | 
    
         
            +
                def prefill(data)
         
     | 
| 
      
 60 
     | 
    
         
            +
                  if data.nil?
         
     | 
| 
      
 61 
     | 
    
         
            +
                    return self
         
     | 
| 
      
 62 
     | 
    
         
            +
                  end
         
     | 
| 
      
 63 
     | 
    
         
            +
                  self.forter = data.fetch(:forter, self.forter)
         
     | 
| 
      
 64 
     | 
    
         
            +
                  
         
     | 
| 
      
 65 
     | 
    
         
            +
                  self
         
     | 
| 
      
 66 
     | 
    
         
            +
                end
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
                
         
     | 
| 
      
 69 
     | 
    
         
            +
              end
         
     | 
| 
      
 70 
     | 
    
         
            +
            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/2.14. 
     | 
| 
      
 16 
     | 
    
         
            +
                  req["User-Agent"] = "ProcessOut Ruby-Bindings/2.14.4"
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                  unless options.nil?
         
     | 
| 
       19 
19 
     | 
    
         
             
                    req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
         
     | 
| 
         @@ -0,0 +1,103 @@ 
     | 
|
| 
      
 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 ThreeDS
         
     | 
| 
      
 10 
     | 
    
         
            +
                
         
     | 
| 
      
 11 
     | 
    
         
            +
                attr_reader :version
         
     | 
| 
      
 12 
     | 
    
         
            +
                attr_reader :status
         
     | 
| 
      
 13 
     | 
    
         
            +
                attr_reader :fingerprinted
         
     | 
| 
      
 14 
     | 
    
         
            +
                attr_reader :challenged
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                
         
     | 
| 
      
 17 
     | 
    
         
            +
                def version=(val)
         
     | 
| 
      
 18 
     | 
    
         
            +
                  @version = val
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
                
         
     | 
| 
      
 21 
     | 
    
         
            +
                def status=(val)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @status = val
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
                
         
     | 
| 
      
 25 
     | 
    
         
            +
                def fingerprinted=(val)
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @fingerprinted = val
         
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
                
         
     | 
| 
      
 29 
     | 
    
         
            +
                def challenged=(val)
         
     | 
| 
      
 30 
     | 
    
         
            +
                  @challenged = val
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
                
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                # Initializes the ThreeDS object
         
     | 
| 
      
 35 
     | 
    
         
            +
                # Params:
         
     | 
| 
      
 36 
     | 
    
         
            +
                # +client+:: +ProcessOut+ client instance
         
     | 
| 
      
 37 
     | 
    
         
            +
                # +data+:: data that can be used to fill the object
         
     | 
| 
      
 38 
     | 
    
         
            +
                def initialize(client, data = {})
         
     | 
| 
      
 39 
     | 
    
         
            +
                  @client = client
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                  self.version = data.fetch(:version, nil)
         
     | 
| 
      
 42 
     | 
    
         
            +
                  self.status = data.fetch(:status, nil)
         
     | 
| 
      
 43 
     | 
    
         
            +
                  self.fingerprinted = data.fetch(:fingerprinted, nil)
         
     | 
| 
      
 44 
     | 
    
         
            +
                  self.challenged = data.fetch(:challenged, nil)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  
         
     | 
| 
      
 46 
     | 
    
         
            +
                end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                # Create a new ThreeDS using the current client
         
     | 
| 
      
 49 
     | 
    
         
            +
                def new(data = {})
         
     | 
| 
      
 50 
     | 
    
         
            +
                  ThreeDS.new(@client, data)
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                # Overrides the JSON marshaller to only send the fields we want
         
     | 
| 
      
 54 
     | 
    
         
            +
                def to_json(options)
         
     | 
| 
      
 55 
     | 
    
         
            +
                  {
         
     | 
| 
      
 56 
     | 
    
         
            +
                      "Version": self.version,
         
     | 
| 
      
 57 
     | 
    
         
            +
                      "Status": self.status,
         
     | 
| 
      
 58 
     | 
    
         
            +
                      "fingerprinted": self.fingerprinted,
         
     | 
| 
      
 59 
     | 
    
         
            +
                      "challenged": self.challenged,
         
     | 
| 
      
 60 
     | 
    
         
            +
                  }.to_json
         
     | 
| 
      
 61 
     | 
    
         
            +
                end
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                # Fills the object with data coming from the API
         
     | 
| 
      
 64 
     | 
    
         
            +
                # Params:
         
     | 
| 
      
 65 
     | 
    
         
            +
                # +data+:: +Hash+ of data coming from the API
         
     | 
| 
      
 66 
     | 
    
         
            +
                def fill_with_data(data)
         
     | 
| 
      
 67 
     | 
    
         
            +
                  if data.nil?
         
     | 
| 
      
 68 
     | 
    
         
            +
                    return self
         
     | 
| 
      
 69 
     | 
    
         
            +
                  end
         
     | 
| 
      
 70 
     | 
    
         
            +
                  if data.include? "Version"
         
     | 
| 
      
 71 
     | 
    
         
            +
                    self.version = data["Version"]
         
     | 
| 
      
 72 
     | 
    
         
            +
                  end
         
     | 
| 
      
 73 
     | 
    
         
            +
                  if data.include? "Status"
         
     | 
| 
      
 74 
     | 
    
         
            +
                    self.status = data["Status"]
         
     | 
| 
      
 75 
     | 
    
         
            +
                  end
         
     | 
| 
      
 76 
     | 
    
         
            +
                  if data.include? "fingerprinted"
         
     | 
| 
      
 77 
     | 
    
         
            +
                    self.fingerprinted = data["fingerprinted"]
         
     | 
| 
      
 78 
     | 
    
         
            +
                  end
         
     | 
| 
      
 79 
     | 
    
         
            +
                  if data.include? "challenged"
         
     | 
| 
      
 80 
     | 
    
         
            +
                    self.challenged = data["challenged"]
         
     | 
| 
      
 81 
     | 
    
         
            +
                  end
         
     | 
| 
      
 82 
     | 
    
         
            +
                  
         
     | 
| 
      
 83 
     | 
    
         
            +
                  self
         
     | 
| 
      
 84 
     | 
    
         
            +
                end
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
                # Prefills the object with the data passed as parameters
         
     | 
| 
      
 87 
     | 
    
         
            +
                # Params:
         
     | 
| 
      
 88 
     | 
    
         
            +
                # +data+:: +Hash+ of data
         
     | 
| 
      
 89 
     | 
    
         
            +
                def prefill(data)
         
     | 
| 
      
 90 
     | 
    
         
            +
                  if data.nil?
         
     | 
| 
      
 91 
     | 
    
         
            +
                    return self
         
     | 
| 
      
 92 
     | 
    
         
            +
                  end
         
     | 
| 
      
 93 
     | 
    
         
            +
                  self.version = data.fetch(:version, self.version)
         
     | 
| 
      
 94 
     | 
    
         
            +
                  self.status = data.fetch(:status, self.status)
         
     | 
| 
      
 95 
     | 
    
         
            +
                  self.fingerprinted = data.fetch(:fingerprinted, self.fingerprinted)
         
     | 
| 
      
 96 
     | 
    
         
            +
                  self.challenged = data.fetch(:challenged, self.challenged)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  
         
     | 
| 
      
 98 
     | 
    
         
            +
                  self
         
     | 
| 
      
 99 
     | 
    
         
            +
                end
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
      
 101 
     | 
    
         
            +
                
         
     | 
| 
      
 102 
     | 
    
         
            +
              end
         
     | 
| 
      
 103 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/processout/token.rb
    CHANGED
    
    | 
         @@ -21,8 +21,12 @@ module ProcessOut 
     | 
|
| 
       21 
21 
     | 
    
         
             
                attr_reader :is_default
         
     | 
| 
       22 
22 
     | 
    
         
             
                attr_reader :return_url
         
     | 
| 
       23 
23 
     | 
    
         
             
                attr_reader :cancel_url
         
     | 
| 
      
 24 
     | 
    
         
            +
                attr_reader :summary
         
     | 
| 
       24 
25 
     | 
    
         
             
                attr_reader :is_chargeable
         
     | 
| 
       25 
26 
     | 
    
         
             
                attr_reader :created_at
         
     | 
| 
      
 27 
     | 
    
         
            +
                attr_reader :description
         
     | 
| 
      
 28 
     | 
    
         
            +
                attr_reader :invoice
         
     | 
| 
      
 29 
     | 
    
         
            +
                attr_reader :invoice_id
         
     | 
| 
       26 
30 
     | 
    
         | 
| 
       27 
31 
     | 
    
         | 
| 
       28 
32 
     | 
    
         
             
                def id=(val)
         
     | 
| 
         @@ -113,6 +117,10 @@ module ProcessOut 
     | 
|
| 
       113 
117 
     | 
    
         
             
                  @cancel_url = val
         
     | 
| 
       114 
118 
     | 
    
         
             
                end
         
     | 
| 
       115 
119 
     | 
    
         | 
| 
      
 120 
     | 
    
         
            +
                def summary=(val)
         
     | 
| 
      
 121 
     | 
    
         
            +
                  @summary = val
         
     | 
| 
      
 122 
     | 
    
         
            +
                end
         
     | 
| 
      
 123 
     | 
    
         
            +
                
         
     | 
| 
       116 
124 
     | 
    
         
             
                def is_chargeable=(val)
         
     | 
| 
       117 
125 
     | 
    
         
             
                  @is_chargeable = val
         
     | 
| 
       118 
126 
     | 
    
         
             
                end
         
     | 
| 
         @@ -121,6 +129,30 @@ module ProcessOut 
     | 
|
| 
       121 
129 
     | 
    
         
             
                  @created_at = val
         
     | 
| 
       122 
130 
     | 
    
         
             
                end
         
     | 
| 
       123 
131 
     | 
    
         | 
| 
      
 132 
     | 
    
         
            +
                def description=(val)
         
     | 
| 
      
 133 
     | 
    
         
            +
                  @description = val
         
     | 
| 
      
 134 
     | 
    
         
            +
                end
         
     | 
| 
      
 135 
     | 
    
         
            +
                
         
     | 
| 
      
 136 
     | 
    
         
            +
                def invoice=(val)
         
     | 
| 
      
 137 
     | 
    
         
            +
                  if val.nil?
         
     | 
| 
      
 138 
     | 
    
         
            +
                    @invoice = val
         
     | 
| 
      
 139 
     | 
    
         
            +
                    return
         
     | 
| 
      
 140 
     | 
    
         
            +
                  end
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
      
 142 
     | 
    
         
            +
                  if val.instance_of? Invoice
         
     | 
| 
      
 143 
     | 
    
         
            +
                    @invoice = val
         
     | 
| 
      
 144 
     | 
    
         
            +
                  else
         
     | 
| 
      
 145 
     | 
    
         
            +
                    obj = Invoice.new(@client)
         
     | 
| 
      
 146 
     | 
    
         
            +
                    obj.fill_with_data(val)
         
     | 
| 
      
 147 
     | 
    
         
            +
                    @invoice = obj
         
     | 
| 
      
 148 
     | 
    
         
            +
                  end
         
     | 
| 
      
 149 
     | 
    
         
            +
                  
         
     | 
| 
      
 150 
     | 
    
         
            +
                end
         
     | 
| 
      
 151 
     | 
    
         
            +
                
         
     | 
| 
      
 152 
     | 
    
         
            +
                def invoice_id=(val)
         
     | 
| 
      
 153 
     | 
    
         
            +
                  @invoice_id = val
         
     | 
| 
      
 154 
     | 
    
         
            +
                end
         
     | 
| 
      
 155 
     | 
    
         
            +
                
         
     | 
| 
       124 
156 
     | 
    
         | 
| 
       125 
157 
     | 
    
         
             
                # Initializes the Token object
         
     | 
| 
       126 
158 
     | 
    
         
             
                # Params:
         
     | 
| 
         @@ -142,8 +174,12 @@ module ProcessOut 
     | 
|
| 
       142 
174 
     | 
    
         
             
                  self.is_default = data.fetch(:is_default, nil)
         
     | 
| 
       143 
175 
     | 
    
         
             
                  self.return_url = data.fetch(:return_url, nil)
         
     | 
| 
       144 
176 
     | 
    
         
             
                  self.cancel_url = data.fetch(:cancel_url, nil)
         
     | 
| 
      
 177 
     | 
    
         
            +
                  self.summary = data.fetch(:summary, nil)
         
     | 
| 
       145 
178 
     | 
    
         
             
                  self.is_chargeable = data.fetch(:is_chargeable, nil)
         
     | 
| 
       146 
179 
     | 
    
         
             
                  self.created_at = data.fetch(:created_at, nil)
         
     | 
| 
      
 180 
     | 
    
         
            +
                  self.description = data.fetch(:description, nil)
         
     | 
| 
      
 181 
     | 
    
         
            +
                  self.invoice = data.fetch(:invoice, nil)
         
     | 
| 
      
 182 
     | 
    
         
            +
                  self.invoice_id = data.fetch(:invoice_id, nil)
         
     | 
| 
       147 
183 
     | 
    
         | 
| 
       148 
184 
     | 
    
         
             
                end
         
     | 
| 
       149 
185 
     | 
    
         | 
| 
         @@ -168,8 +204,12 @@ module ProcessOut 
     | 
|
| 
       168 
204 
     | 
    
         
             
                      "is_default": self.is_default,
         
     | 
| 
       169 
205 
     | 
    
         
             
                      "return_url": self.return_url,
         
     | 
| 
       170 
206 
     | 
    
         
             
                      "cancel_url": self.cancel_url,
         
     | 
| 
      
 207 
     | 
    
         
            +
                      "summary": self.summary,
         
     | 
| 
       171 
208 
     | 
    
         
             
                      "is_chargeable": self.is_chargeable,
         
     | 
| 
       172 
209 
     | 
    
         
             
                      "created_at": self.created_at,
         
     | 
| 
      
 210 
     | 
    
         
            +
                      "description": self.description,
         
     | 
| 
      
 211 
     | 
    
         
            +
                      "invoice": self.invoice,
         
     | 
| 
      
 212 
     | 
    
         
            +
                      "invoice_id": self.invoice_id,
         
     | 
| 
       173 
213 
     | 
    
         
             
                  }.to_json
         
     | 
| 
       174 
214 
     | 
    
         
             
                end
         
     | 
| 
       175 
215 
     | 
    
         | 
| 
         @@ -219,12 +259,24 @@ module ProcessOut 
     | 
|
| 
       219 
259 
     | 
    
         
             
                  if data.include? "cancel_url"
         
     | 
| 
       220 
260 
     | 
    
         
             
                    self.cancel_url = data["cancel_url"]
         
     | 
| 
       221 
261 
     | 
    
         
             
                  end
         
     | 
| 
      
 262 
     | 
    
         
            +
                  if data.include? "summary"
         
     | 
| 
      
 263 
     | 
    
         
            +
                    self.summary = data["summary"]
         
     | 
| 
      
 264 
     | 
    
         
            +
                  end
         
     | 
| 
       222 
265 
     | 
    
         
             
                  if data.include? "is_chargeable"
         
     | 
| 
       223 
266 
     | 
    
         
             
                    self.is_chargeable = data["is_chargeable"]
         
     | 
| 
       224 
267 
     | 
    
         
             
                  end
         
     | 
| 
       225 
268 
     | 
    
         
             
                  if data.include? "created_at"
         
     | 
| 
       226 
269 
     | 
    
         
             
                    self.created_at = data["created_at"]
         
     | 
| 
       227 
270 
     | 
    
         
             
                  end
         
     | 
| 
      
 271 
     | 
    
         
            +
                  if data.include? "description"
         
     | 
| 
      
 272 
     | 
    
         
            +
                    self.description = data["description"]
         
     | 
| 
      
 273 
     | 
    
         
            +
                  end
         
     | 
| 
      
 274 
     | 
    
         
            +
                  if data.include? "invoice"
         
     | 
| 
      
 275 
     | 
    
         
            +
                    self.invoice = data["invoice"]
         
     | 
| 
      
 276 
     | 
    
         
            +
                  end
         
     | 
| 
      
 277 
     | 
    
         
            +
                  if data.include? "invoice_id"
         
     | 
| 
      
 278 
     | 
    
         
            +
                    self.invoice_id = data["invoice_id"]
         
     | 
| 
      
 279 
     | 
    
         
            +
                  end
         
     | 
| 
       228 
280 
     | 
    
         | 
| 
       229 
281 
     | 
    
         
             
                  self
         
     | 
| 
       230 
282 
     | 
    
         
             
                end
         
     | 
| 
         @@ -249,8 +301,12 @@ module ProcessOut 
     | 
|
| 
       249 
301 
     | 
    
         
             
                  self.is_default = data.fetch(:is_default, self.is_default)
         
     | 
| 
       250 
302 
     | 
    
         
             
                  self.return_url = data.fetch(:return_url, self.return_url)
         
     | 
| 
       251 
303 
     | 
    
         
             
                  self.cancel_url = data.fetch(:cancel_url, self.cancel_url)
         
     | 
| 
      
 304 
     | 
    
         
            +
                  self.summary = data.fetch(:summary, self.summary)
         
     | 
| 
       252 
305 
     | 
    
         
             
                  self.is_chargeable = data.fetch(:is_chargeable, self.is_chargeable)
         
     | 
| 
       253 
306 
     | 
    
         
             
                  self.created_at = data.fetch(:created_at, self.created_at)
         
     | 
| 
      
 307 
     | 
    
         
            +
                  self.description = data.fetch(:description, self.description)
         
     | 
| 
      
 308 
     | 
    
         
            +
                  self.invoice = data.fetch(:invoice, self.invoice)
         
     | 
| 
      
 309 
     | 
    
         
            +
                  self.invoice_id = data.fetch(:invoice_id, self.invoice_id)
         
     | 
| 
       254 
310 
     | 
    
         | 
| 
       255 
311 
     | 
    
         
             
                  self
         
     | 
| 
       256 
312 
     | 
    
         
             
                end
         
     | 
| 
         @@ -327,6 +383,7 @@ module ProcessOut 
     | 
|
| 
       327 
383 
     | 
    
         
             
                    "metadata" => @metadata, 
         
     | 
| 
       328 
384 
     | 
    
         
             
                    "return_url" => @return_url, 
         
     | 
| 
       329 
385 
     | 
    
         
             
                    "cancel_url" => @cancel_url, 
         
     | 
| 
      
 386 
     | 
    
         
            +
                    "description" => @description, 
         
     | 
| 
       330 
387 
     | 
    
         
             
                    "source" => options.fetch(:source, nil), 
         
     | 
| 
       331 
388 
     | 
    
         
             
                    "settings" => options.fetch(:settings, nil), 
         
     | 
| 
       332 
389 
     | 
    
         
             
                    "device" => options.fetch(:device, nil), 
         
     | 
| 
         @@ -38,6 +38,7 @@ module ProcessOut 
     | 
|
| 
       38 
38 
     | 
    
         
             
                attr_reader :available_amount_local
         
     | 
| 
       39 
39 
     | 
    
         
             
                attr_reader :currency
         
     | 
| 
       40 
40 
     | 
    
         
             
                attr_reader :error_code
         
     | 
| 
      
 41 
     | 
    
         
            +
                attr_reader :error_message
         
     | 
| 
       41 
42 
     | 
    
         
             
                attr_reader :gateway_name
         
     | 
| 
       42 
43 
     | 
    
         
             
                attr_reader :three_d_s_status
         
     | 
| 
       43 
44 
     | 
    
         
             
                attr_reader :status
         
     | 
| 
         @@ -58,6 +59,9 @@ module ProcessOut 
     | 
|
| 
       58 
59 
     | 
    
         
             
                attr_reader :created_at
         
     | 
| 
       59 
60 
     | 
    
         
             
                attr_reader :chargedback_at
         
     | 
| 
       60 
61 
     | 
    
         
             
                attr_reader :refunded_at
         
     | 
| 
      
 62 
     | 
    
         
            +
                attr_reader :three_d_s
         
     | 
| 
      
 63 
     | 
    
         
            +
                attr_reader :cvc_check
         
     | 
| 
      
 64 
     | 
    
         
            +
                attr_reader :avs_check
         
     | 
| 
       61 
65 
     | 
    
         | 
| 
       62 
66 
     | 
    
         | 
| 
       63 
67 
     | 
    
         
             
                def id=(val)
         
     | 
| 
         @@ -296,6 +300,10 @@ module ProcessOut 
     | 
|
| 
       296 
300 
     | 
    
         
             
                  @error_code = val
         
     | 
| 
       297 
301 
     | 
    
         
             
                end
         
     | 
| 
       298 
302 
     | 
    
         | 
| 
      
 303 
     | 
    
         
            +
                def error_message=(val)
         
     | 
| 
      
 304 
     | 
    
         
            +
                  @error_message = val
         
     | 
| 
      
 305 
     | 
    
         
            +
                end
         
     | 
| 
      
 306 
     | 
    
         
            +
                
         
     | 
| 
       299 
307 
     | 
    
         
             
                def gateway_name=(val)
         
     | 
| 
       300 
308 
     | 
    
         
             
                  @gateway_name = val
         
     | 
| 
       301 
309 
     | 
    
         
             
                end
         
     | 
| 
         @@ -376,6 +384,30 @@ module ProcessOut 
     | 
|
| 
       376 
384 
     | 
    
         
             
                  @refunded_at = val
         
     | 
| 
       377 
385 
     | 
    
         
             
                end
         
     | 
| 
       378 
386 
     | 
    
         | 
| 
      
 387 
     | 
    
         
            +
                def three_d_s=(val)
         
     | 
| 
      
 388 
     | 
    
         
            +
                  if val.nil?
         
     | 
| 
      
 389 
     | 
    
         
            +
                    @three_d_s = val
         
     | 
| 
      
 390 
     | 
    
         
            +
                    return
         
     | 
| 
      
 391 
     | 
    
         
            +
                  end
         
     | 
| 
      
 392 
     | 
    
         
            +
             
     | 
| 
      
 393 
     | 
    
         
            +
                  if val.instance_of? ThreeDS
         
     | 
| 
      
 394 
     | 
    
         
            +
                    @three_d_s = val
         
     | 
| 
      
 395 
     | 
    
         
            +
                  else
         
     | 
| 
      
 396 
     | 
    
         
            +
                    obj = ThreeDS.new(@client)
         
     | 
| 
      
 397 
     | 
    
         
            +
                    obj.fill_with_data(val)
         
     | 
| 
      
 398 
     | 
    
         
            +
                    @three_d_s = obj
         
     | 
| 
      
 399 
     | 
    
         
            +
                  end
         
     | 
| 
      
 400 
     | 
    
         
            +
                  
         
     | 
| 
      
 401 
     | 
    
         
            +
                end
         
     | 
| 
      
 402 
     | 
    
         
            +
                
         
     | 
| 
      
 403 
     | 
    
         
            +
                def cvc_check=(val)
         
     | 
| 
      
 404 
     | 
    
         
            +
                  @cvc_check = val
         
     | 
| 
      
 405 
     | 
    
         
            +
                end
         
     | 
| 
      
 406 
     | 
    
         
            +
                
         
     | 
| 
      
 407 
     | 
    
         
            +
                def avs_check=(val)
         
     | 
| 
      
 408 
     | 
    
         
            +
                  @avs_check = val
         
     | 
| 
      
 409 
     | 
    
         
            +
                end
         
     | 
| 
      
 410 
     | 
    
         
            +
                
         
     | 
| 
       379 
411 
     | 
    
         | 
| 
       380 
412 
     | 
    
         
             
                # Initializes the Transaction object
         
     | 
| 
       381 
413 
     | 
    
         
             
                # Params:
         
     | 
| 
         @@ -414,6 +446,7 @@ module ProcessOut 
     | 
|
| 
       414 
446 
     | 
    
         
             
                  self.available_amount_local = data.fetch(:available_amount_local, nil)
         
     | 
| 
       415 
447 
     | 
    
         
             
                  self.currency = data.fetch(:currency, nil)
         
     | 
| 
       416 
448 
     | 
    
         
             
                  self.error_code = data.fetch(:error_code, nil)
         
     | 
| 
      
 449 
     | 
    
         
            +
                  self.error_message = data.fetch(:error_message, nil)
         
     | 
| 
       417 
450 
     | 
    
         
             
                  self.gateway_name = data.fetch(:gateway_name, nil)
         
     | 
| 
       418 
451 
     | 
    
         
             
                  self.three_d_s_status = data.fetch(:three_d_s_status, nil)
         
     | 
| 
       419 
452 
     | 
    
         
             
                  self.status = data.fetch(:status, nil)
         
     | 
| 
         @@ -434,6 +467,9 @@ module ProcessOut 
     | 
|
| 
       434 
467 
     | 
    
         
             
                  self.created_at = data.fetch(:created_at, nil)
         
     | 
| 
       435 
468 
     | 
    
         
             
                  self.chargedback_at = data.fetch(:chargedback_at, nil)
         
     | 
| 
       436 
469 
     | 
    
         
             
                  self.refunded_at = data.fetch(:refunded_at, nil)
         
     | 
| 
      
 470 
     | 
    
         
            +
                  self.three_d_s = data.fetch(:three_d_s, nil)
         
     | 
| 
      
 471 
     | 
    
         
            +
                  self.cvc_check = data.fetch(:cvc_check, nil)
         
     | 
| 
      
 472 
     | 
    
         
            +
                  self.avs_check = data.fetch(:avs_check, nil)
         
     | 
| 
       437 
473 
     | 
    
         | 
| 
       438 
474 
     | 
    
         
             
                end
         
     | 
| 
       439 
475 
     | 
    
         | 
| 
         @@ -475,6 +511,7 @@ module ProcessOut 
     | 
|
| 
       475 
511 
     | 
    
         
             
                      "available_amount_local": self.available_amount_local,
         
     | 
| 
       476 
512 
     | 
    
         
             
                      "currency": self.currency,
         
     | 
| 
       477 
513 
     | 
    
         
             
                      "error_code": self.error_code,
         
     | 
| 
      
 514 
     | 
    
         
            +
                      "error_message": self.error_message,
         
     | 
| 
       478 
515 
     | 
    
         
             
                      "gateway_name": self.gateway_name,
         
     | 
| 
       479 
516 
     | 
    
         
             
                      "three_d_s_status": self.three_d_s_status,
         
     | 
| 
       480 
517 
     | 
    
         
             
                      "status": self.status,
         
     | 
| 
         @@ -495,6 +532,9 @@ module ProcessOut 
     | 
|
| 
       495 
532 
     | 
    
         
             
                      "created_at": self.created_at,
         
     | 
| 
       496 
533 
     | 
    
         
             
                      "chargedback_at": self.chargedback_at,
         
     | 
| 
       497 
534 
     | 
    
         
             
                      "refunded_at": self.refunded_at,
         
     | 
| 
      
 535 
     | 
    
         
            +
                      "three_d_s": self.three_d_s,
         
     | 
| 
      
 536 
     | 
    
         
            +
                      "cvc_check": self.cvc_check,
         
     | 
| 
      
 537 
     | 
    
         
            +
                      "avs_check": self.avs_check,
         
     | 
| 
       498 
538 
     | 
    
         
             
                  }.to_json
         
     | 
| 
       499 
539 
     | 
    
         
             
                end
         
     | 
| 
       500 
540 
     | 
    
         | 
| 
         @@ -595,6 +635,9 @@ module ProcessOut 
     | 
|
| 
       595 
635 
     | 
    
         
             
                  if data.include? "error_code"
         
     | 
| 
       596 
636 
     | 
    
         
             
                    self.error_code = data["error_code"]
         
     | 
| 
       597 
637 
     | 
    
         
             
                  end
         
     | 
| 
      
 638 
     | 
    
         
            +
                  if data.include? "error_message"
         
     | 
| 
      
 639 
     | 
    
         
            +
                    self.error_message = data["error_message"]
         
     | 
| 
      
 640 
     | 
    
         
            +
                  end
         
     | 
| 
       598 
641 
     | 
    
         
             
                  if data.include? "gateway_name"
         
     | 
| 
       599 
642 
     | 
    
         
             
                    self.gateway_name = data["gateway_name"]
         
     | 
| 
       600 
643 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -655,6 +698,15 @@ module ProcessOut 
     | 
|
| 
       655 
698 
     | 
    
         
             
                  if data.include? "refunded_at"
         
     | 
| 
       656 
699 
     | 
    
         
             
                    self.refunded_at = data["refunded_at"]
         
     | 
| 
       657 
700 
     | 
    
         
             
                  end
         
     | 
| 
      
 701 
     | 
    
         
            +
                  if data.include? "three_d_s"
         
     | 
| 
      
 702 
     | 
    
         
            +
                    self.three_d_s = data["three_d_s"]
         
     | 
| 
      
 703 
     | 
    
         
            +
                  end
         
     | 
| 
      
 704 
     | 
    
         
            +
                  if data.include? "cvc_check"
         
     | 
| 
      
 705 
     | 
    
         
            +
                    self.cvc_check = data["cvc_check"]
         
     | 
| 
      
 706 
     | 
    
         
            +
                  end
         
     | 
| 
      
 707 
     | 
    
         
            +
                  if data.include? "avs_check"
         
     | 
| 
      
 708 
     | 
    
         
            +
                    self.avs_check = data["avs_check"]
         
     | 
| 
      
 709 
     | 
    
         
            +
                  end
         
     | 
| 
       658 
710 
     | 
    
         | 
| 
       659 
711 
     | 
    
         
             
                  self
         
     | 
| 
       660 
712 
     | 
    
         
             
                end
         
     | 
| 
         @@ -696,6 +748,7 @@ module ProcessOut 
     | 
|
| 
       696 
748 
     | 
    
         
             
                  self.available_amount_local = data.fetch(:available_amount_local, self.available_amount_local)
         
     | 
| 
       697 
749 
     | 
    
         
             
                  self.currency = data.fetch(:currency, self.currency)
         
     | 
| 
       698 
750 
     | 
    
         
             
                  self.error_code = data.fetch(:error_code, self.error_code)
         
     | 
| 
      
 751 
     | 
    
         
            +
                  self.error_message = data.fetch(:error_message, self.error_message)
         
     | 
| 
       699 
752 
     | 
    
         
             
                  self.gateway_name = data.fetch(:gateway_name, self.gateway_name)
         
     | 
| 
       700 
753 
     | 
    
         
             
                  self.three_d_s_status = data.fetch(:three_d_s_status, self.three_d_s_status)
         
     | 
| 
       701 
754 
     | 
    
         
             
                  self.status = data.fetch(:status, self.status)
         
     | 
| 
         @@ -716,6 +769,9 @@ module ProcessOut 
     | 
|
| 
       716 
769 
     | 
    
         
             
                  self.created_at = data.fetch(:created_at, self.created_at)
         
     | 
| 
       717 
770 
     | 
    
         
             
                  self.chargedback_at = data.fetch(:chargedback_at, self.chargedback_at)
         
     | 
| 
       718 
771 
     | 
    
         
             
                  self.refunded_at = data.fetch(:refunded_at, self.refunded_at)
         
     | 
| 
      
 772 
     | 
    
         
            +
                  self.three_d_s = data.fetch(:three_d_s, self.three_d_s)
         
     | 
| 
      
 773 
     | 
    
         
            +
                  self.cvc_check = data.fetch(:cvc_check, self.cvc_check)
         
     | 
| 
      
 774 
     | 
    
         
            +
                  self.avs_check = data.fetch(:avs_check, self.avs_check)
         
     | 
| 
       719 
775 
     | 
    
         | 
| 
       720 
776 
     | 
    
         
             
                  self
         
     | 
| 
       721 
777 
     | 
    
         
             
                end
         
     | 
    
        data/lib/processout/version.rb
    CHANGED
    
    
    
        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: 2.14. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.14.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Manuel HUEZ
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-02-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -94,6 +94,7 @@ files: 
     | 
|
| 
       94 
94 
     | 
    
         
             
            - lib/processout/invoice.rb
         
     | 
| 
       95 
95 
     | 
    
         
             
            - lib/processout/invoice_detail.rb
         
     | 
| 
       96 
96 
     | 
    
         
             
            - lib/processout/invoice_device.rb
         
     | 
| 
      
 97 
     | 
    
         
            +
            - lib/processout/invoice_external_fraud_tools.rb
         
     | 
| 
       97 
98 
     | 
    
         
             
            - lib/processout/invoice_risk.rb
         
     | 
| 
       98 
99 
     | 
    
         
             
            - lib/processout/invoice_shipping.rb
         
     | 
| 
       99 
100 
     | 
    
         
             
            - lib/processout/networking/request.rb
         
     | 
| 
         @@ -108,6 +109,7 @@ files: 
     | 
|
| 
       108 
109 
     | 
    
         
             
            - lib/processout/project.rb
         
     | 
| 
       109 
110 
     | 
    
         
             
            - lib/processout/refund.rb
         
     | 
| 
       110 
111 
     | 
    
         
             
            - lib/processout/subscription.rb
         
     | 
| 
      
 112 
     | 
    
         
            +
            - lib/processout/three_ds.rb
         
     | 
| 
       111 
113 
     | 
    
         
             
            - lib/processout/token.rb
         
     | 
| 
       112 
114 
     | 
    
         
             
            - lib/processout/transaction.rb
         
     | 
| 
       113 
115 
     | 
    
         
             
            - lib/processout/transaction_operation.rb
         
     | 
| 
         @@ -134,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       134 
136 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       135 
137 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       136 
138 
     | 
    
         
             
            requirements: []
         
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
            rubygems_version: 2.5.2.3
         
     | 
| 
      
 139 
     | 
    
         
            +
            rubygems_version: 3.0.3
         
     | 
| 
       139 
140 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       140 
141 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       141 
142 
     | 
    
         
             
            summary: Ruby bindings for the ProcessOut API
         
     |