tpaga 0.0.3 → 0.0.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 +4 -4
- data/lib/tpaga.rb +28 -21
- data/lib/tpaga/api/charge_api.rb +133 -100
- data/lib/tpaga/api/chargeback_api.rb +88 -0
- data/lib/tpaga/api/credit_card_api.rb +220 -0
- data/lib/tpaga/api/customer_api.rb +84 -326
- data/lib/tpaga/api/davi_plata_api.rb +340 -0
- data/lib/tpaga/models/address.rb +47 -54
- data/lib/tpaga/models/api_error.rb +38 -0
- data/lib/tpaga/models/api_errors_item.rb +60 -0
- data/lib/tpaga/models/base_object.rb +85 -0
- data/lib/tpaga/models/billing_address.rb +76 -0
- data/lib/tpaga/models/city.rb +40 -51
- data/lib/tpaga/models/credit_card.rb +148 -0
- data/lib/tpaga/models/credit_card_charge.rb +116 -0
- data/lib/tpaga/models/credit_card_create.rb +76 -0
- data/lib/tpaga/models/customer.rb +68 -63
- data/lib/tpaga/models/davi_plata.rb +92 -0
- data/lib/tpaga/models/davi_plata_charge.rb +108 -0
- data/lib/tpaga/models/davi_plata_chargeback.rb +60 -0
- data/lib/tpaga/models/davi_plata_verification.rb +44 -0
- data/lib/tpaga/monkey.rb +1 -1
- data/lib/tpaga/swagger.rb +64 -87
- data/lib/tpaga/swagger/configuration.rb +24 -27
- data/lib/tpaga/swagger/request.rb +247 -192
- data/lib/tpaga/swagger/response.rb +52 -53
- data/lib/tpaga/swagger/version.rb +3 -4
- data/tpaga.gemspec +8 -9
- metadata +20 -12
- data/lib/tpaga/models/billingaddress.rb +0 -75
- data/lib/tpaga/models/charge.rb +0 -91
- data/lib/tpaga/models/creditcard.rb +0 -107
- data/lib/tpaga/models/creditcardcreate.rb +0 -75
@@ -1,75 +0,0 @@
|
|
1
|
-
require 'date'
|
2
|
-
|
3
|
-
module Tpaga
|
4
|
-
class CreditCardCreate
|
5
|
-
attr_accessor :billingAddress, :cardHolderName, :cardVerificationCode, :expirationMonth, :expirationYear, :primaryAccountNumber
|
6
|
-
|
7
|
-
# :internal => :external
|
8
|
-
def self.attribute_map
|
9
|
-
{
|
10
|
-
:billingAddress => :'billingAddress',
|
11
|
-
:cardHolderName => :'cardHolderName',
|
12
|
-
:cardVerificationCode => :'cardVerificationCode',
|
13
|
-
:expirationMonth => :'expirationMonth',
|
14
|
-
:expirationYear => :'expirationYear',
|
15
|
-
:primaryAccountNumber => :'primaryAccountNumber'
|
16
|
-
|
17
|
-
}
|
18
|
-
end
|
19
|
-
|
20
|
-
def initialize(attributes = {})
|
21
|
-
return if attributes.empty?
|
22
|
-
|
23
|
-
# convert hash key from symbol to string
|
24
|
-
# and convert object to hash
|
25
|
-
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_s] = Swagger.to_body(v); memo}
|
26
|
-
|
27
|
-
# Morph attribute keys into undescored rubyish style
|
28
|
-
if self.class.attribute_map[:"billingAddress"]
|
29
|
-
@billingAddress = BillingAddress.new(attributes["billingAddress"]) if (attributes["billingAddress"].kind_of? Hash)
|
30
|
-
end
|
31
|
-
if self.class.attribute_map[:"cardHolderName"]
|
32
|
-
@cardHolderName = attributes["cardHolderName"]
|
33
|
-
end
|
34
|
-
if self.class.attribute_map[:"cardVerificationCode"]
|
35
|
-
@cardVerificationCode = attributes["cardVerificationCode"]
|
36
|
-
end
|
37
|
-
if self.class.attribute_map[:"expirationMonth"]
|
38
|
-
@expirationMonth = attributes["expirationMonth"]
|
39
|
-
end
|
40
|
-
if self.class.attribute_map[:"expirationYear"]
|
41
|
-
@expirationYear = attributes["expirationYear"]
|
42
|
-
end
|
43
|
-
if self.class.attribute_map[:"primaryAccountNumber"]
|
44
|
-
@primaryAccountNumber = attributes["primaryAccountNumber"]
|
45
|
-
end
|
46
|
-
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
def to_body
|
51
|
-
body = {}
|
52
|
-
self.class.attribute_map.each_pair do |key, value|
|
53
|
-
next if self.send(key).nil?
|
54
|
-
|
55
|
-
if self.send(key).respond_to? :to_body
|
56
|
-
body[value] = self.send(key).to_body
|
57
|
-
elsif self.send(key).kind_of?(Array)
|
58
|
-
body[value] = []
|
59
|
-
self.send(key).each do |arr|
|
60
|
-
if arr.respond_to? :to_body
|
61
|
-
body[value] << arr.to_body
|
62
|
-
else
|
63
|
-
body[value] << arr
|
64
|
-
end
|
65
|
-
end
|
66
|
-
else
|
67
|
-
body[value] = self.send(key)
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
71
|
-
body
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|