sheepla 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sheepla/version.rb +1 -1
  3. data/lib/sheepla.rb +30 -45
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71c08255a4df0027e1897a0620c7cc5bf5dd8074
4
- data.tar.gz: 19e1ab49e2534e1944e5e886ea5c486394582e17
3
+ metadata.gz: 3d298bdfdb56a152ccaf95aaa7d7f4050a3e69a1
4
+ data.tar.gz: 0f6cb410d8952b7c59e670fc279e8af45c285991
5
5
  SHA512:
6
- metadata.gz: 1121120a18ece30442b66d4e693d00b03bfcc183245f4051c80f63770200b33c259106b295a81d27096a0700e8864c80c37a70bab6b10757c4c85dfde674917e
7
- data.tar.gz: 1946e87c027b5d41b371fe901502207d151b2c9ebcad7fdd2841386bd22205bcc3fd3633e213c31f0630a1c8d04ce01e1788947295eaf4dc52e32d254d9260b8
6
+ metadata.gz: 34ce20ed43c656f31067f6b6ec70bc1ff5d66ec605923c85a38fd50e3e9fff9273f9f40cbfe0076f116939021c2b233e1e7e8832cb328118789fdf3e9b6901b6
7
+ data.tar.gz: 92b210460376788405e2f8de38e50e529ee16c021991a14673c37bda160b276ab8c348ac0ba176095beebcfd6ab9109418b1bb0d31beca1c08b00a50d0adc68a
@@ -1,3 +1,3 @@
1
1
  module Sheepla
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/sheepla.rb CHANGED
@@ -94,23 +94,6 @@ module Sheepla
94
94
  add_delivery_address(xml, address)
95
95
  add_order_items(xml, items) if items
96
96
  add_delivery_options(xml, options) if options
97
- # xml.orderValue order['order_value']
98
- # xml.orderValueCurrency order['order_currency']
99
- # xml.externalDeliveryTypeId order['external_delivery_type_id']
100
- # xml.externalDeliveryTypeName order['external_delivery_type_name']
101
- # xml.externalPaymentTypeId order['external_payment_type_id']
102
- # xml.externalPaymentTypeName order['external_payment_type_name']
103
- # xml.externalCarrierName order['external_carrier_name']
104
- # xml.externalCarrierId order['external_carrier_id']
105
- # xml.externalCountryId order['external_country_id']
106
- # xml.externalBuyerId order['external_buyer_id']
107
- # xml.externalOrderId order['external_order_id']
108
- # xml.shipmentTemplate order['shipment_template']
109
- # xml.comments order['comments']
110
- # xml.createdOn order['created_on'].to_s
111
- # xml.deliveryPrice order['delivery_price']
112
- # xml.deliveryPriceCurrency order['delivery_price_currency']
113
-
114
97
  end
115
98
  end
116
99
  end
@@ -156,33 +139,35 @@ module Sheepla
156
139
  end
157
140
  end
158
141
 
159
- def validate_order(params)
160
- params['orderValue'] &&
161
- params['orderValueCurrency'] &&
162
- params['externalDeliveryTypeId'] &&
163
- params['externalDeliveryTypeName'] &&
164
- params['externalPaymentTypeId'] &&
165
- params['externalPaymentTypeName'] &&
166
- params['externalCarrierId'] &&
167
- params['externalCarrierName'] &&
168
- params['externalCountryId'] &&
169
- params['externalBuyerId'] &&
170
- params['externalOrderId'] &&
171
- params['shipmentTemplate'] &&
172
- params['comments'] &&
173
- params['createdOn'] &&
174
- params['deliveryPrice'] &&
175
- params['deliveryPriceCurrency'] &&
176
- params['deliveryAddress'] &&
177
- params['deliveryAddress']['street'] &&
178
- params['deliveryAddress']['zipCode'] &&
179
- params['deliveryAddress']['city'] &&
180
- params['deliveryAddress']['countryAlpha2Code'] &&
181
- params['deliveryAddress']['firstName'] &&
182
- params['deliveryAddress']['lastName'] &&
183
- params['deliveryAddress']['companyName'] &&
184
- params['deliveryAddress']['phone'] &&
185
- params['deliveryAddress']['email']
186
- end
142
+ # Sheepla API has many possibilities with validation
143
+ #
144
+ # def validate_order(params)
145
+ # params['orderValue'] &&
146
+ # params['orderValueCurrency'] &&
147
+ # params['externalDeliveryTypeId'] &&
148
+ # params['externalDeliveryTypeName'] &&
149
+ # params['externalPaymentTypeId'] &&
150
+ # params['externalPaymentTypeName'] &&
151
+ # params['externalCarrierId'] &&
152
+ # params['externalCarrierName'] &&
153
+ # params['externalCountryId'] &&
154
+ # params['externalBuyerId'] &&
155
+ # params['externalOrderId'] &&
156
+ # params['shipmentTemplate'] &&
157
+ # params['comments'] &&
158
+ # params['createdOn'] &&
159
+ # params['deliveryPrice'] &&
160
+ # params['deliveryPriceCurrency'] &&
161
+ # params['deliveryAddress'] &&
162
+ # params['deliveryAddress']['street'] &&
163
+ # params['deliveryAddress']['zipCode'] &&
164
+ # params['deliveryAddress']['city'] &&
165
+ # params['deliveryAddress']['countryAlpha2Code'] &&
166
+ # params['deliveryAddress']['firstName'] &&
167
+ # params['deliveryAddress']['lastName'] &&
168
+ # params['deliveryAddress']['companyName'] &&
169
+ # params['deliveryAddress']['phone'] &&
170
+ # params['deliveryAddress']['email']
171
+ # end
187
172
  end
188
173
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sheepla
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Jan Adamczyk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-09 00:00:00.000000000 Z
11
+ date: 2015-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri