compropago_sdk 3.0.3 → 3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9146fb6454176c0e98c84ecb623c2168871bf5ea
4
- data.tar.gz: d77a7f88dcaaa7927b9368ff32df910a14f5806c
3
+ metadata.gz: db4d31eed3978d5e11ff595c1c61f3794886736b
4
+ data.tar.gz: bfa256fc3c4f55e23bbc885bb2765384898969e4
5
5
  SHA512:
6
- metadata.gz: 90165947e6dc6898c2b83fafb30553c7d8281df4c0e48227aec0f8cb73898d519299132002b693f740a663a3fb6814a9e259e728af7d08d629f81db18d68bd39
7
- data.tar.gz: 3778861eb921b422c0a91655c958d0aee4e41930ee408d574d543582df2193a36e1478c59c2bc52f7eb6206f80ed1063266f86c00e649f4971d009893af37edf
6
+ metadata.gz: e210aaca4e78961f11b2b74127b349e54ea8e08c587e17795f83933e29a201327c23540c3ba9702bbe3eb98d24ad89fcf4f55e2143a40a0f2836b43ed1c6e68c
7
+ data.tar.gz: 18a280c42b7067294becc6b34fd64d70076768e6830aa2a5e317fc5fea28f343224717175cdf94cdb9e6d97975b6afb47b9ee4487934c73a7f834e3b51a0f0eb
@@ -3,7 +3,7 @@ class Client
3
3
  API_LIVE_URI = 'https://api.compropago.com/v1/'
4
4
  API_SANDBOX_URI = 'https://api.compropago.com/v1/'
5
5
 
6
- VERSION = '3.0.3'
6
+ VERSION = '3.0.4'
7
7
 
8
8
  attr_accessor :publickey, :privatekey, :live, :deploy_uri, :api
9
9
 
@@ -0,0 +1,11 @@
1
+ class Exchange
2
+
3
+ attr_accessor :rate
4
+ attr_accessor :request
5
+ attr_accessor :origin_amount
6
+ attr_accessor :final_amount
7
+ attr_accessor :origin_currency
8
+ attr_accessor :final_currency
9
+ attr_accessor :exchange_id
10
+
11
+ end
@@ -1,12 +1,11 @@
1
1
  class FeeDetails
2
2
 
3
3
  attr_accessor :amount
4
+ attr_accessor :tax
5
+ attr_accessor :tax_percent
4
6
  attr_accessor :currency
5
7
  attr_accessor :type
6
8
  attr_accessor :description
7
- attr_accessor :application
8
- attr_accessor :tax_percent
9
9
  attr_accessor :amount_refunded
10
- attr_accessor :tax
11
10
 
12
11
  end
@@ -1,16 +1,16 @@
1
1
  class InstructionDetails
2
2
 
3
- attr_accessor :amount
4
- attr_accessor :store
5
3
  attr_accessor :payment_amount
6
4
  attr_accessor :payment_store
7
- attr_accessor :bank_account_holder_name
5
+ attr_accessor :amount
6
+ attr_accessor :store
8
7
  attr_accessor :bank_account_number
9
- attr_accessor :bank_reference
10
8
  attr_accessor :company_reference_name
11
9
  attr_accessor :company_reference_number
12
10
  attr_accessor :company_bank_number
13
11
  attr_accessor :order_reference_number
12
+ attr_accessor :bank_account_holder_name
13
+ attr_accessor :bank_reference
14
14
  attr_accessor :bank_name
15
15
 
16
16
  end
@@ -10,6 +10,7 @@ class NewOrderInfo
10
10
  attr_accessor :order_info
11
11
  attr_accessor :fee_details
12
12
  attr_accessor :instructions
13
+ attr_accessor :api_version
13
14
 
14
15
  def initialize
15
16
  @order_info = OrderInfo.new
@@ -1,12 +1,12 @@
1
1
  class OrderInfo
2
2
 
3
3
  attr_accessor :order_id
4
- attr_accessor :order_price
5
4
  attr_accessor :order_name
6
- attr_accessor :payment_method
7
- attr_accessor :store
8
- attr_accessor :country
5
+ attr_accessor :order_price
9
6
  attr_accessor :image_url
10
- attr_accessor :success_url
7
+ attr_accessor :exchange
11
8
 
9
+ def initialize
10
+ @exchange = Exchange.new
11
+ end
12
12
  end
@@ -39,7 +39,7 @@ class Serialize
39
39
 
40
40
  obj.fee_details = Serialize::fee_details(data['fee_details'])
41
41
  obj.order_info = Serialize::order_info(data['order_info'])
42
- obj.customer.customer_name = Serialize::customer(data['customer'])
42
+ obj.customer = Serialize::customer(data['customer'])
43
43
 
44
44
  obj.captured = data['captured']
45
45
  obj.failure_message = data['failure_message']
@@ -89,13 +89,12 @@ class Serialize
89
89
  obj = FeeDetails.new
90
90
 
91
91
  obj.amount = data['amount'] ? data['amount'] : nil
92
+ obj.tax = data['tax'] ? data['tax'] : nil
93
+ obj.tax_percent = data['tax_percent'] ? data['tax_percent'] : nil
92
94
  obj.currency = data['currency'] ? data['currency'] : nil
93
95
  obj.type = data['type'] ? data['type'] : nil
94
96
  obj.description = data['description'] ? data['description'] : nil
95
- obj.application = data['application'] ? data['application'] : nil
96
- obj.tax_percent = data['tax_percent'] ? data['tax_percent'] : nil
97
97
  obj.amount_refunded = data['amount_refunded'] ? data['amount_refunded'] : nil
98
- obj.tax = data['tax'] ? data['tax'] : nil
99
98
 
100
99
  return obj
101
100
  end
@@ -107,17 +106,17 @@ class Serialize
107
106
  else
108
107
  obj = InstructionDetails.new
109
108
 
110
- obj.amount = data['amount'] ? data['amount'] : nil
111
- obj.store = data['store'] ? data['store'] : nil
112
109
  obj.payment_amount = data['payment_amount'] ? data['payment_amount'] : nil
113
110
  obj.payment_store = data['payment_store'] ? data['payment_store'] : nil
114
- obj.bank_account_holder_name = data['bank_account_holder_name'] ? data['bank_account_holder_name'] : nil
115
- obj.bank_account_number = data['bank_accont_number'] ? data['bank_accont_number'] : nil
116
- obj.bank_reference = data['bank_reference'] ? data['bank_reference'] : nil
111
+ obj.amount = data['amount'] ? data['amount'] : nil
112
+ obj.store = data['store'] ? data['store'] : nil
113
+ obj.bank_account_number = data['bank_account_number'] ? data['bank_account_number'] : nil
117
114
  obj.company_reference_name = data['company_reference_name'] ? data['company_reference_name'] : nil
118
115
  obj.company_reference_number = data['company_reference_number'] ? data['company_reference_number'] : nil
119
116
  obj.company_bank_number = data['company_bank_number'] ? data['company_bank_number'] : nil
120
117
  obj.order_reference_number = data['order_reference_number'] ? data['order_reference_number'] : nil
118
+ obj.bank_account_holder_name = data['bank_account_holder_name'] ? data['bank_account_holder_name'] : nil
119
+ obj.bank_reference = data['bank_reference'] ? data['bank_reference'] : nil
121
120
  obj.bank_name = data['bank_name'] ? data['bank_name'] : nil
122
121
 
123
122
  return obj
@@ -160,6 +159,7 @@ class Serialize
160
159
  obj.order_info = Serialize::order_info(data['order_info'])
161
160
  obj.fee_details = Serialize::fee_details(data['fee_details'])
162
161
  obj.instructions = Serialize::instructions(data['instructions'])
162
+ obj.api_version = data['api_version']
163
163
 
164
164
  return obj
165
165
  end
@@ -172,13 +172,28 @@ class Serialize
172
172
  obj = OrderInfo.new
173
173
 
174
174
  obj.order_id = data['order_id'] ? data['order_id'] : nil
175
- obj.order_price = data['order_price'] ? data['order_price'] : nil
176
175
  obj.order_name = data['order_name'] ? data['order_name'] : nil
177
- obj.payment_method = data['payment_method'] ? data['payment_method'] : nil
178
- obj.store = data['store'] ? data['store'] : nil
179
- obj.country = data['country'] ? data['country'] : nil
176
+ obj.order_price = data['order_price'] ? data['order_price'] : nil
180
177
  obj.image_url = data['image_url'] ? data['image_url'] : nil
181
- obj.success_url = data['success_url'] ? data['success_url'] : nil
178
+ obj.exchange = Serialize::exchange(data['exchange'])
179
+
180
+ return obj
181
+ end
182
+ end
183
+
184
+ def self.exchange(data=nil)
185
+ if data.nil?
186
+ return Exchange.new
187
+ else
188
+ obj = Exchange.new
189
+
190
+ obj.rate = data['rate'] ? data['rate'] : nil
191
+ obj.request = data['request'] ? data['request'] : nil
192
+ obj.origin_amount = data['origin_amount'] ? data['origin_amount'] : nil
193
+ obj.final_amount = data['final_amount'] ? data['final_amount'] : nil
194
+ obj.origin_currency = data['origin_currency'] ? data['origin_currency'] : nil
195
+ obj.final_currency = data['final_currency'] ? data['final_currency'] : nil
196
+ obj.exchange_id = data['exchange_id'] ? data['exchange_id'] : nil
182
197
 
183
198
  return obj
184
199
  end
@@ -22,6 +22,7 @@ require 'compropago_sdk/factory/models/instruction_details'
22
22
  require 'compropago_sdk/factory/models/instructions'
23
23
  require 'compropago_sdk/factory/models/new_order_info'
24
24
  require 'compropago_sdk/factory/models/order_info'
25
+ require 'compropago_sdk/factory/models/exchange'
25
26
  require 'compropago_sdk/factory/models/place_order_info'
26
27
  require 'compropago_sdk/factory/models/provider'
27
28
  require 'compropago_sdk/factory/models/sms_data'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compropago_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Aguilar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-01 00:00:00.000000000 Z
11
+ date: 2017-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -65,6 +65,7 @@ files:
65
65
  - "./lib/compropago_sdk/factory/models/cp_order_info.rb"
66
66
  - "./lib/compropago_sdk/factory/models/customer.rb"
67
67
  - "./lib/compropago_sdk/factory/models/eval_auth_info.rb"
68
+ - "./lib/compropago_sdk/factory/models/exchange.rb"
68
69
  - "./lib/compropago_sdk/factory/models/fee_details.rb"
69
70
  - "./lib/compropago_sdk/factory/models/instruction_details.rb"
70
71
  - "./lib/compropago_sdk/factory/models/instructions.rb"