square_connect 2.20180712.2.237 → 2.20180918.0.244

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +20 -1
  3. data/README.md +33 -1
  4. data/docs/BatchChangeInventoryRequest.md +14 -0
  5. data/docs/BatchChangeInventoryResponse.md +13 -0
  6. data/docs/BatchRetrieveInventoryChangesRequest.md +18 -0
  7. data/docs/BatchRetrieveInventoryChangesResponse.md +14 -0
  8. data/docs/BatchRetrieveInventoryCountsRequest.md +15 -0
  9. data/docs/BatchRetrieveInventoryCountsResponse.md +14 -0
  10. data/docs/Card.md +1 -1
  11. data/docs/CreateCustomerRequest.md +1 -0
  12. data/docs/Customer.md +1 -0
  13. data/docs/CustomersApi.md +2 -2
  14. data/docs/ErrorCode.md +2 -0
  15. data/docs/InventoryAdjustment.md +28 -0
  16. data/docs/InventoryApi.md +391 -0
  17. data/docs/InventoryChange.md +15 -0
  18. data/docs/InventoryChangeType.md +14 -0
  19. data/docs/InventoryCount.md +17 -0
  20. data/docs/InventoryPhysicalCount.md +22 -0
  21. data/docs/InventoryState.md +23 -0
  22. data/docs/InventoryTransfer.md +23 -0
  23. data/docs/Product.md +19 -0
  24. data/docs/RetrieveInventoryAdjustmentRequest.md +11 -0
  25. data/docs/RetrieveInventoryAdjustmentResponse.md +13 -0
  26. data/docs/RetrieveInventoryChangesRequest.md +13 -0
  27. data/docs/RetrieveInventoryChangesResponse.md +14 -0
  28. data/docs/RetrieveInventoryCountRequest.md +13 -0
  29. data/docs/RetrieveInventoryCountResponse.md +14 -0
  30. data/docs/RetrieveInventoryPhysicalCountRequest.md +11 -0
  31. data/docs/RetrieveInventoryPhysicalCountResponse.md +13 -0
  32. data/docs/SourceApplication.md +14 -0
  33. data/docs/TransactionsApi.md +1 -1
  34. data/docs/UpdateCustomerRequest.md +1 -0
  35. data/docs/V1Timecard.md +4 -1
  36. data/lib/square_connect.rb +24 -0
  37. data/lib/square_connect/api/apple_pay_api.rb +1 -1
  38. data/lib/square_connect/api/catalog_api.rb +11 -11
  39. data/lib/square_connect/api/checkout_api.rb +1 -1
  40. data/lib/square_connect/api/customers_api.rb +12 -12
  41. data/lib/square_connect/api/inventory_api.rb +417 -0
  42. data/lib/square_connect/api/locations_api.rb +1 -1
  43. data/lib/square_connect/api/mobile_authorization_api.rb +1 -1
  44. data/lib/square_connect/api/o_auth_api.rb +3 -3
  45. data/lib/square_connect/api/orders_api.rb +2 -2
  46. data/lib/square_connect/api/reporting_api.rb +2 -2
  47. data/lib/square_connect/api/transactions_api.rb +9 -9
  48. data/lib/square_connect/api_client.rb +1 -1
  49. data/lib/square_connect/models/batch_change_inventory_request.rb +208 -0
  50. data/lib/square_connect/models/batch_change_inventory_response.rb +200 -0
  51. data/lib/square_connect/models/batch_retrieve_inventory_changes_request.rb +275 -0
  52. data/lib/square_connect/models/batch_retrieve_inventory_changes_response.rb +210 -0
  53. data/lib/square_connect/models/batch_retrieve_inventory_counts_request.rb +220 -0
  54. data/lib/square_connect/models/batch_retrieve_inventory_counts_response.rb +210 -0
  55. data/lib/square_connect/models/card.rb +1 -1
  56. data/lib/square_connect/models/create_customer_request.rb +14 -4
  57. data/lib/square_connect/models/customer.rb +11 -1
  58. data/lib/square_connect/models/error.rb +2 -2
  59. data/lib/square_connect/models/error_code.rb +2 -0
  60. data/lib/square_connect/models/inventory_adjustment.rb +391 -0
  61. data/lib/square_connect/models/inventory_change.rb +249 -0
  62. data/lib/square_connect/models/inventory_change_type.rb +20 -0
  63. data/lib/square_connect/models/inventory_count.rb +269 -0
  64. data/lib/square_connect/models/inventory_physical_count.rb +319 -0
  65. data/lib/square_connect/models/inventory_state.rb +29 -0
  66. data/lib/square_connect/models/inventory_transfer.rb +329 -0
  67. data/lib/square_connect/models/money.rb +0 -9
  68. data/lib/square_connect/models/product.rb +25 -0
  69. data/lib/square_connect/models/retrieve_inventory_adjustment_request.rb +176 -0
  70. data/lib/square_connect/models/retrieve_inventory_adjustment_response.rb +198 -0
  71. data/lib/square_connect/models/retrieve_inventory_changes_request.rb +196 -0
  72. data/lib/square_connect/models/retrieve_inventory_changes_response.rb +210 -0
  73. data/lib/square_connect/models/retrieve_inventory_count_request.rb +196 -0
  74. data/lib/square_connect/models/retrieve_inventory_count_response.rb +210 -0
  75. data/lib/square_connect/models/retrieve_inventory_physical_count_request.rb +176 -0
  76. data/lib/square_connect/models/retrieve_inventory_physical_count_response.rb +198 -0
  77. data/lib/square_connect/models/source_application.rb +239 -0
  78. data/lib/square_connect/models/update_customer_request.rb +14 -4
  79. data/lib/square_connect/models/v1_timecard.rb +35 -5
  80. data/lib/square_connect/version.rb +1 -1
  81. data/spec/api/inventory_api_spec.rb +120 -0
  82. data/spec/models/batch_change_inventory_request_spec.rb +51 -0
  83. data/spec/models/batch_change_inventory_response_spec.rb +45 -0
  84. data/spec/models/batch_retrieve_inventory_changes_request_spec.rb +83 -0
  85. data/spec/models/batch_retrieve_inventory_changes_response_spec.rb +51 -0
  86. data/spec/models/batch_retrieve_inventory_counts_request_spec.rb +57 -0
  87. data/spec/models/batch_retrieve_inventory_counts_response_spec.rb +51 -0
  88. data/spec/models/inventory_adjustment_spec.rb +143 -0
  89. data/spec/models/inventory_change_spec.rb +61 -0
  90. data/spec/models/inventory_change_type_spec.rb +33 -0
  91. data/spec/models/inventory_count_spec.rb +73 -0
  92. data/spec/models/inventory_physical_count_spec.rb +103 -0
  93. data/spec/models/inventory_state_spec.rb +33 -0
  94. data/spec/models/inventory_transfer_spec.rb +109 -0
  95. data/spec/models/product_spec.rb +33 -0
  96. data/spec/models/retrieve_inventory_adjustment_request_spec.rb +33 -0
  97. data/spec/models/retrieve_inventory_adjustment_response_spec.rb +45 -0
  98. data/spec/models/retrieve_inventory_changes_request_spec.rb +45 -0
  99. data/spec/models/retrieve_inventory_changes_response_spec.rb +51 -0
  100. data/spec/models/retrieve_inventory_count_request_spec.rb +45 -0
  101. data/spec/models/retrieve_inventory_count_response_spec.rb +51 -0
  102. data/spec/models/retrieve_inventory_physical_count_request_spec.rb +33 -0
  103. data/spec/models/retrieve_inventory_physical_count_response_spec.rb +45 -0
  104. data/spec/models/source_application_spec.rb +55 -0
  105. metadata +99 -3
@@ -0,0 +1,103 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SquareConnect::InventoryPhysicalCount
15
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
16
+ # Please update as you see appropriate
17
+ describe 'InventoryPhysicalCount' do
18
+ before do
19
+ # run before each test
20
+ @instance = SquareConnect::InventoryPhysicalCount.new
21
+ end
22
+
23
+ after do
24
+ # run after each test
25
+ end
26
+
27
+ describe 'test an instance of InventoryPhysicalCount' do
28
+ it 'should create an instact of InventoryPhysicalCount' do
29
+ expect(@instance).to be_instance_of(SquareConnect::InventoryPhysicalCount)
30
+ end
31
+ end
32
+ describe 'test attribute "id"' do
33
+ it 'should work' do
34
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
35
+ end
36
+ end
37
+
38
+ describe 'test attribute "reference_id"' do
39
+ it 'should work' do
40
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
41
+ end
42
+ end
43
+
44
+ describe 'test attribute "catalog_object_id"' do
45
+ it 'should work' do
46
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
+ end
48
+ end
49
+
50
+ describe 'test attribute "catalog_object_type"' do
51
+ it 'should work' do
52
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
53
+ end
54
+ end
55
+
56
+ describe 'test attribute "state"' do
57
+ it 'should work' do
58
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
59
+ #validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["CUSTOM", "IN_STOCK", "SOLD", "RETURNED_BY_CUSTOMER", "RESERVED_FOR_SALE", "SOLD_ONLINE", "ORDERED_FROM_VENDOR", "RECEIVED_FROM_VENDOR", "IN_TRANSIT_TO", "NONE", "WASTE", "UNLINKED_RETURN"])
60
+ #validator.allowable_values.each do |value|
61
+ # expect { @instance.state = value }.not_to raise_error
62
+ #end
63
+ end
64
+ end
65
+
66
+ describe 'test attribute "location_id"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
72
+ describe 'test attribute "quantity"' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
75
+ end
76
+ end
77
+
78
+ describe 'test attribute "source"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
81
+ end
82
+ end
83
+
84
+ describe 'test attribute "employee_id"' do
85
+ it 'should work' do
86
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
87
+ end
88
+ end
89
+
90
+ describe 'test attribute "occurred_at"' do
91
+ it 'should work' do
92
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
93
+ end
94
+ end
95
+
96
+ describe 'test attribute "created_at"' do
97
+ it 'should work' do
98
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
99
+ end
100
+ end
101
+
102
+ end
103
+
@@ -0,0 +1,33 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SquareConnect::InventoryState
15
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
16
+ # Please update as you see appropriate
17
+ describe 'InventoryState' do
18
+ before do
19
+ # run before each test
20
+ @instance = SquareConnect::InventoryState.new
21
+ end
22
+
23
+ after do
24
+ # run after each test
25
+ end
26
+
27
+ describe 'test an instance of InventoryState' do
28
+ it 'should create an instact of InventoryState' do
29
+ expect(@instance).to be_instance_of(SquareConnect::InventoryState)
30
+ end
31
+ end
32
+ end
33
+
@@ -0,0 +1,109 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SquareConnect::InventoryTransfer
15
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
16
+ # Please update as you see appropriate
17
+ describe 'InventoryTransfer' do
18
+ before do
19
+ # run before each test
20
+ @instance = SquareConnect::InventoryTransfer.new
21
+ end
22
+
23
+ after do
24
+ # run after each test
25
+ end
26
+
27
+ describe 'test an instance of InventoryTransfer' do
28
+ it 'should create an instact of InventoryTransfer' do
29
+ expect(@instance).to be_instance_of(SquareConnect::InventoryTransfer)
30
+ end
31
+ end
32
+ describe 'test attribute "id"' do
33
+ it 'should work' do
34
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
35
+ end
36
+ end
37
+
38
+ describe 'test attribute "reference_id"' do
39
+ it 'should work' do
40
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
41
+ end
42
+ end
43
+
44
+ describe 'test attribute "state"' do
45
+ it 'should work' do
46
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
+ #validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["CUSTOM", "IN_STOCK", "SOLD", "RETURNED_BY_CUSTOMER", "RESERVED_FOR_SALE", "SOLD_ONLINE", "ORDERED_FROM_VENDOR", "RECEIVED_FROM_VENDOR", "IN_TRANSIT_TO", "NONE", "WASTE", "UNLINKED_RETURN"])
48
+ #validator.allowable_values.each do |value|
49
+ # expect { @instance.state = value }.not_to raise_error
50
+ #end
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "from_location_id"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "to_location_id"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
+ end
64
+ end
65
+
66
+ describe 'test attribute "catalog_object_id"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
72
+ describe 'test attribute "catalog_object_type"' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
75
+ end
76
+ end
77
+
78
+ describe 'test attribute "quantity"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
81
+ end
82
+ end
83
+
84
+ describe 'test attribute "occurred_at"' do
85
+ it 'should work' do
86
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
87
+ end
88
+ end
89
+
90
+ describe 'test attribute "created_at"' do
91
+ it 'should work' do
92
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
93
+ end
94
+ end
95
+
96
+ describe 'test attribute "source"' do
97
+ it 'should work' do
98
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
99
+ end
100
+ end
101
+
102
+ describe 'test attribute "employee_id"' do
103
+ it 'should work' do
104
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
105
+ end
106
+ end
107
+
108
+ end
109
+
@@ -0,0 +1,33 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SquareConnect::Product
15
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
16
+ # Please update as you see appropriate
17
+ describe 'Product' do
18
+ before do
19
+ # run before each test
20
+ @instance = SquareConnect::Product.new
21
+ end
22
+
23
+ after do
24
+ # run after each test
25
+ end
26
+
27
+ describe 'test an instance of Product' do
28
+ it 'should create an instact of Product' do
29
+ expect(@instance).to be_instance_of(SquareConnect::Product)
30
+ end
31
+ end
32
+ end
33
+
@@ -0,0 +1,33 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SquareConnect::RetrieveInventoryAdjustmentRequest
15
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
16
+ # Please update as you see appropriate
17
+ describe 'RetrieveInventoryAdjustmentRequest' do
18
+ before do
19
+ # run before each test
20
+ @instance = SquareConnect::RetrieveInventoryAdjustmentRequest.new
21
+ end
22
+
23
+ after do
24
+ # run after each test
25
+ end
26
+
27
+ describe 'test an instance of RetrieveInventoryAdjustmentRequest' do
28
+ it 'should create an instact of RetrieveInventoryAdjustmentRequest' do
29
+ expect(@instance).to be_instance_of(SquareConnect::RetrieveInventoryAdjustmentRequest)
30
+ end
31
+ end
32
+ end
33
+
@@ -0,0 +1,45 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SquareConnect::RetrieveInventoryAdjustmentResponse
15
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
16
+ # Please update as you see appropriate
17
+ describe 'RetrieveInventoryAdjustmentResponse' do
18
+ before do
19
+ # run before each test
20
+ @instance = SquareConnect::RetrieveInventoryAdjustmentResponse.new
21
+ end
22
+
23
+ after do
24
+ # run after each test
25
+ end
26
+
27
+ describe 'test an instance of RetrieveInventoryAdjustmentResponse' do
28
+ it 'should create an instact of RetrieveInventoryAdjustmentResponse' do
29
+ expect(@instance).to be_instance_of(SquareConnect::RetrieveInventoryAdjustmentResponse)
30
+ end
31
+ end
32
+ describe 'test attribute "errors"' do
33
+ it 'should work' do
34
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
35
+ end
36
+ end
37
+
38
+ describe 'test attribute "adjustment"' do
39
+ it 'should work' do
40
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
41
+ end
42
+ end
43
+
44
+ end
45
+
@@ -0,0 +1,45 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SquareConnect::RetrieveInventoryChangesRequest
15
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
16
+ # Please update as you see appropriate
17
+ describe 'RetrieveInventoryChangesRequest' do
18
+ before do
19
+ # run before each test
20
+ @instance = SquareConnect::RetrieveInventoryChangesRequest.new
21
+ end
22
+
23
+ after do
24
+ # run after each test
25
+ end
26
+
27
+ describe 'test an instance of RetrieveInventoryChangesRequest' do
28
+ it 'should create an instact of RetrieveInventoryChangesRequest' do
29
+ expect(@instance).to be_instance_of(SquareConnect::RetrieveInventoryChangesRequest)
30
+ end
31
+ end
32
+ describe 'test attribute "location_ids"' do
33
+ it 'should work' do
34
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
35
+ end
36
+ end
37
+
38
+ describe 'test attribute "cursor"' do
39
+ it 'should work' do
40
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
41
+ end
42
+ end
43
+
44
+ end
45
+
@@ -0,0 +1,51 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require 'spec_helper'
11
+ require 'json'
12
+ require 'date'
13
+
14
+ # Unit tests for SquareConnect::RetrieveInventoryChangesResponse
15
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
16
+ # Please update as you see appropriate
17
+ describe 'RetrieveInventoryChangesResponse' do
18
+ before do
19
+ # run before each test
20
+ @instance = SquareConnect::RetrieveInventoryChangesResponse.new
21
+ end
22
+
23
+ after do
24
+ # run after each test
25
+ end
26
+
27
+ describe 'test an instance of RetrieveInventoryChangesResponse' do
28
+ it 'should create an instact of RetrieveInventoryChangesResponse' do
29
+ expect(@instance).to be_instance_of(SquareConnect::RetrieveInventoryChangesResponse)
30
+ end
31
+ end
32
+ describe 'test attribute "errors"' do
33
+ it 'should work' do
34
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
35
+ end
36
+ end
37
+
38
+ describe 'test attribute "changes"' do
39
+ it 'should work' do
40
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
41
+ end
42
+ end
43
+
44
+ describe 'test attribute "cursor"' do
45
+ it 'should work' do
46
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
+ end
48
+ end
49
+
50
+ end
51
+