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.
@@ -0,0 +1,116 @@
1
+ module Tpaga
2
+ #
3
+ class CreditCardCharge < BaseObject
4
+ attr_accessor :id, :amount, :tax_amount, :currency, :credit_card, :installments, :order_id, :description, :paid, :customer, :payment_transaction
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'id' => :'id',
11
+
12
+ #
13
+ :'amount' => :'amount',
14
+
15
+ #
16
+ :'tax_amount' => :'taxAmount',
17
+
18
+ # 3-letter ISO code for currency.
19
+ :'currency' => :'currency',
20
+
21
+ #
22
+ :'credit_card' => :'creditCard',
23
+
24
+ # The amount of payments to divide the charge amount.
25
+ :'installments' => :'installments',
26
+
27
+ #
28
+ :'order_id' => :'orderId',
29
+
30
+ #
31
+ :'description' => :'description',
32
+
33
+ #
34
+ :'paid' => :'paid',
35
+
36
+ #
37
+ :'customer' => :'customer',
38
+
39
+ #
40
+ :'payment_transaction' => :'paymentTransaction'
41
+
42
+ }
43
+ end
44
+
45
+ # attribute type
46
+ def self.swagger_types
47
+ {
48
+ :'id' => :'string',
49
+ :'amount' => :'number',
50
+ :'tax_amount' => :'number',
51
+ :'currency' => :'string',
52
+ :'credit_card' => :'string',
53
+ :'installments' => :'number',
54
+ :'order_id' => :'string',
55
+ :'description' => :'string',
56
+ :'paid' => :'boolean',
57
+ :'customer' => :'string',
58
+ :'payment_transaction' => :'string'
59
+
60
+ }
61
+ end
62
+
63
+ def initialize(attributes = {})
64
+ return if !attributes.is_a?(Hash) || attributes.empty?
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
68
+
69
+
70
+ if attributes[:'id']
71
+ @id = attributes[:'id']
72
+ end
73
+
74
+ if attributes[:'amount']
75
+ @amount = attributes[:'amount']
76
+ end
77
+
78
+ if attributes[:'taxAmount']
79
+ @tax_amount = attributes[:'taxAmount']
80
+ end
81
+
82
+ if attributes[:'currency']
83
+ @currency = attributes[:'currency']
84
+ end
85
+
86
+ if attributes[:'creditCard']
87
+ @credit_card = attributes[:'creditCard']
88
+ end
89
+
90
+ if attributes[:'installments']
91
+ @installments = attributes[:'installments']
92
+ end
93
+
94
+ if attributes[:'orderId']
95
+ @order_id = attributes[:'orderId']
96
+ end
97
+
98
+ if attributes[:'description']
99
+ @description = attributes[:'description']
100
+ end
101
+
102
+ if attributes[:'paid']
103
+ @paid = attributes[:'paid']
104
+ end
105
+
106
+ if attributes[:'customer']
107
+ @customer = attributes[:'customer']
108
+ end
109
+
110
+ if attributes[:'paymentTransaction']
111
+ @payment_transaction = attributes[:'paymentTransaction']
112
+ end
113
+
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,76 @@
1
+ module Tpaga
2
+ #
3
+ class CreditCardCreate < BaseObject
4
+ attr_accessor :primary_account_number, :expiration_month, :expiration_year, :card_verification_code, :card_holder_name, :billing_address
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'primary_account_number' => :'primaryAccountNumber',
11
+
12
+ #
13
+ :'expiration_month' => :'expirationMonth',
14
+
15
+ #
16
+ :'expiration_year' => :'expirationYear',
17
+
18
+ #
19
+ :'card_verification_code' => :'cardVerificationCode',
20
+
21
+ #
22
+ :'card_holder_name' => :'cardHolderName',
23
+
24
+ #
25
+ :'billing_address' => :'billingAddress'
26
+
27
+ }
28
+ end
29
+
30
+ # attribute type
31
+ def self.swagger_types
32
+ {
33
+ :'primary_account_number' => :'string',
34
+ :'expiration_month' => :'string',
35
+ :'expiration_year' => :'string',
36
+ :'card_verification_code' => :'string',
37
+ :'card_holder_name' => :'string',
38
+ :'billing_address' => :'BillingAddress'
39
+
40
+ }
41
+ end
42
+
43
+ def initialize(attributes = {})
44
+ return if !attributes.is_a?(Hash) || attributes.empty?
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
48
+
49
+
50
+ if attributes[:'primaryAccountNumber']
51
+ @primary_account_number = attributes[:'primaryAccountNumber']
52
+ end
53
+
54
+ if attributes[:'expirationMonth']
55
+ @expiration_month = attributes[:'expirationMonth']
56
+ end
57
+
58
+ if attributes[:'expirationYear']
59
+ @expiration_year = attributes[:'expirationYear']
60
+ end
61
+
62
+ if attributes[:'cardVerificationCode']
63
+ @card_verification_code = attributes[:'cardVerificationCode']
64
+ end
65
+
66
+ if attributes[:'cardHolderName']
67
+ @card_holder_name = attributes[:'cardHolderName']
68
+ end
69
+
70
+ if attributes[:'billingAddress']
71
+ @billing_address = attributes[:'billingAddress']
72
+ end
73
+
74
+ end
75
+ end
76
+ end
@@ -1,79 +1,84 @@
1
- require 'date'
2
-
3
1
  module Tpaga
4
- class Customer
5
- attr_accessor :address, :email, :firstName, :gender, :id, :lastName, :phone
2
+ #
3
+ class Customer < BaseObject
4
+ attr_accessor :id, :first_name, :last_name, :email, :gender, :phone, :address
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'id' => :'id',
11
+
12
+ #
13
+ :'first_name' => :'firstName',
14
+
15
+ #
16
+ :'last_name' => :'lastName',
17
+
18
+ #
19
+ :'email' => :'email',
20
+
21
+ #
22
+ :'gender' => :'gender',
23
+
24
+ #
25
+ :'phone' => :'phone',
26
+
27
+ #
28
+ :'address' => :'address'
29
+
30
+ }
31
+ end
6
32
 
7
- # :internal => :external
8
- def self.attribute_map
9
- {
10
- :address => :'address',
11
- :email => :'email',
12
- :firstName => :'firstName',
13
- :gender => :'gender',
14
- :id => :'id',
15
- :lastName => :'lastName',
16
- :phone => :'phone'
33
+ # attribute type
34
+ def self.swagger_types
35
+ {
36
+ :'id' => :'string',
37
+ :'first_name' => :'string',
38
+ :'last_name' => :'string',
39
+ :'email' => :'string',
40
+ :'gender' => :'string',
41
+ :'phone' => :'string',
42
+ :'address' => :'Address'
43
+
44
+ }
45
+ end
17
46
 
18
- }
19
- end
47
+ def initialize(attributes = {})
48
+ return if !attributes.is_a?(Hash) || attributes.empty?
20
49
 
21
- def initialize(attributes = {})
22
- return if attributes.empty?
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
23
52
 
24
- # convert hash key from symbol to string
25
- # and convert object to hash
26
- attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_s] = Swagger.to_body(v); memo}
27
-
28
- # Morph attribute keys into undescored rubyish style
29
- if self.class.attribute_map[:"address"]
30
- @address = Address.new(attributes["address"]) if (attributes["address"].kind_of? Hash)
31
- end
32
- if self.class.attribute_map[:"email"]
33
- @email = attributes["email"]
53
+
54
+ if attributes[:'id']
55
+ @id = attributes[:'id']
34
56
  end
35
- if self.class.attribute_map[:"firstName"]
36
- @firstName = attributes["firstName"]
57
+
58
+ if attributes[:'firstName']
59
+ @first_name = attributes[:'firstName']
37
60
  end
38
- if self.class.attribute_map[:"gender"]
39
- @gender = attributes["gender"]
61
+
62
+ if attributes[:'lastName']
63
+ @last_name = attributes[:'lastName']
40
64
  end
41
- if self.class.attribute_map[:"id"]
42
- @id = attributes["id"]
65
+
66
+ if attributes[:'email']
67
+ @email = attributes[:'email']
43
68
  end
44
- if self.class.attribute_map[:"lastName"]
45
- @lastName = attributes["lastName"]
69
+
70
+ if attributes[:'gender']
71
+ @gender = attributes[:'gender']
46
72
  end
47
- if self.class.attribute_map[:"phone"]
48
- @phone = attributes["phone"]
73
+
74
+ if attributes[:'phone']
75
+ @phone = attributes[:'phone']
49
76
  end
50
-
51
-
52
- end
53
-
54
- def to_body
55
- body = {}
56
- self.class.attribute_map.each_pair do |key, value|
57
- next if self.send(key).nil?
58
-
59
- if self.send(key).respond_to? :to_body
60
- body[value] = self.send(key).to_body
61
- elsif self.send(key).kind_of?(Array)
62
- body[value] = []
63
- self.send(key).each do |arr|
64
- if arr.respond_to? :to_body
65
- body[value] << arr.to_body
66
- else
67
- body[value] << arr
68
- end
69
- end
70
- else
71
- body[value] = self.send(key)
77
+
78
+ if attributes[:'address']
79
+ @address = attributes[:'address']
72
80
  end
73
81
 
74
82
  end
75
- body
76
83
  end
77
84
  end
78
- end
79
-
@@ -0,0 +1,92 @@
1
+ module Tpaga
2
+ #
3
+ class DaviPlata < BaseObject
4
+ attr_accessor :id, :number, :document_number, :document_type, :last_four, :customer, :verified, :max_amount
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'id' => :'id',
11
+
12
+ #
13
+ :'number' => :'number',
14
+
15
+ #
16
+ :'document_number' => :'documentNumber',
17
+
18
+ #
19
+ :'document_type' => :'documentType',
20
+
21
+ #
22
+ :'last_four' => :'lastFour',
23
+
24
+ #
25
+ :'customer' => :'customer',
26
+
27
+ #
28
+ :'verified' => :'verified',
29
+
30
+ #
31
+ :'max_amount' => :'maxAmount'
32
+
33
+ }
34
+ end
35
+
36
+ # attribute type
37
+ def self.swagger_types
38
+ {
39
+ :'id' => :'string',
40
+ :'number' => :'string',
41
+ :'document_number' => :'string',
42
+ :'document_type' => :'string',
43
+ :'last_four' => :'string',
44
+ :'customer' => :'string',
45
+ :'verified' => :'boolean',
46
+ :'max_amount' => :'number'
47
+
48
+ }
49
+ end
50
+
51
+ def initialize(attributes = {})
52
+ return if !attributes.is_a?(Hash) || attributes.empty?
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.inject({}) { |memo, (k, v)| memo[k.to_sym] = v; memo }
56
+
57
+
58
+ if attributes[:'id']
59
+ @id = attributes[:'id']
60
+ end
61
+
62
+ if attributes[:'number']
63
+ @number = attributes[:'number']
64
+ end
65
+
66
+ if attributes[:'documentNumber']
67
+ @document_number = attributes[:'documentNumber']
68
+ end
69
+
70
+ if attributes[:'documentType']
71
+ @document_type = attributes[:'documentType']
72
+ end
73
+
74
+ if attributes[:'lastFour']
75
+ @last_four = attributes[:'lastFour']
76
+ end
77
+
78
+ if attributes[:'customer']
79
+ @customer = attributes[:'customer']
80
+ end
81
+
82
+ if attributes[:'verified']
83
+ @verified = attributes[:'verified']
84
+ end
85
+
86
+ if attributes[:'maxAmount']
87
+ @max_amount = attributes[:'maxAmount']
88
+ end
89
+
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,108 @@
1
+ module Tpaga
2
+ #
3
+ class DaviPlataCharge < BaseObject
4
+ attr_accessor :id, :amount, :tax_amount, :currency, :davi_plata, :order_id, :description, :paid, :customer, :payment_transaction
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'id' => :'id',
11
+
12
+ #
13
+ :'amount' => :'amount',
14
+
15
+ #
16
+ :'tax_amount' => :'taxAmount',
17
+
18
+ # 3-letter ISO code for currency.
19
+ :'currency' => :'currency',
20
+
21
+ #
22
+ :'davi_plata' => :'daviPlata',
23
+
24
+ #
25
+ :'order_id' => :'orderId',
26
+
27
+ #
28
+ :'description' => :'description',
29
+
30
+ #
31
+ :'paid' => :'paid',
32
+
33
+ #
34
+ :'customer' => :'customer',
35
+
36
+ #
37
+ :'payment_transaction' => :'paymentTransaction'
38
+
39
+ }
40
+ end
41
+
42
+ # attribute type
43
+ def self.swagger_types
44
+ {
45
+ :'id' => :'string',
46
+ :'amount' => :'number',
47
+ :'tax_amount' => :'number',
48
+ :'currency' => :'string',
49
+ :'davi_plata' => :'string',
50
+ :'order_id' => :'string',
51
+ :'description' => :'string',
52
+ :'paid' => :'boolean',
53
+ :'customer' => :'string',
54
+ :'payment_transaction' => :'string'
55
+
56
+ }
57
+ end
58
+
59
+ def initialize(attributes = {})
60
+ return if !attributes.is_a?(Hash) || attributes.empty?
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
64
+
65
+
66
+ if attributes[:'id']
67
+ @id = attributes[:'id']
68
+ end
69
+
70
+ if attributes[:'amount']
71
+ @amount = attributes[:'amount']
72
+ end
73
+
74
+ if attributes[:'taxAmount']
75
+ @tax_amount = attributes[:'taxAmount']
76
+ end
77
+
78
+ if attributes[:'currency']
79
+ @currency = attributes[:'currency']
80
+ end
81
+
82
+ if attributes[:'daviPlata']
83
+ @davi_plata = attributes[:'daviPlata']
84
+ end
85
+
86
+ if attributes[:'orderId']
87
+ @order_id = attributes[:'orderId']
88
+ end
89
+
90
+ if attributes[:'description']
91
+ @description = attributes[:'description']
92
+ end
93
+
94
+ if attributes[:'paid']
95
+ @paid = attributes[:'paid']
96
+ end
97
+
98
+ if attributes[:'customer']
99
+ @customer = attributes[:'customer']
100
+ end
101
+
102
+ if attributes[:'paymentTransaction']
103
+ @payment_transaction = attributes[:'paymentTransaction']
104
+ end
105
+
106
+ end
107
+ end
108
+ end