compropago_sdk 3.0.1 → 3.0.2

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: c848b818d6e279df0ca1d35864bc5ffab264ec8c
4
- data.tar.gz: 7830124fc905830f1f86ad0e1a2be3381cd4bf3c
3
+ metadata.gz: 3f6d2a2200fc271a002f255e02a65a633e261266
4
+ data.tar.gz: 691d4df241474d65d0d69cd07ea2180e2b230ad9
5
5
  SHA512:
6
- metadata.gz: 7aafe315ce49db793838e17b931288c06499e9fa6c8ace2d758ead853a4c89e766470f335d62994e29e9889e5b16248158aec586fafcbed6003e92ceaf86b7c6
7
- data.tar.gz: 40626788d8723fa55d80d88e1c40f6b4dbbe3c33419772c4dee069bdff894f02208f95568bc261952c5975a5c93dd5e561126df1c52b45efbcadfefd066fe5ca
6
+ metadata.gz: 0e577bdb213201d1c1b7e86dcde25abff4bc7f0c477e2d6548dcd2327f60e79ed59db1fef8a2f0b8e7aa04ee87558f9f88f2981f554d3fd6d89d16ae497fd9dd
7
+ data.tar.gz: 993dd3475311037a506a6be019b1d98b5097ae113fd4aef3fafb36488547cca4602fd993edf553eb1d4d1fd90c4c615987d7ff76fc1481c1bfda29a86b251594
@@ -3,9 +3,6 @@ module CpConfigSdk
3
3
  API_LIVE_URI = 'https://api.compropago.com/v1/'
4
4
  API_SANDBOX_URI = 'https://api.compropago.com/v1/'
5
5
 
6
- #API_LIVE_URI = 'https://api-staging-compropago.herokuapp.com/v1/'
7
- #API_SANDBOX_URI = 'https://api-staging-compropago.herokuapp.com/v1/'
8
-
9
- VERSION = '3.0.1'
6
+ VERSION = '3.0.2'
10
7
 
11
8
  end
@@ -7,6 +7,7 @@ class PlaceOrderInfo
7
7
  attr_accessor :customer_email
8
8
  attr_accessor :payment_type
9
9
  attr_accessor :currency
10
+ attr_accessor :expiration_time
10
11
  attr_accessor :image_url
11
12
  attr_accessor :app_client_name
12
13
  attr_accessor :app_client_version
@@ -19,6 +20,7 @@ class PlaceOrderInfo
19
20
  customer_email,
20
21
  payment_type='OXXO',
21
22
  currency='MXN',
23
+ expiration_time=nil,
22
24
  image_url='',
23
25
  app_client_name='sdk-ruby',
24
26
  app_client_version=CpConfigSdk::VERSION
@@ -30,6 +32,7 @@ class PlaceOrderInfo
30
32
  @customer_email = customer_email
31
33
  @payment_type = payment_type
32
34
  @currency = currency
35
+ @expiration_time = expiration_time
33
36
  @image_url = image_url
34
37
  @app_client_name = app_client_name
35
38
  @app_client_version = app_client_version
@@ -12,6 +12,7 @@ class Serialize
12
12
  data[:customer_email],
13
13
  data[:payment_type] ? data[:payment_type] : 'OXXO',
14
14
  data[:currency] ? data[:currency] : 'MXN',
15
+ data[:expiration_time] ? data[:expiration_time] : nil,
15
16
  data[:image_url] ? data[:image_url] : '',
16
17
  data[:app_client_name] ? data[:app_client_name] : 'sdk-ruby',
17
18
  data[:app_client_version] ? data[:app_client_version] : CpConfigSdk::VERSION,
@@ -41,16 +41,17 @@ class Service
41
41
  end
42
42
 
43
43
  params = {
44
- order_id: order.order_id,
45
- order_name: order.order_name,
46
- order_price: order.order_price,
47
- customer_name: order.customer_name,
48
- customer_email: order.customer_email,
49
- payment_type: order.payment_type,
50
- currency: order.currency,
51
- image_url: order.image_url,
52
- app_client_name: order.app_client_name,
53
- app_client_version: order.app_client_version
44
+ :order_id => order.order_id,
45
+ :order_name => order.order_name,
46
+ :order_price => order.order_price,
47
+ :customer_name => order.customer_name,
48
+ :customer_email => order.customer_email,
49
+ :payment_type => order.payment_type,
50
+ :currency => order.currency,
51
+ :expiration_time => order.expiration_time,
52
+ :image_url => order.image_url,
53
+ :app_client_name => order.app_client_name,
54
+ :app_client_version => order.app_client_version
54
55
  }
55
56
 
56
57
  response = Request::post(
@@ -60,8 +60,11 @@ class Http
60
60
 
61
61
  if @auth && @auth.is_a?(Hash)
62
62
  req.basic_auth @auth[:user], @auth[:pass]
63
+ #puts @auth.to_json
63
64
  end
64
65
 
66
+ #puts @data
67
+
65
68
  req.body = @data
66
69
 
67
70
  res = http.request(req)
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.1
4
+ version: 3.0.2
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-01-11 00:00:00.000000000 Z
11
+ date: 2017-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler