stone_ecommerce 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3f4fc57ab11d12d82beeb343c68a8eddbd493287
4
+ data.tar.gz: 2a24685f37a3c698c20e822a164a1d45a2c395c3
5
+ SHA512:
6
+ metadata.gz: deab0289ef8dec7c89f275d5174b61622f06916458bc867bb6d157dd41a1f709bfbf0760c14d2d73cb290b0faea1203536a92870ee44ee83eba63c18e4486ee2
7
+ data.tar.gz: 40f877347602ac0213af2d43abcf5d0f9c7d6986c710ef2cd6002b0bbf7a089d1bb34926ad31e0e900dfa7338534099ae8573cbb3c0f2a884fffb3325a06b607
@@ -142,9 +142,9 @@ class Gateway
142
142
  end
143
143
 
144
144
  if shoppingCart.ShoppingCartItemCollection.any?
145
- shoppingCart.ShoppingCartItemCollection.each do |cartItem|
145
+ shoppingCart.ShoppingCartItemCollection.each_with_index do |cartItem, cartIndex|
146
146
  item = cartItem.to_json
147
- saleHash['ShoppingCartCollection'][index]['ShoppingCartItemCollection'] << item
147
+ saleHash['ShoppingCartCollection'][index]['ShoppingCartItemCollection'][cartIndex] = item
148
148
  end
149
149
  else
150
150
  saleHash['ShoppingCartCollection'][index]['ShoppingCartItemCollection'] = nil
@@ -1,7 +1,7 @@
1
1
  require_relative '../../lib/stone_ecommerce'
2
2
  require_relative 'test_helper'
3
3
 
4
- merchant_key = 'merchant_key'
4
+ merchant_key = '8A2DD57F-1ED9-4153-B4CE-69683EFADAD5'
5
5
  gateway = Gateway.new(:production, merchant_key)
6
6
 
7
7
  RSpec.describe Gateway do
@@ -83,131 +83,213 @@ RSpec.describe Gateway do
83
83
  end
84
84
 
85
85
  it 'should create a sale with all types of transactions and all fields filled' do
86
- buyerAddressItem = BuyerAddress.new
87
- buyerAddressItem.AddressType = 'Comercial'
88
- buyerAddressItem.City = 'Rio de Janeiro'
89
- buyerAddressItem.Complement = '10 Andar'
90
- buyerAddressItem.Country = 'Brazil'
91
- buyerAddressItem.District = 'Centro'
92
- buyerAddressItem.Number = '199'
93
- buyerAddressItem.State = 'RJ'
94
- buyerAddressItem.Street = 'Rua da Quitanda'
95
- buyerAddressItem.ZipCode = '20091005'
96
-
97
- boletoTransactionItem = BoletoTransaction.new
98
- boletoTransactionItem.AmountInCents = 350
99
- boletoTransactionItem.BankNumber = '237'
100
- boletoTransactionItem.BillingAddress.City = 'Rio de Janeiro'
101
- boletoTransactionItem.BillingAddress.Complement = '10º andar'
102
- boletoTransactionItem.BillingAddress.Country = 'Brazil'
103
- boletoTransactionItem.BillingAddress.District = 'Centro'
104
- boletoTransactionItem.BillingAddress.Number = '199'
105
- boletoTransactionItem.BillingAddress.State = 'RJ'
106
- boletoTransactionItem.BillingAddress.Street = 'Rua da Quitanda'
107
- boletoTransactionItem.BillingAddress.ZipCode = '20091005'
108
- boletoTransactionItem.DocumentNumber = '12345678901'
109
- boletoTransactionItem.Instructions = 'Pagar antes do vencimento'
110
- boletoTransactionItem.Options.CurrencyIso = 'BRL'
111
- boletoTransactionItem.Options.DaysToAddInBoletoExpirationDate = 7
112
- boletoTransactionItem.TransactionDateInMerchant = Date.new(2014, 11, 5).strftime("%Y-%m-%dT%H:%M:%S")
113
- boletoTransactionItem.TransactionReference = 'RubySDK-BoletoTransactionTest'
86
+ # creates boleto transaction object
87
+ boletoTransaction = BoletoTransaction.new
88
+
89
+ # 100 reais in cents
90
+ boletoTransaction.AmountInCents = 10000
91
+ boletoTransaction.BankNumber = '237'
92
+ boletoTransaction.BillingAddress.City = 'Tatooine'
93
+ boletoTransaction.BillingAddress.Complement = ''
94
+ boletoTransaction.BillingAddress.Country = 'Brazil'
95
+ boletoTransaction.BillingAddress.District = 'Mos Eisley'
96
+ boletoTransaction.BillingAddress.Number = '123'
97
+ boletoTransaction.BillingAddress.State = 'RJ'
98
+ boletoTransaction.BillingAddress.Street = 'Mos Eisley Cantina'
99
+ boletoTransaction.BillingAddress.ZipCode = '20001000'
100
+ boletoTransaction.DocumentNumber = '12345678901'
101
+ boletoTransaction.Instructions = 'Pagar antes do vencimento'
102
+ boletoTransaction.Options.CurrencyIso = 'BRL'
103
+ boletoTransaction.Options.DaysToAddInBoletoExpirationDate = 5
104
+ boletoTransaction.TransactionReference = 'NumeroDaTransacao'
114
105
 
115
- creditCardTransactionItem = CreditCardTransaction.new
116
- creditCardTransactionItem.AmountInCents = 750
117
- creditCardTransactionItem.CreditCardOperation = 'AuthAndCapture'
118
- creditCardTransactionItem.InstallmentCount = 1
119
- creditCardTransactionItem.TransactionDateInMerchant = Date.new(2014, 11, 5).strftime("%Y-%m-%dT%H:%M:%S")
120
- creditCardTransactionItem.TransactionReference = 'RubySDK-CreditCardTransactionTest'
121
- creditCardTransactionItem.Options.CaptureDelayInMinutes = 0
122
- creditCardTransactionItem.Options.CurrencyIso = 'BRL'
123
- creditCardTransactionItem.Options.ExtendedLimitCode = nil
124
- creditCardTransactionItem.Options.ExtendedLimitEnabled = false
125
- creditCardTransactionItem.Options.IataAmountInCents = 0
126
- creditCardTransactionItem.Options.InterestRate = 0
127
- creditCardTransactionItem.Options.MerchantCategoryCode = nil
128
- creditCardTransactionItem.Options.PaymentMethodCode = 1
129
- creditCardTransactionItem.Options.SoftDescriptorText = 'Nome da Loja'
130
- creditCardTransactionItem.Recurrency.DateToStartBilling = (Date.parse(Time.now.to_s)).strftime("%Y-%m-%dT%H:%M:%S")
131
- creditCardTransactionItem.Recurrency.Frequency = 'Monthly'
132
- creditCardTransactionItem.Recurrency.Interval = 1
133
- creditCardTransactionItem.Recurrency.OneDollarAuth = false
134
- creditCardTransactionItem.Recurrency.Recurrences = 2
135
- creditCardTransactionItem.CreditCard.BillingAddress.City = 'Rio de Janeiro'
136
- creditCardTransactionItem.CreditCard.BillingAddress.Complement = '10º andar'
137
- creditCardTransactionItem.CreditCard.BillingAddress.Country = 'Brazil'
138
- creditCardTransactionItem.CreditCard.BillingAddress.District = 'Centro'
139
- creditCardTransactionItem.CreditCard.BillingAddress.Number = '199'
140
- creditCardTransactionItem.CreditCard.BillingAddress.State = 'RJ'
141
- creditCardTransactionItem.CreditCard.BillingAddress.Street = 'Ruda da Quitanda'
142
- creditCardTransactionItem.CreditCard.BillingAddress.ZipCode = '20091005'
143
- creditCardTransactionItem.CreditCard.CreditCardBrand = 'Visa'
144
- creditCardTransactionItem.CreditCard.CreditCardNumber = '4111111111111111'
145
- creditCardTransactionItem.CreditCard.ExpMonth = 10
146
- creditCardTransactionItem.CreditCard.ExpYear = 19
147
- creditCardTransactionItem.CreditCard.HolderName = 'Maria do Carmo'
148
- creditCardTransactionItem.CreditCard.InstantBuyKey = '00000000-0000-0000-0000-000000000000'
149
- creditCardTransactionItem.CreditCard.SecurityCode = '123'
106
+
107
+ # create credit card transaction object
108
+ creditCardTransaction = CreditCardTransaction.new
109
+
110
+ # 100 reais in cents
111
+ creditCardTransaction.AmountInCents = 10000
112
+ creditCardTransaction.CreditCard.BillingAddress.City = 'Tatooine'
113
+ creditCardTransaction.CreditCard.BillingAddress.Complement = ''
114
+ creditCardTransaction.CreditCard.BillingAddress.Country = 'Brazil'
115
+ creditCardTransaction.CreditCard.BillingAddress.District = 'Mos Eisley'
116
+ creditCardTransaction.CreditCard.BillingAddress.Number = '123'
117
+ creditCardTransaction.CreditCard.BillingAddress.State = 'RJ'
118
+ creditCardTransaction.CreditCard.BillingAddress.Street = 'Mos Eisley Cantina'
119
+ creditCardTransaction.CreditCard.BillingAddress.ZipCode = '20001000'
120
+ creditCardTransaction.CreditCard.CreditCardBrand = 'Visa'
121
+ creditCardTransaction.CreditCard.CreditCardNumber = '4111111111111111'
122
+ creditCardTransaction.CreditCard.ExpMonth = 10
123
+ creditCardTransaction.CreditCard.ExpYear = 22
124
+ creditCardTransaction.CreditCard.HolderName = 'LUKE SKYWALKER'
125
+ creditCardTransaction.CreditCard.SecurityCode = '123'
126
+ creditCardTransaction.CreditCardOperation = 'AuthOnly'
127
+ creditCardTransaction.InstallmentCount = 1
128
+ creditCardTransaction.Options.CurrencyIso = 'BRL'
129
+ creditCardTransaction.Options.PaymentMethodCode = 1
130
+ creditCardTransaction.Options.SoftDescriptorText = 'Jedi Mega Store'
150
131
 
151
132
  shoppingCartItem = ShoppingCartItemCollection.new
152
- shoppingCartItem.Description = 'Descricao do Produto'
153
- shoppingCartItem.DiscountAmountInCents = 120
154
- shoppingCartItem.ItemReference = 'product#666'
155
- shoppingCartItem.Name = 'Nome do produto'
133
+ shoppingCartItem.Description = 'Red Lightsaber'
134
+ shoppingCartItem.DiscountAmountInCents = 0
135
+ shoppingCartItem.ItemReference = 'NumeroDoProduto'
136
+ shoppingCartItem.Name = 'Lightsaber'
156
137
  shoppingCartItem.Quantity = 1
157
- shoppingCartItem.TotalCostInCents = 1100
158
- shoppingCartItem.UnitCostInCents = 1220
159
-
160
- shoppingCartCollectionItem = ShoppingCartCollection.new
161
- shoppingCartCollectionItem.DeliveryAddress.City = 'Rio de Janeiro'
162
- shoppingCartCollectionItem.DeliveryAddress.Complement = '10º andar'
163
- shoppingCartCollectionItem.DeliveryAddress.Country = 'Brazil'
164
- shoppingCartCollectionItem.DeliveryAddress.District = 'Centro'
165
- shoppingCartCollectionItem.DeliveryAddress.Number = '199'
166
- shoppingCartCollectionItem.DeliveryAddress.State = 'RJ'
167
- shoppingCartCollectionItem.DeliveryAddress.Street = 'Rua da Quitanda'
168
- shoppingCartCollectionItem.DeliveryAddress.ZipCode = '20091005'
169
- shoppingCartCollectionItem.DeliveryDeadline = Date.new(2014, 12, 5).strftime("%Y-%m-%dT%H:%M:%S")
170
- shoppingCartCollectionItem.EstimatedDeliveryDate = Date.new(2014, 11, 25).strftime("%Y-%m-%dT%H:%M:%S")
171
- shoppingCartCollectionItem.FreighCostInCents = 0
172
- shoppingCartCollectionItem.ShippingCompany = 'Nome da empresa responsável pela entrega'
173
- shoppingCartCollectionItem.ShoppingCartItemCollection << shoppingCartItem
174
-
138
+ shoppingCartItem.TotalCostInCents = 18000
139
+ shoppingCartItem.UnitCostInCents = 18000
140
+
141
+ shoppingCartCollection = ShoppingCartCollection.new
142
+ shoppingCartCollection.DeliveryAddress.City = 'Galaxy far far away'
143
+ shoppingCartCollection.DeliveryAddress.Complement = 'Bridge'
144
+ shoppingCartCollection.DeliveryAddress.Country = 'Brazil'
145
+ shoppingCartCollection.DeliveryAddress.District = 'Command Room'
146
+ shoppingCartCollection.DeliveryAddress.Number = '321'
147
+ shoppingCartCollection.DeliveryAddress.State = 'RJ'
148
+ shoppingCartCollection.DeliveryAddress.Street = 'Death Star'
149
+ shoppingCartCollection.DeliveryAddress.ZipCode = '10002000'
150
+ shoppingCartCollection.DeliveryDeadline = DateTime.new(2015, 12, 14, 18, 36, 45).strftime("%Y-%m-%dT%H:%M:%S")
151
+ shoppingCartCollection.EstimatedDeliveryDate = DateTime.new(2015, 12, 14, 18, 36, 45).strftime("%Y-%m-%dT%H:%M:%S")
152
+ shoppingCartCollection.FreighCostInCents = 2000
153
+ shoppingCartCollection.ShippingCompany = 'Empire'
154
+ shoppingCartCollection.ShoppingCartItemCollection << shoppingCartItem
155
+
156
+ # creates request object for transaction creation
175
157
  createSaleRequest = CreateSaleRequest.new
176
158
 
177
- createSaleRequest.Buyer.AddressCollection = Array.new
159
+ # adds to the boleto transaction collection
160
+ createSaleRequest.BoletoTransactionCollection << boletoTransaction
178
161
 
179
- createSaleRequest.Buyer.Birthdate = Date.new(1990, 3, 3).strftime("%Y-%m-%dT%H:%M:%S")
162
+ buyerAddress = BuyerAddress.new
163
+ buyerAddress.AddressType = 'Residential'
164
+ buyerAddress.City = 'Tatooine'
165
+ buyerAddress.Complement = ''
166
+ buyerAddress.Country = 'Brazil'
167
+ buyerAddress.District = 'Mos Eisley'
168
+ buyerAddress.Number = '123'
169
+ buyerAddress.State = 'RJ'
170
+ buyerAddress.Street = 'Mos Eisley Cantina'
171
+ buyerAddress.ZipCode = '20001000'
172
+
173
+ createSaleRequest.Buyer.AddressCollection << buyerAddress
174
+ createSaleRequest.Buyer.Birthdate = DateTime.new(1990,8,20,0,0,0).strftime("%Y-%m-%dT%H:%M:%S")
175
+ createSaleRequest.Buyer.BuyerCategory = 'Normal'
176
+ createSaleRequest.Buyer.BuyerReference = 'C3PO'
177
+ createSaleRequest.Buyer.CreateDateInMerchant = DateTime.new(2015,12,11,18,36,45).strftime("%Y-%m-%dT%H:%M:%S")
180
178
  createSaleRequest.Buyer.DocumentNumber = '12345678901'
181
179
  createSaleRequest.Buyer.DocumentType = 'CPF'
182
- createSaleRequest.Buyer.Email = 'someone@example.com'
180
+ createSaleRequest.Buyer.Email = 'lskywalker@r2d2.com'
183
181
  createSaleRequest.Buyer.EmailType = 'Personal'
184
- createSaleRequest.Buyer.FacebookId = ''
182
+ createSaleRequest.Buyer.FacebookId = 'lukeskywalker8917'
185
183
  createSaleRequest.Buyer.Gender = 'M'
186
- createSaleRequest.Buyer.HomePhone = '2112345678'
187
- createSaleRequest.Buyer.MobilePhone = '21987654321'
188
- createSaleRequest.Buyer.Name = 'Someone'
184
+ createSaleRequest.Buyer.HomePhone = '(21)123456789'
185
+ createSaleRequest.Buyer.MobilePhone = '(21)987654321'
186
+ createSaleRequest.Buyer.Name = 'Luke Skywalker'
189
187
  createSaleRequest.Buyer.PersonType = 'Person'
190
- createSaleRequest.Buyer.TwitterId = ''
191
- createSaleRequest.Buyer.WorkPhone = '2178563412'
192
- createSaleRequest.Buyer.BuyerCategory = 'Normal'
193
- createSaleRequest.Buyer.BuyerKey = '00000000-0000-0000-0000-000000000000'
194
- createSaleRequest.Buyer.BuyerReference = 'RubyBuyer#JohnConnor'
195
- createSaleRequest.Buyer.CreateDateInMerchant = Date.new(2014, 4, 15).strftime("%Y-%m-%dT%H:%M:%S")
196
- createSaleRequest.Buyer.LastBuyerUpdateInMerchant = Date.new(2014, 4, 15).strftime("%Y-%m-%dT%H:%M:%S")
197
- createSaleRequest.Buyer.AddressCollection << buyerAddressItem
198
- createSaleRequest.Merchant.MerchantReference = 'Nome da Loja'
188
+ createSaleRequest.Buyer.TwitterId = '@lukeskywalker8917'
189
+ createSaleRequest.Buyer.WorkPhone = '(21)28467902'
190
+
191
+ # adds to the credit card transaction collection
192
+ createSaleRequest.CreditCardTransactionCollection << creditCardTransaction
193
+ createSaleRequest.Merchant.MerchantReference = 'IdDaLojaPlataforma'
199
194
  createSaleRequest.Options.AntiFraudServiceCode = 0
200
195
  createSaleRequest.Options.CurrencyIso = 'BRL'
201
- createSaleRequest.Options.IsAntiFraudEnabled = false
202
- createSaleRequest.Options.Retries = 3
203
- createSaleRequest.Order.OrderReference = 'RubySDK-TestOrder'
204
- createSaleRequest.RequestData.EcommerceCategory = 'B2B'
196
+ createSaleRequest.Options.IsAntiFraudEnabled = true
197
+ createSaleRequest.Options.Retries = 1
198
+ createSaleRequest.Order.OrderReference = 'NumeroDoPedido'
199
+ createSaleRequest.RequestData.EcommerceCategory = 'B2C'
205
200
  createSaleRequest.RequestData.IpAddress = '127.0.0.1'
206
- createSaleRequest.RequestData.Origin = ''
207
- createSaleRequest.RequestData.SessionId = ''
208
- createSaleRequest.BoletoTransactionCollection << boletoTransactionItem
209
- createSaleRequest.CreditCardTransactionCollection << creditCardTransactionItem
201
+ createSaleRequest.RequestData.Origin = 'SiteDeCompra'
202
+ createSaleRequest.RequestData.SessionId = 'IdSesssaoNoSite'
203
+
204
+ # adds shopping cart collection in the request
205
+ createSaleRequest.ShoppingCartCollection << shoppingCartCollection
206
+
207
+ # make the request and returns a response hash
208
+ response = gateway.CreateSale(createSaleRequest)
209
+
210
+ expect(response[:ErrorReport]).to eq nil
211
+ end
212
+
213
+ it 'should create an anti fraud transaction' do
214
+ # create credit card transaction object
215
+ creditCardTransaction = CreditCardTransaction.new
216
+
217
+ # 100 reais in cents
218
+ creditCardTransaction.AmountInCents = 10000
219
+ creditCardTransaction.CreditCard.BillingAddress.City = 'Tatooine'
220
+ creditCardTransaction.CreditCard.BillingAddress.Complement = ''
221
+ creditCardTransaction.CreditCard.BillingAddress.Country = 'Brazil'
222
+ creditCardTransaction.CreditCard.BillingAddress.District = 'Mos Eisley'
223
+ creditCardTransaction.CreditCard.BillingAddress.Number = '123'
224
+ creditCardTransaction.CreditCard.BillingAddress.State = 'RJ'
225
+ creditCardTransaction.CreditCard.BillingAddress.Street = 'Mos Eisley Cantina'
226
+ creditCardTransaction.CreditCard.BillingAddress.ZipCode = '20001000'
227
+ creditCardTransaction.CreditCard.CreditCardBrand = 'Visa'
228
+ creditCardTransaction.CreditCard.CreditCardNumber = '4111111111111111'
229
+ creditCardTransaction.CreditCard.ExpMonth = 10
230
+ creditCardTransaction.CreditCard.ExpYear = 22
231
+ creditCardTransaction.CreditCard.HolderName = 'LUKE SKYWALKER'
232
+ creditCardTransaction.CreditCard.SecurityCode = '123'
233
+ creditCardTransaction.InstallmentCount = 1
234
+
235
+ shoppingCartItem = ShoppingCartItemCollection.new
236
+ shoppingCartItem.Description = 'Red Lightsaber'
237
+ shoppingCartItem.DiscountAmountInCents = 0
238
+ shoppingCartItem.ItemReference = 'NumeroDoProduto'
239
+ shoppingCartItem.Name = 'Lightsaber'
240
+ shoppingCartItem.Quantity = 1
241
+ shoppingCartItem.TotalCostInCents = 18000
242
+ shoppingCartItem.UnitCostInCents = 0
243
+
244
+ shoppingCartCollection = ShoppingCartCollection.new
245
+ shoppingCartCollection.DeliveryAddress.City = 'Galaxy far far away'
246
+ shoppingCartCollection.DeliveryAddress.Complement = 'Bridge'
247
+ shoppingCartCollection.DeliveryAddress.Country = 'Brazil'
248
+ shoppingCartCollection.DeliveryAddress.District = 'Command Room'
249
+ shoppingCartCollection.DeliveryAddress.Number = '321'
250
+ shoppingCartCollection.DeliveryAddress.State = 'RJ'
251
+ shoppingCartCollection.DeliveryAddress.Street = 'Death Star'
252
+ shoppingCartCollection.DeliveryAddress.ZipCode = '10002000'
253
+ shoppingCartCollection.FreighCostInCents = 2000
254
+ shoppingCartCollection.ShoppingCartItemCollection << shoppingCartItem
255
+
256
+ # creates request object for transaction creation
257
+ createSaleRequest = CreateSaleRequest.new
258
+
259
+ buyerAddress = BuyerAddress.new
260
+ buyerAddress.AddressType = 'Residential'
261
+ buyerAddress.City = 'Tatooine'
262
+ buyerAddress.Complement = ''
263
+ buyerAddress.Country = 'Brazil'
264
+ buyerAddress.District = 'Mos Eisley'
265
+ buyerAddress.Number = '123'
266
+ buyerAddress.State = 'RJ'
267
+ buyerAddress.Street = 'Mos Eisley Cantina'
268
+ buyerAddress.ZipCode = '20001000'
269
+
270
+ createSaleRequest.Buyer.AddressCollection << buyerAddress
271
+ createSaleRequest.Buyer.Birthdate = DateTime.new(1990,8,20,0,0,0).strftime("%Y-%m-%dT%H:%M:%S")
272
+ createSaleRequest.Buyer.BuyerReference = 'C3PO'
273
+ createSaleRequest.Buyer.DocumentNumber = '12345678901'
274
+ createSaleRequest.Buyer.DocumentType = 'CPF'
275
+ createSaleRequest.Buyer.Email = 'lskywalker@r2d2.com'
276
+ createSaleRequest.Buyer.EmailType = 'Personal'
277
+ createSaleRequest.Buyer.Gender = 'M'
278
+ createSaleRequest.Buyer.HomePhone = '(21)123456789'
279
+ createSaleRequest.Buyer.MobilePhone = '(21)987654321'
280
+ createSaleRequest.Buyer.Name = 'Luke Skywalker'
281
+ createSaleRequest.Buyer.PersonType = 'Person'
282
+ createSaleRequest.Buyer.WorkPhone = '(21)28467902'
283
+
284
+ # adds to the credit card transaction collection
285
+ createSaleRequest.CreditCardTransactionCollection << creditCardTransaction
286
+ createSaleRequest.Options.IsAntiFraudEnabled = true
287
+ createSaleRequest.Order.OrderReference = 'NumeroDoPedido'
288
+
289
+ # adds shopping cart collection in the request
290
+ createSaleRequest.ShoppingCartCollection << shoppingCartCollection
210
291
 
292
+ # make the request and returns a response hash
211
293
  response = gateway.CreateSale(createSaleRequest)
212
294
 
213
295
  expect(response[:ErrorReport]).to eq nil
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
2
2
  s.name = 'stone_ecommerce'
3
3
  s.summary = 'Stone Ruby Client Library'
4
4
  s.description = 'Ruby library for integrating with the Stone payment web services.'
5
- s.version = '1.0.2' # Major.Minor.Revision
5
+ s.version = '1.0.3' # Major.Minor.Revision
6
6
  s.author = 'Stone Pagamentos'
7
7
  s.email = 'meajuda@stone.com.br'
8
8
  s.homepage = 'http://stone.com.br/'
metadata CHANGED
@@ -1,168 +1,153 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stone_ecommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
5
- prerelease:
4
+ version: 1.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Stone Pagamentos
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-12-11 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rest-client
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.8'
22
- - - ! '>='
20
+ - - ">="
23
21
  - !ruby/object:Gem::Version
24
22
  version: 1.8.0
25
23
  type: :runtime
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
- - - ~>
27
+ - - "~>"
31
28
  - !ruby/object:Gem::Version
32
29
  version: '1.8'
33
- - - ! '>='
30
+ - - ">="
34
31
  - !ruby/object:Gem::Version
35
32
  version: 1.8.0
36
33
  - !ruby/object:Gem::Dependency
37
34
  name: rspec
38
35
  requirement: !ruby/object:Gem::Requirement
39
- none: false
40
36
  requirements:
41
- - - ~>
37
+ - - "~>"
42
38
  - !ruby/object:Gem::Version
43
39
  version: '3.3'
44
- - - ! '>='
40
+ - - ">="
45
41
  - !ruby/object:Gem::Version
46
42
  version: 3.3.0
47
43
  type: :runtime
48
44
  prerelease: false
49
45
  version_requirements: !ruby/object:Gem::Requirement
50
- none: false
51
46
  requirements:
52
- - - ~>
47
+ - - "~>"
53
48
  - !ruby/object:Gem::Version
54
49
  version: '3.3'
55
- - - ! '>='
50
+ - - ">="
56
51
  - !ruby/object:Gem::Version
57
52
  version: 3.3.0
58
53
  - !ruby/object:Gem::Dependency
59
54
  name: nori
60
55
  requirement: !ruby/object:Gem::Requirement
61
- none: false
62
56
  requirements:
63
- - - ~>
57
+ - - "~>"
64
58
  - !ruby/object:Gem::Version
65
59
  version: '2.6'
66
- - - ! '>='
60
+ - - ">="
67
61
  - !ruby/object:Gem::Version
68
62
  version: 2.6.0
69
63
  type: :runtime
70
64
  prerelease: false
71
65
  version_requirements: !ruby/object:Gem::Requirement
72
- none: false
73
66
  requirements:
74
- - - ~>
67
+ - - "~>"
75
68
  - !ruby/object:Gem::Version
76
69
  version: '2.6'
77
- - - ! '>='
70
+ - - ">="
78
71
  - !ruby/object:Gem::Version
79
72
  version: 2.6.0
80
73
  - !ruby/object:Gem::Dependency
81
74
  name: gyoku
82
75
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
76
  requirements:
85
- - - ~>
77
+ - - "~>"
86
78
  - !ruby/object:Gem::Version
87
79
  version: '1.3'
88
- - - ! '>='
80
+ - - ">="
89
81
  - !ruby/object:Gem::Version
90
82
  version: 1.3.1
91
83
  type: :runtime
92
84
  prerelease: false
93
85
  version_requirements: !ruby/object:Gem::Requirement
94
- none: false
95
86
  requirements:
96
- - - ~>
87
+ - - "~>"
97
88
  - !ruby/object:Gem::Version
98
89
  version: '1.3'
99
- - - ! '>='
90
+ - - ">="
100
91
  - !ruby/object:Gem::Version
101
92
  version: 1.3.1
102
93
  - !ruby/object:Gem::Dependency
103
94
  name: nokogiri
104
95
  requirement: !ruby/object:Gem::Requirement
105
- none: false
106
96
  requirements:
107
- - - ~>
97
+ - - "~>"
108
98
  - !ruby/object:Gem::Version
109
99
  version: '1.6'
110
- - - ! '>='
100
+ - - ">="
111
101
  - !ruby/object:Gem::Version
112
102
  version: 1.6.6.2
113
103
  type: :runtime
114
104
  prerelease: false
115
105
  version_requirements: !ruby/object:Gem::Requirement
116
- none: false
117
106
  requirements:
118
- - - ~>
107
+ - - "~>"
119
108
  - !ruby/object:Gem::Version
120
109
  version: '1.6'
121
- - - ! '>='
110
+ - - ">="
122
111
  - !ruby/object:Gem::Version
123
112
  version: 1.6.6.2
124
113
  - !ruby/object:Gem::Dependency
125
114
  name: ffi
126
115
  requirement: !ruby/object:Gem::Requirement
127
- none: false
128
116
  requirements:
129
- - - ~>
117
+ - - "~>"
130
118
  - !ruby/object:Gem::Version
131
119
  version: '1.9'
132
- - - ! '>='
120
+ - - ">="
133
121
  - !ruby/object:Gem::Version
134
122
  version: 1.9.10
135
123
  type: :runtime
136
124
  prerelease: false
137
125
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
126
  requirements:
140
- - - ~>
127
+ - - "~>"
141
128
  - !ruby/object:Gem::Version
142
129
  version: '1.9'
143
- - - ! '>='
130
+ - - ">="
144
131
  - !ruby/object:Gem::Version
145
132
  version: 1.9.10
146
133
  - !ruby/object:Gem::Dependency
147
134
  name: bundler
148
135
  requirement: !ruby/object:Gem::Requirement
149
- none: false
150
136
  requirements:
151
- - - ~>
137
+ - - "~>"
152
138
  - !ruby/object:Gem::Version
153
139
  version: '1.10'
154
- - - ! '>='
140
+ - - ">="
155
141
  - !ruby/object:Gem::Version
156
142
  version: 1.10.6
157
143
  type: :runtime
158
144
  prerelease: false
159
145
  version_requirements: !ruby/object:Gem::Requirement
160
- none: false
161
146
  requirements:
162
- - - ~>
147
+ - - "~>"
163
148
  - !ruby/object:Gem::Version
164
149
  version: '1.10'
165
- - - ! '>='
150
+ - - ">="
166
151
  - !ruby/object:Gem::Version
167
152
  version: 1.10.6
168
153
  description: Ruby library for integrating with the Stone payment web services.
@@ -171,93 +156,92 @@ executables: []
171
156
  extensions: []
172
157
  extra_rdoc_files: []
173
158
  files:
174
- - README.md
175
159
  - LICENSE
176
- - lib/stone_ecommerce.rb
160
+ - README.md
161
+ - lib/gateway/Address/billing_address.rb
162
+ - lib/gateway/Address/buyer_address.rb
163
+ - lib/gateway/Address/delivery_address.rb
164
+ - lib/gateway/AntiFraud/anti_fraud_analysis_result.rb
165
+ - lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_data.rb
166
+ - lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_history_data.rb
177
167
  - lib/gateway/BaseRequest.rb
178
- - lib/gateway/ShoppingCart/shopping_cart_item.rb
179
- - lib/gateway/ShoppingCart/shopping_cart.rb
168
+ - lib/gateway/BaseResponse.rb
169
+ - lib/gateway/BoletoTransaction/boleto_transaction.rb
170
+ - lib/gateway/BoletoTransaction/boleto_transaction_data.rb
171
+ - lib/gateway/BoletoTransaction/boleto_transaction_options.rb
172
+ - lib/gateway/BoletoTransaction/boleto_transaction_report_file.rb
173
+ - lib/gateway/BoletoTransaction/boleto_transaction_result.rb
174
+ - lib/gateway/CreditCardTransaction/credit_card.rb
175
+ - lib/gateway/CreditCardTransaction/credit_card_transaction.rb
176
+ - lib/gateway/CreditCardTransaction/credit_card_transaction_data.rb
177
+ - lib/gateway/CreditCardTransaction/credit_card_transaction_options.rb
178
+ - lib/gateway/CreditCardTransaction/credit_card_transaction_report_file.rb
179
+ - lib/gateway/CreditCardTransaction/manage_credit_card_transaction.rb
180
+ - lib/gateway/CreditCardTransaction/retry_sale_credit_card_transaction.rb
181
+ - lib/gateway/ErrorItem.rb
180
182
  - lib/gateway/ErrorReport.rb
181
- - lib/gateway/Parsers/online_debit_transaction_parser.rb
182
- - lib/gateway/Parsers/header_parser.rb
183
- - lib/gateway/Parsers/credit_card_transaction_parser.rb
184
- - lib/gateway/Parsers/trailer_parser.rb
185
- - lib/gateway/Parsers/boleto_transaction_parser.rb
186
- - lib/gateway/SalesOption.rb
187
- - lib/gateway/Trailer.rb
183
+ - lib/gateway/Gateway.rb
184
+ - lib/gateway/InstantBuy/credit_card_data.rb
185
+ - lib/gateway/InstantBuy/get_instant_buy_data_response.rb
188
186
  - lib/gateway/Merchant/merchant.rb
189
- - lib/gateway/Recurrency/recurrency.rb
190
- - lib/gateway/ErrorItem.rb
191
187
  - lib/gateway/OnlineDebit/online_debit_transaction_report_file.rb
192
188
  - lib/gateway/Order/order.rb
193
189
  - lib/gateway/Order/order_transaction_report_file.rb
194
- - lib/gateway/InstantBuy/get_instant_buy_data_response.rb
195
- - lib/gateway/InstantBuy/credit_card_data.rb
196
- - lib/gateway/BaseResponse.rb
197
- - lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_history_data.rb
198
- - lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_data.rb
199
- - lib/gateway/AntiFraud/anti_fraud_analysis_result.rb
200
- - lib/gateway/address.rb
201
- - lib/gateway/Gateway.rb
190
+ - lib/gateway/Parsers/boleto_transaction_parser.rb
191
+ - lib/gateway/Parsers/credit_card_transaction_parser.rb
192
+ - lib/gateway/Parsers/header_parser.rb
193
+ - lib/gateway/Parsers/online_debit_transaction_parser.rb
194
+ - lib/gateway/Parsers/trailer_parser.rb
202
195
  - lib/gateway/Person/buyer.rb
203
196
  - lib/gateway/Person/person.rb
204
- - lib/gateway/BoletoTransaction/boleto_transaction_report_file.rb
205
- - lib/gateway/BoletoTransaction/boleto_transaction_options.rb
206
- - lib/gateway/BoletoTransaction/boleto_transaction_result.rb
207
- - lib/gateway/BoletoTransaction/boleto_transaction.rb
208
- - lib/gateway/BoletoTransaction/boleto_transaction_data.rb
209
- - lib/gateway/transaction_report_file.rb
210
- - lib/gateway/Sale/manage_sale_response.rb
197
+ - lib/gateway/Recurrency/recurrency.rb
198
+ - lib/gateway/Sale/create_sale_request.rb
211
199
  - lib/gateway/Sale/create_sale_response.rb
212
- - lib/gateway/Sale/retry_sale_options.rb
213
- - lib/gateway/Sale/retry_sale_response.rb
214
- - lib/gateway/Sale/sale_data.rb
215
200
  - lib/gateway/Sale/manage_sale_request.rb
201
+ - lib/gateway/Sale/manage_sale_response.rb
202
+ - lib/gateway/Sale/query_sale_request.rb
203
+ - lib/gateway/Sale/query_sale_response.rb
216
204
  - lib/gateway/Sale/request_data.rb
205
+ - lib/gateway/Sale/retry_sale_options.rb
217
206
  - lib/gateway/Sale/retry_sale_request.rb
218
- - lib/gateway/Sale/query_sale_response.rb
219
- - lib/gateway/Sale/create_sale_request.rb
207
+ - lib/gateway/Sale/retry_sale_response.rb
208
+ - lib/gateway/Sale/sale_data.rb
220
209
  - lib/gateway/Sale/sale_order_data.rb
221
- - lib/gateway/Sale/query_sale_request.rb
222
- - lib/gateway/post_notification.rb
223
- - lib/gateway/CreditCardTransaction/credit_card_transaction_report_file.rb
224
- - lib/gateway/CreditCardTransaction/credit_card_transaction_data.rb
225
- - lib/gateway/CreditCardTransaction/credit_card_transaction.rb
226
- - lib/gateway/CreditCardTransaction/credit_card.rb
227
- - lib/gateway/CreditCardTransaction/credit_card_transaction_options.rb
228
- - lib/gateway/CreditCardTransaction/retry_sale_credit_card_transaction.rb
229
- - lib/gateway/CreditCardTransaction/manage_credit_card_transaction.rb
230
- - lib/gateway/Address/delivery_address.rb
231
- - lib/gateway/Address/billing_address.rb
232
- - lib/gateway/Address/buyer_address.rb
210
+ - lib/gateway/SalesOption.rb
211
+ - lib/gateway/ShoppingCart/shopping_cart.rb
212
+ - lib/gateway/ShoppingCart/shopping_cart_item.rb
213
+ - lib/gateway/Trailer.rb
214
+ - lib/gateway/address.rb
233
215
  - lib/gateway/header.rb
234
- - spec/spec_helper.rb
235
- - spec/integration/test_helper.rb
216
+ - lib/gateway/post_notification.rb
217
+ - lib/gateway/transaction_report_file.rb
218
+ - lib/stone_ecommerce.rb
236
219
  - spec/integration/gateway_spec.rb
220
+ - spec/integration/test_helper.rb
221
+ - spec/spec_helper.rb
237
222
  - stone_ecommerce.gemspec
238
223
  homepage: http://stone.com.br/
239
224
  licenses:
240
225
  - Apache 2.0
226
+ metadata: {}
241
227
  post_install_message:
242
228
  rdoc_options: []
243
229
  require_paths:
244
230
  - lib
245
231
  required_ruby_version: !ruby/object:Gem::Requirement
246
- none: false
247
232
  requirements:
248
- - - ! '>='
233
+ - - ">="
249
234
  - !ruby/object:Gem::Version
250
235
  version: 2.1.7
251
236
  required_rubygems_version: !ruby/object:Gem::Requirement
252
- none: false
253
237
  requirements:
254
- - - ! '>='
238
+ - - ">="
255
239
  - !ruby/object:Gem::Version
256
240
  version: '0'
257
241
  requirements: []
258
242
  rubyforge_project:
259
- rubygems_version: 1.8.23
243
+ rubygems_version: 2.4.8
260
244
  signing_key:
261
- specification_version: 3
245
+ specification_version: 4
262
246
  summary: Stone Ruby Client Library
263
247
  test_files: []