cenit-collection-ecommerce 0.0.1

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.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.travis.yml +3 -0
  4. data/Gemfile +6 -0
  5. data/README.md +83 -0
  6. data/Rakefile +1 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +7 -0
  9. data/cenit-collection-ecommerce.gemspec +26 -0
  10. data/lib/cenit/collection/ecommerce.rb +29 -0
  11. data/lib/cenit/collection/ecommerce/build.rb +14 -0
  12. data/lib/cenit/collection/ecommerce/index.json +6 -0
  13. data/lib/cenit/collection/ecommerce/libraries/ecommerce/address.json +37 -0
  14. data/lib/cenit/collection/ecommerce/libraries/ecommerce/adjustment.json +10 -0
  15. data/lib/cenit/collection/ecommerce/libraries/ecommerce/cart.json +10 -0
  16. data/lib/cenit/collection/ecommerce/libraries/ecommerce/customer.json +27 -0
  17. data/lib/cenit/collection/ecommerce/libraries/ecommerce/dimension.json +10 -0
  18. data/lib/cenit/collection/ecommerce/libraries/ecommerce/image.json +25 -0
  19. data/lib/cenit/collection/ecommerce/libraries/ecommerce/inventory.json +21 -0
  20. data/lib/cenit/collection/ecommerce/libraries/ecommerce/line_item.json +21 -0
  21. data/lib/cenit/collection/ecommerce/libraries/ecommerce/order.json +60 -0
  22. data/lib/cenit/collection/ecommerce/libraries/ecommerce/order_total.json +32 -0
  23. data/lib/cenit/collection/ecommerce/libraries/ecommerce/payment.json +24 -0
  24. data/lib/cenit/collection/ecommerce/libraries/ecommerce/product.json +65 -0
  25. data/lib/cenit/collection/ecommerce/libraries/ecommerce/shipment.json +50 -0
  26. data/lib/cenit/collection/ecommerce/libraries/ecommerce/source.json +24 -0
  27. data/lib/cenit/collection/ecommerce/libraries/ecommerce/variant.json +31 -0
  28. data/lib/cenit/collection/ecommerce/libraries/index.json +1 -0
  29. data/lib/cenit/collection/ecommerce/support/sample/cart.json +205 -0
  30. data/lib/cenit/collection/ecommerce/support/sample/customer.json +82 -0
  31. data/lib/cenit/collection/ecommerce/support/sample/inventory.json +16 -0
  32. data/lib/cenit/collection/ecommerce/support/sample/orders.json +119 -0
  33. data/lib/cenit/collection/ecommerce/support/sample/product.json +61 -0
  34. data/lib/cenit/collection/ecommerce/support/sample/shipment.json +54 -0
  35. data/lib/cenit/collection/ecommerce/support/sample/sms.json +14 -0
  36. data/lib/cenit/collection/ecommerce/support/sample/stores.json +22 -0
  37. data/lib/cenit/collection/ecommerce/version.rb +7 -0
  38. metadata +109 -0
@@ -0,0 +1,32 @@
1
+ {
2
+ "title": "OrderTotal",
3
+
4
+ "type": "object",
5
+
6
+ "properties": {
7
+ "adjustment": {
8
+ "type": "number",
9
+ "minimum": 0
10
+ },
11
+ "tax": {
12
+ "type": "number",
13
+ "minimum": 0
14
+ },
15
+ "shipping": {
16
+ "type": "number",
17
+ "minimum": 0
18
+ },
19
+ "payment": {
20
+ "type": "number",
21
+ "minimum": 0
22
+ },
23
+ "order": {
24
+ "type": "number",
25
+ "minimum": 0
26
+ },
27
+ "item": {
28
+ "type": "number",
29
+ "minimum": 0
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "title": "Payment",
3
+
4
+ "type": "object",
5
+
6
+ "properties": {
7
+ "number": {
8
+ "type": "integer"
9
+ },
10
+ "status": {
11
+ "type": "string"
12
+ },
13
+ "amount": {
14
+ "type": "number"
15
+ },
16
+ "payment_method": {
17
+ "type": "string"
18
+ },
19
+ "source": {
20
+ "$ref": "Source"
21
+ }
22
+ },
23
+ "required": ["number", "status", "amount", "payment_method"]
24
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "title": "Product",
3
+
4
+ "type": "object",
5
+
6
+ "properties": {
7
+ "id": {
8
+ "type": "string"
9
+ },
10
+ "name": {
11
+ "type": "string"
12
+ },
13
+ "sku": {
14
+ "type": "string"
15
+ },
16
+ "description": {
17
+ "type": "string"
18
+ },
19
+ "price": {
20
+ "type": "number",
21
+ "minimum": 0,
22
+ "exclusiveMinimum": true
23
+ },
24
+ "cost_price": {
25
+ "type": "number"
26
+ },
27
+ "available_on": {
28
+ "$ref": "Date"
29
+ },
30
+ "permalink": {
31
+ "type": "string"
32
+ },
33
+ "meta_description": {
34
+ "type": "string"
35
+ },
36
+ "meta_keywords": {
37
+ "type": "string"
38
+ },
39
+ "shipping_category": {
40
+ "type": "string"
41
+ },
42
+ "options": {
43
+ "type": "array"
44
+ },
45
+ "taxons": {
46
+ "type": "array"
47
+ },
48
+ "properties": {
49
+ "type": "object"
50
+ },
51
+ "variants": {
52
+ "type": "array",
53
+ "items": {
54
+ "$ref": "variant.json"
55
+ }
56
+ },
57
+ "images": {
58
+ "type": "array",
59
+ "items": {
60
+ "$ref": "image.json"
61
+ }
62
+ }
63
+ },
64
+ "required": ["id", "name", "price", "available_on", "shipping_category"]
65
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "title": "Shipment",
3
+
4
+ "type": "object",
5
+
6
+ "properties": {
7
+ "id": {
8
+ "type": "string"
9
+ },
10
+ "order_id": {
11
+ "type": "string"
12
+ },
13
+ "email": {
14
+ "type": "string"
15
+ },
16
+ "cost": {
17
+ "type": "number"
18
+ },
19
+ "status": {
20
+ "type": "string"
21
+ },
22
+ "stock_location": {
23
+ "type": "string"
24
+ },
25
+ "shipping_method": {
26
+ "type": "string"
27
+ },
28
+ "tracking": {
29
+ "type": "string"
30
+ },
31
+ "shipped_at": {
32
+ "$ref": "Date"
33
+ },
34
+ "updated_at": {
35
+ "$ref": "Date"
36
+ },
37
+ "channel": {
38
+ "type": "string"
39
+ },
40
+ "items": {
41
+ "type": "array",
42
+ "items": {
43
+ "$ref": "line_item.json"
44
+ }
45
+ },
46
+ "shipping_address": {
47
+ "$ref": "address.json"
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "title": "Source",
3
+
4
+ "type": "object",
5
+
6
+ "properties": {
7
+ "name": {
8
+ "type": "string"
9
+ },
10
+ "month": {
11
+ "type": "integer"
12
+ },
13
+ "year": {
14
+ "type": "integer"
15
+ },
16
+ "cc_type": {
17
+ "type": "string"
18
+ },
19
+ "last_digits": {
20
+ "type": "integer"
21
+ }
22
+ },
23
+ "required": ["name", "cc_type"]
24
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "title": "Variant",
3
+
4
+ "type": "object",
5
+
6
+ "properties": {
7
+ "sku": {
8
+ "type": "string",
9
+ "unique": true
10
+ },
11
+ "price": {
12
+ "type": "number"
13
+ },
14
+ "cost_price": {
15
+ "type": "number"
16
+ },
17
+ "quantity": {
18
+ "type": "integer"
19
+ },
20
+ "options": {
21
+ "type": "object"
22
+ },
23
+ "images": {
24
+ "type": "array",
25
+ "items": {
26
+ "$ref": "Image"
27
+ }
28
+ }
29
+ },
30
+ "required": ["sku"]
31
+ }
@@ -0,0 +1 @@
1
+ [{"name": "Ecommerce", "file": "ecommerce"}]
@@ -0,0 +1,205 @@
1
+ {
2
+ "carts": [
3
+ {
4
+ "id": "R1",
5
+ "status": "confirm",
6
+ "channel": "spree",
7
+ "email": "spree@example.com",
8
+ "currency": "USD",
9
+ "placed_on": "2014-02-03",
10
+ "totals": {
11
+ "adjustment": 10.0,
12
+ "tax": 0.0,
13
+ "shipping": 10.0,
14
+ "payment": 220.0,
15
+ "order": 220.0,
16
+ "item": 200.0
17
+ },
18
+ "shipping_address": {
19
+ "firstname": "Joe",
20
+ "lastname": "Smith",
21
+ "address1": "1234 Awesome Street",
22
+ "address2": "",
23
+ "city": "Hollywood",
24
+ "state": "California",
25
+ "country": "US",
26
+ "phone": "0000000000",
27
+ "zipcode": "90210"
28
+ },
29
+ "billing_address": {
30
+ "firstname": "Joe",
31
+ "lastname": "Smith",
32
+ "address1": "1234 Awesome Street",
33
+ "address2": "",
34
+ "city": "Hollywood",
35
+ "state": "California",
36
+ "country": "US",
37
+ "phone": "0000000000",
38
+ "zipcode": "90210"
39
+ },
40
+ "line_items": [
41
+ {
42
+ "name": "Spree T-Shirt",
43
+ "quantity": 2,
44
+ "price": 100.0
45
+ }
46
+ ],
47
+ "adjustments": [
48
+ {
49
+ "name": "Tax",
50
+ "value": "10.0"
51
+ },
52
+ {
53
+ "name": "Shipping",
54
+ "value": "5.0"
55
+ },
56
+ {
57
+ "name": "Shipping",
58
+ "value": "5.0"
59
+ }
60
+ ],
61
+ "payments": [
62
+ {
63
+ "number": 63,
64
+ "status": "completed",
65
+ "amount": 220.0,
66
+ "payment_method": "Credit Card"
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "id": "R2",
72
+ "status": "confirm",
73
+ "channel": "spree",
74
+ "email": "spree@example.com",
75
+ "currency": "USD",
76
+ "placed_on": "2014-02-03",
77
+ "totals": {
78
+ "adjustment": 10.0,
79
+ "tax": 0.0,
80
+ "shipping": 10.0,
81
+ "payment": 220.0,
82
+ "order": 220.0,
83
+ "item": 200.0
84
+ },
85
+ "shipping_address": {
86
+ "firstname": "Joe",
87
+ "lastname": "Smith",
88
+ "address1": "1234 Awesome Street",
89
+ "address2": "",
90
+ "city": "Hollywood",
91
+ "state": "California",
92
+ "country": "US",
93
+ "phone": "0000000000",
94
+ "zipcode": "90210"
95
+ },
96
+ "billing_address": {
97
+ "firstname": "Joe",
98
+ "lastname": "Smith",
99
+ "address1": "1234 Awesome Street",
100
+ "address2": "",
101
+ "city": "Hollywood",
102
+ "state": "California",
103
+ "country": "US",
104
+ "phone": "0000000000",
105
+ "zipcode": "90210"
106
+ },
107
+ "line_items": [
108
+ {
109
+ "name": "Spree T-Shirt",
110
+ "quantity": 2,
111
+ "price": 100.0
112
+ }
113
+ ],
114
+ "adjustments": [
115
+ {
116
+ "name": "Tax",
117
+ "value": "10.0"
118
+ },
119
+ {
120
+ "name": "Shipping",
121
+ "value": "5.0"
122
+ },
123
+ {
124
+ "name": "Shipping",
125
+ "value": "5.0"
126
+ }
127
+ ],
128
+ "payments": [
129
+ {
130
+ "number": 63,
131
+ "status": "completed",
132
+ "amount": 220.0,
133
+ "payment_method": "Credit Card"
134
+ }
135
+ ]
136
+ },
137
+ {
138
+ "id": "R3",
139
+ "status": "confirm",
140
+ "channel": "spree",
141
+ "email": "spree@example.com",
142
+ "currency": "USD",
143
+ "placed_on": "2014-02-03",
144
+ "totals": {
145
+ "adjustment": 10.0,
146
+ "tax": 0.0,
147
+ "shipping": 10.0,
148
+ "payment": 220.0,
149
+ "order": 220.0,
150
+ "item": 200.0
151
+ },
152
+ "shipping_address": {
153
+ "firstname": "Joe",
154
+ "lastname": "Smith",
155
+ "address1": "1234 Awesome Street",
156
+ "address2": "",
157
+ "city": "Hollywood",
158
+ "state": "California",
159
+ "country": "US",
160
+ "phone": "0000000000",
161
+ "zipcode": "90210"
162
+ },
163
+ "billing_address": {
164
+ "firstname": "Joe",
165
+ "lastname": "Smith",
166
+ "address1": "1234 Awesome Street",
167
+ "address2": "",
168
+ "city": "Hollywood",
169
+ "state": "California",
170
+ "country": "US",
171
+ "phone": "0000000000",
172
+ "zipcode": "90210"
173
+ },
174
+ "line_items": [
175
+ {
176
+ "name": "Spree T-Shirt",
177
+ "quantity": 2,
178
+ "price": 100.0
179
+ }
180
+ ],
181
+ "adjustments": [
182
+ {
183
+ "name": "Tax",
184
+ "value": "10.0"
185
+ },
186
+ {
187
+ "name": "Shipping",
188
+ "value": "5.0"
189
+ },
190
+ {
191
+ "name": "Shipping",
192
+ "value": "5.0"
193
+ }
194
+ ],
195
+ "payments": [
196
+ {
197
+ "number": 63,
198
+ "status": "completed",
199
+ "amount": 220.0,
200
+ "payment_method": "Credit Card"
201
+ }
202
+ ]
203
+ }
204
+ ]
205
+ }
@@ -0,0 +1,82 @@
1
+ {"customers": [{
2
+ "id": "C1",
3
+ "firstname": "Brian",
4
+ "lastname": "Smith",
5
+ "email": "spree@example.com",
6
+ "billing_address": {
7
+ "firstname": "Brian",
8
+ "lastname": "Smith",
9
+ "address1": "1234 Awesome Street",
10
+ "address2": "",
11
+ "city": "Hollywood",
12
+ "state": "California",
13
+ "country": "US",
14
+ "phone": "0000000000",
15
+ "zipcode": "90210"
16
+ },
17
+ "shipping_address": {
18
+ "firstname": "Brian",
19
+ "lastname": "Smith",
20
+ "address1": "1234 Awesome Street",
21
+ "address2": "",
22
+ "city": "Hollywood",
23
+ "state": "California",
24
+ "country": "US",
25
+ "phone": "0000000000",
26
+ "zipcode": "90210"
27
+ }
28
+ },{
29
+ "id": "C2",
30
+ "firstname": "Brian",
31
+ "lastname": "Smith",
32
+ "email": "spree@example.com",
33
+ "billing_address": {
34
+ "firstname": "Brian",
35
+ "lastname": "Smith",
36
+ "address1": "1234 Awesome Street",
37
+ "address2": "",
38
+ "city": "Hollywood",
39
+ "state": "California",
40
+ "country": "US",
41
+ "phone": "0000000000",
42
+ "zipcode": "90210"
43
+ },
44
+ "shipping_address": {
45
+ "firstname": "Brian",
46
+ "lastname": "Smith",
47
+ "address1": "1234 Awesome Street",
48
+ "address2": "",
49
+ "city": "Hollywood",
50
+ "state": "California",
51
+ "country": "US",
52
+ "phone": "0000000000",
53
+ "zipcode": "90210"
54
+ }
55
+ },{
56
+ "id": "C3",
57
+ "firstname": "Brian",
58
+ "lastname": "Smith",
59
+ "email": "spree@example.com",
60
+ "billing_address": {
61
+ "firstname": "Brian",
62
+ "lastname": "Smith",
63
+ "address1": "1234 Awesome Street",
64
+ "address2": "",
65
+ "city": "Hollywood",
66
+ "state": "California",
67
+ "country": "US",
68
+ "phone": "0000000000",
69
+ "zipcode": "90210"
70
+ },
71
+ "shipping_address": {
72
+ "firstname": "Brian",
73
+ "lastname": "Smith",
74
+ "address1": "1234 Awesome Street",
75
+ "address2": "",
76
+ "city": "Hollywood",
77
+ "state": "California",
78
+ "country": "US",
79
+ "phone": "0000000000",
80
+ "zipcode": "90210"
81
+ }
82
+ }]}