subtledata 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,57 @@
1
+ require "uri"
2
+
3
+ class Concessions_api
4
+ basePath = "https://api.subtledata.com/v1"
5
+ # apiInvoker = APIInvoker
6
+
7
+ def self.escapeString(string)
8
+ URI.encode(string.to_s)
9
+ end
10
+
11
+ def self.create_concession_order (location_id,api_key,body,opts={})
12
+ query_param_keys = [:api_key]
13
+
14
+ # verify existence of params
15
+ raise "location_id is required" if location_id.nil?
16
+ raise "api_key is required" if api_key.nil?
17
+ raise "body is required" if body.nil?
18
+ # set default values and merge with input
19
+ options = { :location_id => location_id, :api_key => api_key, :body => body}.merge(opts)
20
+
21
+ #resource path
22
+ path = "/concessions/{location_id}/order".sub('{format}','json').sub('{' + 'location_id' + '}', escapeString(location_id))
23
+
24
+
25
+ # pull querystring keys from options
26
+ queryopts = options.select do |key,value|
27
+ query_param_keys.include? key
28
+ end
29
+
30
+ headers = nil
31
+ post_body = nil
32
+ if body != nil
33
+ if body.is_a?(Array)
34
+ array = Array.new
35
+ body.each do |item|
36
+ if item.respond_to?("to_body".to_sym)
37
+ array.push item.to_body
38
+ else
39
+ array.push item
40
+ end
41
+ end
42
+ post_body = array
43
+
44
+ else
45
+ if body.respond_to?("to_body".to_sym)
46
+ post_body = body.to_body
47
+ else
48
+ post_body = body
49
+ end
50
+ end
51
+ end
52
+ response = Swagger::Request.new(:POST, path, {:params=>queryopts,:headers=>headers, :body=>post_body }).make.body
53
+ ConcessionOrderResults.new(response)
54
+ end
55
+
56
+ end
57
+
data/lib/locations_api.rb CHANGED
@@ -103,6 +103,32 @@ def self.get_location_menu (location_id,api_key,use_cache,opts={})
103
103
  response.map {|response|Category.new(response)}
104
104
  end
105
105
 
106
+ def self.get_menu_item (location_id,item_id,api_key,use_cache,opts={})
107
+ query_param_keys = [:api_key,:use_cache]
108
+
109
+ # verify existence of params
110
+ raise "location_id is required" if location_id.nil?
111
+ raise "item_id is required" if item_id.nil?
112
+ raise "api_key is required" if api_key.nil?
113
+ # set default values and merge with input
114
+ options = { :location_id => location_id, :item_id => item_id, :api_key => api_key, :use_cache => use_cache}.merge(opts)
115
+
116
+ #resource path
117
+ path = "/locations/{location_id}/menu/items/{item_id}".sub('{format}','json').sub('{' + 'location_id' + '}', escapeString(location_id))
118
+ .sub('{' + 'item_id' + '}', escapeString(item_id))
119
+
120
+
121
+ # pull querystring keys from options
122
+ queryopts = options.select do |key,value|
123
+ query_param_keys.include? key
124
+ end
125
+
126
+ headers = nil
127
+ post_body = nil
128
+ response = Swagger::Request.new(:GET, path, {:params=>queryopts,:headers=>headers, :body=>post_body }).make.body
129
+ MenuItem.new(response)
130
+ end
131
+
106
132
  def self.get_location_employees (location_id,api_key,manager_id,revenue_center_id,opts={})
107
133
  query_param_keys = [:api_key,:manager_id,:revenue_center_id]
108
134
 
data/lib/subtledata.rb CHANGED
@@ -7,6 +7,7 @@ require_relative './locations_api.rb'
7
7
  require_relative './monkey.rb'
8
8
  require_relative './swagger.rb'
9
9
  require_relative './users_api.rb'
10
+ require_relative './concessions_api.rb'
10
11
 
11
12
  Swagger.configure do |config|
12
13
  config.format = 'json'
@@ -3,7 +3,8 @@ module Swagger
3
3
  class Configuration
4
4
  require 'swagger/version'
5
5
 
6
- attr_accessor :format, :api_key, :username, :password, :auth_token, :scheme, :host, :base_path, :user_agent, :logger, :inject_format
6
+ attr_accessor :format, :api_key, :username, :password, :auth_token, :scheme, :host, :base_path,
7
+ :user_agent, :logger, :inject_format
7
8
 
8
9
  # Defaults go in here..
9
10
  def initialize
@@ -18,3 +19,4 @@ module Swagger
18
19
  end
19
20
 
20
21
  end
22
+
@@ -186,3 +186,4 @@ module Swagger
186
186
 
187
187
  end
188
188
  end
189
+
@@ -0,0 +1,57 @@
1
+ class Availablemodifier
2
+ attr_accessor :name, :date_updated, :price, :available_to_order, :modifier_id, :description
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :name => :name, :date_updated => :date_updated, :price => :price, :available_to_order => :available_to_order, :modifier_id => :modifier_id, :description => :description
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if Availablemodifier.attribute_map["name".to_sym] != nil
17
+ name = "name".to_sym
18
+ value = attributes["name"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if Availablemodifier.attribute_map["date_updated".to_sym] != nil
22
+ name = "date_updated".to_sym
23
+ value = attributes["date_updated"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if Availablemodifier.attribute_map["price".to_sym] != nil
27
+ name = "price".to_sym
28
+ value = attributes["price"]
29
+ send("#{name}=", value) if self.respond_to?(name)
30
+ end
31
+ if Availablemodifier.attribute_map["available_to_order".to_sym] != nil
32
+ name = "available_to_order".to_sym
33
+ value = attributes["available_to_order"]
34
+ send("#{name}=", value) if self.respond_to?(name)
35
+ end
36
+ if Availablemodifier.attribute_map["modifier_id".to_sym] != nil
37
+ name = "modifier_id".to_sym
38
+ value = attributes["modifier_id"]
39
+ send("#{name}=", value) if self.respond_to?(name)
40
+ end
41
+ if Availablemodifier.attribute_map["description".to_sym] != nil
42
+ name = "description".to_sym
43
+ value = attributes["description"]
44
+ send("#{name}=", value) if self.respond_to?(name)
45
+ end
46
+ end
47
+ end
48
+
49
+ def to_body
50
+ body = {}
51
+ Availablemodifier.attribute_map.each_pair do |key,value|
52
+ body[value] = self.send(key) unless self.send(key).nil?
53
+ end
54
+ body
55
+ end
56
+ end
57
+
@@ -0,0 +1,92 @@
1
+ class CardPayment
2
+ attr_accessor :name_on_card, :tip_amount, :expiration_year, :amount_before_tip, :tip_type, :card_id, :expiration_month, :mag_track_2, :mag_track_1, :signature_image, :tender_type_id, :billing_zip, :card_number
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :name_on_card => :name_on_card, :tip_amount => :tip_amount, :expiration_year => :expiration_year, :amount_before_tip => :amount_before_tip, :tip_type => :tip_type, :card_id => :card_id, :expiration_month => :expiration_month, :mag_track_2 => :mag_track_2, :mag_track_1 => :mag_track_1, :signature_image => :signature_image, :tender_type_id => :tender_type_id, :billing_zip => :billing_zip, :card_number => :card_number
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if CardPayment.attribute_map["name_on_card".to_sym] != nil
17
+ name = "name_on_card".to_sym
18
+ value = attributes["name_on_card"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if CardPayment.attribute_map["tip_amount".to_sym] != nil
22
+ name = "tip_amount".to_sym
23
+ value = attributes["tip_amount"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if CardPayment.attribute_map["expiration_year".to_sym] != nil
27
+ name = "expiration_year".to_sym
28
+ value = attributes["expiration_year"]
29
+ send("#{name}=", value) if self.respond_to?(name)
30
+ end
31
+ if CardPayment.attribute_map["amount_before_tip".to_sym] != nil
32
+ name = "amount_before_tip".to_sym
33
+ value = attributes["amount_before_tip"]
34
+ send("#{name}=", value) if self.respond_to?(name)
35
+ end
36
+ if CardPayment.attribute_map["tip_type".to_sym] != nil
37
+ name = "tip_type".to_sym
38
+ value = attributes["tip_type"]
39
+ send("#{name}=", value) if self.respond_to?(name)
40
+ end
41
+ if CardPayment.attribute_map["card_id".to_sym] != nil
42
+ name = "card_id".to_sym
43
+ value = attributes["card_id"]
44
+ send("#{name}=", value) if self.respond_to?(name)
45
+ end
46
+ if CardPayment.attribute_map["expiration_month".to_sym] != nil
47
+ name = "expiration_month".to_sym
48
+ value = attributes["expiration_month"]
49
+ send("#{name}=", value) if self.respond_to?(name)
50
+ end
51
+ if CardPayment.attribute_map["mag_track_2".to_sym] != nil
52
+ name = "mag_track_2".to_sym
53
+ value = attributes["mag_track_2"]
54
+ send("#{name}=", value) if self.respond_to?(name)
55
+ end
56
+ if CardPayment.attribute_map["mag_track_1".to_sym] != nil
57
+ name = "mag_track_1".to_sym
58
+ value = attributes["mag_track_1"]
59
+ send("#{name}=", value) if self.respond_to?(name)
60
+ end
61
+ if CardPayment.attribute_map["signature_image".to_sym] != nil
62
+ name = "signature_image".to_sym
63
+ value = attributes["signature_image"]
64
+ send("#{name}=", value) if self.respond_to?(name)
65
+ end
66
+ if CardPayment.attribute_map["tender_type_id".to_sym] != nil
67
+ name = "tender_type_id".to_sym
68
+ value = attributes["tender_type_id"]
69
+ send("#{name}=", value) if self.respond_to?(name)
70
+ end
71
+ if CardPayment.attribute_map["billing_zip".to_sym] != nil
72
+ name = "billing_zip".to_sym
73
+ value = attributes["billing_zip"]
74
+ send("#{name}=", value) if self.respond_to?(name)
75
+ end
76
+ if CardPayment.attribute_map["card_number".to_sym] != nil
77
+ name = "card_number".to_sym
78
+ value = attributes["card_number"]
79
+ send("#{name}=", value) if self.respond_to?(name)
80
+ end
81
+ end
82
+ end
83
+
84
+ def to_body
85
+ body = {}
86
+ CardPayment.attribute_map.each_pair do |key,value|
87
+ body[value] = self.send(key) unless self.send(key).nil?
88
+ end
89
+ body
90
+ end
91
+ end
92
+
data/models/category.rb CHANGED
@@ -19,7 +19,7 @@ class Category
19
19
  if value.is_a?(Array)
20
20
  array = Array.new
21
21
  value.each do |arrayValue|
22
- array.push Item.new(arrayValue)
22
+ array.push MenuItemDetail.new(arrayValue)
23
23
  end
24
24
  send("#{name}=", array) if self.respond_to?(name)
25
25
  end
@@ -0,0 +1,52 @@
1
+ class ConcessionOrderResults
2
+ attr_accessor :payment_success, :error, :ticket_id, :success, :result
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :payment_success => :payment_success, :error => :error, :ticket_id => :ticket_id, :success => :success, :result => :result
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if ConcessionOrderResults.attribute_map["payment_success".to_sym] != nil
17
+ name = "payment_success".to_sym
18
+ value = attributes["payment_success"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if ConcessionOrderResults.attribute_map["error".to_sym] != nil
22
+ name = "error".to_sym
23
+ value = attributes["error"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if ConcessionOrderResults.attribute_map["ticket_id".to_sym] != nil
27
+ name = "ticket_id".to_sym
28
+ value = attributes["ticket_id"]
29
+ send("#{name}=", value) if self.respond_to?(name)
30
+ end
31
+ if ConcessionOrderResults.attribute_map["success".to_sym] != nil
32
+ name = "success".to_sym
33
+ value = attributes["success"]
34
+ send("#{name}=", value) if self.respond_to?(name)
35
+ end
36
+ if ConcessionOrderResults.attribute_map["result".to_sym] != nil
37
+ name = "result".to_sym
38
+ value = attributes["result"]
39
+ send("#{name}=", value) if self.respond_to?(name)
40
+ end
41
+ end
42
+ end
43
+
44
+ def to_body
45
+ body = {}
46
+ ConcessionOrderResults.attribute_map.each_pair do |key,value|
47
+ body[value] = self.send(key) unless self.send(key).nil?
48
+ end
49
+ body
50
+ end
51
+ end
52
+
@@ -0,0 +1,89 @@
1
+ class ConcessionTicketDetails
2
+ attr_accessor :employee_id, :user_id, :number_of_people_in_party, :ticket_notes, :items, :terminal_id, :table_id, :revenue_center_id, :card_payments, :device_id
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :employee_id => :employee_id, :user_id => :user_id, :number_of_people_in_party => :number_of_people_in_party, :ticket_notes => :ticket_notes, :items => :items, :terminal_id => :terminal_id, :table_id => :table_id, :revenue_center_id => :revenue_center_id, :card_payments => :card_payments, :device_id => :device_id
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if ConcessionTicketDetails.attribute_map["employee_id".to_sym] != nil
17
+ name = "employee_id".to_sym
18
+ value = attributes["employee_id"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if ConcessionTicketDetails.attribute_map["user_id".to_sym] != nil
22
+ name = "user_id".to_sym
23
+ value = attributes["user_id"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if ConcessionTicketDetails.attribute_map["number_of_people_in_party".to_sym] != nil
27
+ name = "number_of_people_in_party".to_sym
28
+ value = attributes["number_of_people_in_party"]
29
+ send("#{name}=", value) if self.respond_to?(name)
30
+ end
31
+ if ConcessionTicketDetails.attribute_map["ticket_notes".to_sym] != nil
32
+ name = "ticket_notes".to_sym
33
+ value = attributes["ticket_notes"]
34
+ send("#{name}=", value) if self.respond_to?(name)
35
+ end
36
+ if ConcessionTicketDetails.attribute_map["items".to_sym] != nil
37
+ name = "items".to_sym
38
+ value = attributes["items"]
39
+ if value.is_a?(Array)
40
+ array = Array.new
41
+ value.each do |arrayValue|
42
+ array.push Item.new(arrayValue)
43
+ end
44
+ send("#{name}=", array) if self.respond_to?(name)
45
+ end
46
+ end
47
+ if ConcessionTicketDetails.attribute_map["terminal_id".to_sym] != nil
48
+ name = "terminal_id".to_sym
49
+ value = attributes["terminal_id"]
50
+ send("#{name}=", value) if self.respond_to?(name)
51
+ end
52
+ if ConcessionTicketDetails.attribute_map["table_id".to_sym] != nil
53
+ name = "table_id".to_sym
54
+ value = attributes["table_id"]
55
+ send("#{name}=", value) if self.respond_to?(name)
56
+ end
57
+ if ConcessionTicketDetails.attribute_map["revenue_center_id".to_sym] != nil
58
+ name = "revenue_center_id".to_sym
59
+ value = attributes["revenue_center_id"]
60
+ send("#{name}=", value) if self.respond_to?(name)
61
+ end
62
+ if ConcessionTicketDetails.attribute_map["card_payments".to_sym] != nil
63
+ name = "card_payments".to_sym
64
+ value = attributes["card_payments"]
65
+ if value.is_a?(Array)
66
+ array = Array.new
67
+ value.each do |arrayValue|
68
+ array.push CardPayment.new(arrayValue)
69
+ end
70
+ send("#{name}=", array) if self.respond_to?(name)
71
+ end
72
+ end
73
+ if ConcessionTicketDetails.attribute_map["device_id".to_sym] != nil
74
+ name = "device_id".to_sym
75
+ value = attributes["device_id"]
76
+ send("#{name}=", value) if self.respond_to?(name)
77
+ end
78
+ end
79
+ end
80
+
81
+ def to_body
82
+ body = {}
83
+ ConcessionTicketDetails.attribute_map.each_pair do |key,value|
84
+ body[value] = self.send(key) unless self.send(key).nil?
85
+ end
86
+ body
87
+ end
88
+ end
89
+
data/models/item.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  class Item
2
- attr_accessor :description, :price, :name, :revenue_center_id, :item_id, :item_images
2
+ attr_accessor :item_id, :instructions, :modifiers, :quantity
3
3
 
4
4
  # :internal => :external
5
5
  def self.attribute_map
6
6
  {
7
- :description => :description, :price => :price, :name => :name, :revenue_center_id => :revenue_center_id, :item_id => :item_id, :item_images => :item_images
7
+ :item_id => :item_id, :instructions => :instructions, :modifiers => :modifiers, :quantity => :quantity
8
8
 
9
9
  }
10
10
  end
@@ -13,42 +13,32 @@ class Item
13
13
  # Morph attribute keys into undescored rubyish style
14
14
  if attributes.to_s != ""
15
15
 
16
- if Item.attribute_map["description".to_sym] != nil
17
- name = "description".to_sym
18
- value = attributes["description"]
19
- send("#{name}=", value) if self.respond_to?(name)
20
- end
21
- if Item.attribute_map["price".to_sym] != nil
22
- name = "price".to_sym
23
- value = attributes["price"]
24
- send("#{name}=", value) if self.respond_to?(name)
25
- end
26
- if Item.attribute_map["name".to_sym] != nil
27
- name = "name".to_sym
28
- value = attributes["name"]
29
- send("#{name}=", value) if self.respond_to?(name)
30
- end
31
- if Item.attribute_map["revenue_center_id".to_sym] != nil
32
- name = "revenue_center_id".to_sym
33
- value = attributes["revenue_center_id"]
34
- send("#{name}=", value) if self.respond_to?(name)
35
- end
36
16
  if Item.attribute_map["item_id".to_sym] != nil
37
17
  name = "item_id".to_sym
38
18
  value = attributes["item_id"]
39
19
  send("#{name}=", value) if self.respond_to?(name)
40
20
  end
41
- if Item.attribute_map["item_images".to_sym] != nil
42
- name = "item_images".to_sym
43
- value = attributes["item_images"]
21
+ if Item.attribute_map["instructions".to_sym] != nil
22
+ name = "instructions".to_sym
23
+ value = attributes["instructions"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if Item.attribute_map["modifiers".to_sym] != nil
27
+ name = "modifiers".to_sym
28
+ value = attributes["modifiers"]
44
29
  if value.is_a?(Array)
45
30
  array = Array.new
46
31
  value.each do |arrayValue|
47
- array.push ItemImage.new(arrayValue)
32
+ array.push Modifier.new(arrayValue)
48
33
  end
49
34
  send("#{name}=", array) if self.respond_to?(name)
50
35
  end
51
36
  end
37
+ if Item.attribute_map["quantity".to_sym] != nil
38
+ name = "quantity".to_sym
39
+ value = attributes["quantity"]
40
+ send("#{name}=", value) if self.respond_to?(name)
41
+ end
52
42
  end
53
43
  end
54
44
 
@@ -0,0 +1,42 @@
1
+ class ItemModifier
2
+ attr_accessor :name, :modifier_id, :instructions
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :name => :name, :modifier_id => :modifier_id, :instructions => :instructions
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if ItemModifier.attribute_map["name".to_sym] != nil
17
+ name = "name".to_sym
18
+ value = attributes["name"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if ItemModifier.attribute_map["modifier_id".to_sym] != nil
22
+ name = "modifier_id".to_sym
23
+ value = attributes["modifier_id"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if ItemModifier.attribute_map["instructions".to_sym] != nil
27
+ name = "instructions".to_sym
28
+ value = attributes["instructions"]
29
+ send("#{name}=", value) if self.respond_to?(name)
30
+ end
31
+ end
32
+ end
33
+
34
+ def to_body
35
+ body = {}
36
+ ItemModifier.attribute_map.each_pair do |key,value|
37
+ body[value] = self.send(key) unless self.send(key).nil?
38
+ end
39
+ body
40
+ end
41
+ end
42
+
data/models/itemtoadd.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  class ItemToAdd
2
- attr_accessor :item_id, :instructions, :quantity
2
+ attr_accessor :item_id, :instructions, :modifiers, :quantity
3
3
 
4
4
  # :internal => :external
5
5
  def self.attribute_map
6
6
  {
7
- :item_id => :item_id, :instructions => :instructions, :quantity => :quantity
7
+ :item_id => :item_id, :instructions => :instructions, :modifiers => :modifiers, :quantity => :quantity
8
8
 
9
9
  }
10
10
  end
@@ -23,6 +23,17 @@ class ItemToAdd
23
23
  value = attributes["instructions"]
24
24
  send("#{name}=", value) if self.respond_to?(name)
25
25
  end
26
+ if ItemToAdd.attribute_map["modifiers".to_sym] != nil
27
+ name = "modifiers".to_sym
28
+ value = attributes["modifiers"]
29
+ if value.is_a?(Array)
30
+ array = Array.new
31
+ value.each do |arrayValue|
32
+ array.push Modifier.new(arrayValue)
33
+ end
34
+ send("#{name}=", array) if self.respond_to?(name)
35
+ end
36
+ end
26
37
  if ItemToAdd.attribute_map["quantity".to_sym] != nil
27
38
  name = "quantity".to_sym
28
39
  value = attributes["quantity"]
data/models/local.rb ADDED
@@ -0,0 +1,53 @@
1
+ class Local
2
+ attr_accessor :description, :category_id, :name, :modifier_list
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :description => :description, :category_id => :category_id, :name => :name, :modifier_list => :modifier_list
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if Local.attribute_map["description".to_sym] != nil
17
+ name = "description".to_sym
18
+ value = attributes["description"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if Local.attribute_map["category_id".to_sym] != nil
22
+ name = "category_id".to_sym
23
+ value = attributes["category_id"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if Local.attribute_map["name".to_sym] != nil
27
+ name = "name".to_sym
28
+ value = attributes["name"]
29
+ send("#{name}=", value) if self.respond_to?(name)
30
+ end
31
+ if Local.attribute_map["modifier_list".to_sym] != nil
32
+ name = "modifier_list".to_sym
33
+ value = attributes["modifier_list"]
34
+ if value.is_a?(Array)
35
+ array = Array.new
36
+ value.each do |arrayValue|
37
+ array.push ModifierList.new(arrayValue)
38
+ end
39
+ send("#{name}=", array) if self.respond_to?(name)
40
+ end
41
+ end
42
+ end
43
+ end
44
+
45
+ def to_body
46
+ body = {}
47
+ Local.attribute_map.each_pair do |key,value|
48
+ body[value] = self.send(key) unless self.send(key).nil?
49
+ end
50
+ body
51
+ end
52
+ end
53
+
data/models/mapped.rb ADDED
@@ -0,0 +1,63 @@
1
+ class Mapped
2
+ attr_accessor :minimum_order, :name, :_available_modifiers, :maximum_order, :category_id, :description
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :minimum_order => :minimum_order, :name => :name, :_available_modifiers => :AvailableModifiers, :maximum_order => :maximum_order, :category_id => :category_id, :description => :description
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if Mapped.attribute_map["minimum_order".to_sym] != nil
17
+ name = "minimum_order".to_sym
18
+ value = attributes["minimum_order"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if Mapped.attribute_map["name".to_sym] != nil
22
+ name = "name".to_sym
23
+ value = attributes["name"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if Mapped.attribute_map["_available_modifiers".to_sym] != nil
27
+ name = "_available_modifiers".to_sym
28
+ value = attributes["AvailableModifiers"]
29
+ if value.is_a?(Array)
30
+ array = Array.new
31
+ value.each do |arrayValue|
32
+ array.push Availablemodifier.new(arrayValue)
33
+ end
34
+ send("#{name}=", array) if self.respond_to?(name)
35
+ end
36
+ end
37
+ if Mapped.attribute_map["maximum_order".to_sym] != nil
38
+ name = "maximum_order".to_sym
39
+ value = attributes["maximum_order"]
40
+ send("#{name}=", value) if self.respond_to?(name)
41
+ end
42
+ if Mapped.attribute_map["category_id".to_sym] != nil
43
+ name = "category_id".to_sym
44
+ value = attributes["category_id"]
45
+ send("#{name}=", value) if self.respond_to?(name)
46
+ end
47
+ if Mapped.attribute_map["description".to_sym] != nil
48
+ name = "description".to_sym
49
+ value = attributes["description"]
50
+ send("#{name}=", value) if self.respond_to?(name)
51
+ end
52
+ end
53
+ end
54
+
55
+ def to_body
56
+ body = {}
57
+ Mapped.attribute_map.each_pair do |key,value|
58
+ body[value] = self.send(key) unless self.send(key).nil?
59
+ end
60
+ body
61
+ end
62
+ end
63
+
@@ -0,0 +1,124 @@
1
+ class MenuItem
2
+ attr_accessor :sku, :food_flag, :alcohol_flag, :display_name, :name, :merchandise_flag, :available_for_order, :price, :description, :_u_p_c, :_modifier_types, :item_images, :cost, :revenue_center_id, :item_id, :local_pos_id, :out_of_stock_flag
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :sku => :sku, :food_flag => :food_flag, :alcohol_flag => :alcohol_flag, :display_name => :display_name, :name => :name, :merchandise_flag => :merchandise_flag, :available_for_order => :available_for_order, :price => :price, :description => :description, :_u_p_c => :UPC, :_modifier_types => :ModifierTypes, :item_images => :item_images, :cost => :cost, :revenue_center_id => :revenue_center_id, :item_id => :item_id, :local_pos_id => :local_pos_id, :out_of_stock_flag => :out_of_stock_flag
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if MenuItem.attribute_map["sku".to_sym] != nil
17
+ name = "sku".to_sym
18
+ value = attributes["sku"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if MenuItem.attribute_map["food_flag".to_sym] != nil
22
+ name = "food_flag".to_sym
23
+ value = attributes["food_flag"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if MenuItem.attribute_map["alcohol_flag".to_sym] != nil
27
+ name = "alcohol_flag".to_sym
28
+ value = attributes["alcohol_flag"]
29
+ send("#{name}=", value) if self.respond_to?(name)
30
+ end
31
+ if MenuItem.attribute_map["display_name".to_sym] != nil
32
+ name = "display_name".to_sym
33
+ value = attributes["display_name"]
34
+ send("#{name}=", value) if self.respond_to?(name)
35
+ end
36
+ if MenuItem.attribute_map["name".to_sym] != nil
37
+ name = "name".to_sym
38
+ value = attributes["name"]
39
+ send("#{name}=", value) if self.respond_to?(name)
40
+ end
41
+ if MenuItem.attribute_map["merchandise_flag".to_sym] != nil
42
+ name = "merchandise_flag".to_sym
43
+ value = attributes["merchandise_flag"]
44
+ send("#{name}=", value) if self.respond_to?(name)
45
+ end
46
+ if MenuItem.attribute_map["available_for_order".to_sym] != nil
47
+ name = "available_for_order".to_sym
48
+ value = attributes["available_for_order"]
49
+ send("#{name}=", value) if self.respond_to?(name)
50
+ end
51
+ if MenuItem.attribute_map["price".to_sym] != nil
52
+ name = "price".to_sym
53
+ value = attributes["price"]
54
+ send("#{name}=", value) if self.respond_to?(name)
55
+ end
56
+ if MenuItem.attribute_map["description".to_sym] != nil
57
+ name = "description".to_sym
58
+ value = attributes["description"]
59
+ send("#{name}=", value) if self.respond_to?(name)
60
+ end
61
+ if MenuItem.attribute_map["_u_p_c".to_sym] != nil
62
+ name = "_u_p_c".to_sym
63
+ value = attributes["UPC"]
64
+ send("#{name}=", value) if self.respond_to?(name)
65
+ end
66
+ if MenuItem.attribute_map["_modifier_types".to_sym] != nil
67
+ name = "_modifier_types".to_sym
68
+ value = attributes["ModifierTypes"]
69
+ if value.is_a?(Array)
70
+ array = Array.new
71
+ value.each do |arrayValue|
72
+ array.push Modifiertype.new(arrayValue)
73
+ end
74
+ send("#{name}=", array) if self.respond_to?(name)
75
+ end
76
+ end
77
+ if MenuItem.attribute_map["item_images".to_sym] != nil
78
+ name = "item_images".to_sym
79
+ value = attributes["item_images"]
80
+ if value.is_a?(Array)
81
+ array = Array.new
82
+ value.each do |arrayValue|
83
+ array.push ItemImage.new(arrayValue)
84
+ end
85
+ send("#{name}=", array) if self.respond_to?(name)
86
+ end
87
+ end
88
+ if MenuItem.attribute_map["cost".to_sym] != nil
89
+ name = "cost".to_sym
90
+ value = attributes["cost"]
91
+ send("#{name}=", value) if self.respond_to?(name)
92
+ end
93
+ if MenuItem.attribute_map["revenue_center_id".to_sym] != nil
94
+ name = "revenue_center_id".to_sym
95
+ value = attributes["revenue_center_id"]
96
+ send("#{name}=", value) if self.respond_to?(name)
97
+ end
98
+ if MenuItem.attribute_map["item_id".to_sym] != nil
99
+ name = "item_id".to_sym
100
+ value = attributes["item_id"]
101
+ send("#{name}=", value) if self.respond_to?(name)
102
+ end
103
+ if MenuItem.attribute_map["local_pos_id".to_sym] != nil
104
+ name = "local_pos_id".to_sym
105
+ value = attributes["local_pos_id"]
106
+ send("#{name}=", value) if self.respond_to?(name)
107
+ end
108
+ if MenuItem.attribute_map["out_of_stock_flag".to_sym] != nil
109
+ name = "out_of_stock_flag".to_sym
110
+ value = attributes["out_of_stock_flag"]
111
+ send("#{name}=", value) if self.respond_to?(name)
112
+ end
113
+ end
114
+ end
115
+
116
+ def to_body
117
+ body = {}
118
+ MenuItem.attribute_map.each_pair do |key,value|
119
+ body[value] = self.send(key) unless self.send(key).nil?
120
+ end
121
+ body
122
+ end
123
+ end
124
+
@@ -0,0 +1,63 @@
1
+ class MenuItemDetail
2
+ attr_accessor :description, :price, :name, :revenue_center_id, :item_id, :item_images
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :description => :description, :price => :price, :name => :name, :revenue_center_id => :revenue_center_id, :item_id => :item_id, :item_images => :item_images
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if MenuItemDetail.attribute_map["description".to_sym] != nil
17
+ name = "description".to_sym
18
+ value = attributes["description"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if MenuItemDetail.attribute_map["price".to_sym] != nil
22
+ name = "price".to_sym
23
+ value = attributes["price"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if MenuItemDetail.attribute_map["name".to_sym] != nil
27
+ name = "name".to_sym
28
+ value = attributes["name"]
29
+ send("#{name}=", value) if self.respond_to?(name)
30
+ end
31
+ if MenuItemDetail.attribute_map["revenue_center_id".to_sym] != nil
32
+ name = "revenue_center_id".to_sym
33
+ value = attributes["revenue_center_id"]
34
+ send("#{name}=", value) if self.respond_to?(name)
35
+ end
36
+ if MenuItemDetail.attribute_map["item_id".to_sym] != nil
37
+ name = "item_id".to_sym
38
+ value = attributes["item_id"]
39
+ send("#{name}=", value) if self.respond_to?(name)
40
+ end
41
+ if MenuItemDetail.attribute_map["item_images".to_sym] != nil
42
+ name = "item_images".to_sym
43
+ value = attributes["item_images"]
44
+ if value.is_a?(Array)
45
+ array = Array.new
46
+ value.each do |arrayValue|
47
+ array.push ItemImage.new(arrayValue)
48
+ end
49
+ send("#{name}=", array) if self.respond_to?(name)
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ def to_body
56
+ body = {}
57
+ MenuItemDetail.attribute_map.each_pair do |key,value|
58
+ body[value] = self.send(key) unless self.send(key).nil?
59
+ end
60
+ body
61
+ end
62
+ end
63
+
@@ -0,0 +1,32 @@
1
+ class Modifier
2
+ attr_accessor :modifier_id
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :modifier_id => :modifier_id
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if Modifier.attribute_map["modifier_id".to_sym] != nil
17
+ name = "modifier_id".to_sym
18
+ value = attributes["modifier_id"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ end
22
+ end
23
+
24
+ def to_body
25
+ body = {}
26
+ Modifier.attribute_map.each_pair do |key,value|
27
+ body[value] = self.send(key) unless self.send(key).nil?
28
+ end
29
+ body
30
+ end
31
+ end
32
+
@@ -0,0 +1,47 @@
1
+ class ModifierList
2
+ attr_accessor :price, :name, :modifier_id, :description
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :price => :price, :name => :name, :modifier_id => :modifier_id, :description => :description
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if ModifierList.attribute_map["price".to_sym] != nil
17
+ name = "price".to_sym
18
+ value = attributes["price"]
19
+ send("#{name}=", value) if self.respond_to?(name)
20
+ end
21
+ if ModifierList.attribute_map["name".to_sym] != nil
22
+ name = "name".to_sym
23
+ value = attributes["name"]
24
+ send("#{name}=", value) if self.respond_to?(name)
25
+ end
26
+ if ModifierList.attribute_map["modifier_id".to_sym] != nil
27
+ name = "modifier_id".to_sym
28
+ value = attributes["modifier_id"]
29
+ send("#{name}=", value) if self.respond_to?(name)
30
+ end
31
+ if ModifierList.attribute_map["description".to_sym] != nil
32
+ name = "description".to_sym
33
+ value = attributes["description"]
34
+ send("#{name}=", value) if self.respond_to?(name)
35
+ end
36
+ end
37
+ end
38
+
39
+ def to_body
40
+ body = {}
41
+ ModifierList.attribute_map.each_pair do |key,value|
42
+ body[value] = self.send(key) unless self.send(key).nil?
43
+ end
44
+ body
45
+ end
46
+ end
47
+
@@ -0,0 +1,49 @@
1
+ class Modifiertype
2
+ attr_accessor :local, :mapped
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :local => :local, :mapped => :mapped
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ # Morph attribute keys into undescored rubyish style
14
+ if attributes.to_s != ""
15
+
16
+ if Modifiertype.attribute_map["local".to_sym] != nil
17
+ name = "local".to_sym
18
+ value = attributes["local"]
19
+ if value.is_a?(Array)
20
+ array = Array.new
21
+ value.each do |arrayValue|
22
+ array.push Local.new(arrayValue)
23
+ end
24
+ send("#{name}=", array) if self.respond_to?(name)
25
+ end
26
+ end
27
+ if Modifiertype.attribute_map["mapped".to_sym] != nil
28
+ name = "mapped".to_sym
29
+ value = attributes["mapped"]
30
+ if value.is_a?(Array)
31
+ array = Array.new
32
+ value.each do |arrayValue|
33
+ array.push Mapped.new(arrayValue)
34
+ end
35
+ send("#{name}=", array) if self.respond_to?(name)
36
+ end
37
+ end
38
+ end
39
+ end
40
+
41
+ def to_body
42
+ body = {}
43
+ Modifiertype.attribute_map.each_pair do |key,value|
44
+ body[value] = self.send(key) unless self.send(key).nil?
45
+ end
46
+ body
47
+ end
48
+ end
49
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subtledata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-18 00:00:00.000000000 Z
12
+ date: 2013-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -50,6 +50,7 @@ executables: []
50
50
  extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
+ - lib/concessions_api.rb
53
54
  - lib/general_api.rb
54
55
  - lib/locations_api.rb
55
56
  - lib/monkey.rb
@@ -62,10 +63,14 @@ files:
62
63
  - lib/users_api.rb
63
64
  - models/authresponse.rb
64
65
  - models/authuserrequest.rb
66
+ - models/availablemodifier.rb
65
67
  - models/card.rb
68
+ - models/cardpayment.rb
66
69
  - models/cardstatus.rb
67
70
  - models/category.rb
68
71
  - models/categoryimage.rb
72
+ - models/concessionorderresults.rb
73
+ - models/concessionticketdetails.rb
69
74
  - models/connecteduser.rb
70
75
  - models/connectstatus.rb
71
76
  - models/country.rb
@@ -77,8 +82,16 @@ files:
77
82
  - models/externalpaymentstatus.rb
78
83
  - models/item.rb
79
84
  - models/itemimage.rb
85
+ - models/itemmodifier.rb
80
86
  - models/itemtoadd.rb
87
+ - models/local.rb
81
88
  - models/location.rb
89
+ - models/mapped.rb
90
+ - models/menuitem.rb
91
+ - models/menuitemdetail.rb
92
+ - models/modifier.rb
93
+ - models/modifierlist.rb
94
+ - models/modifiertype.rb
82
95
  - models/newcard.rb
83
96
  - models/newconnection.rb
84
97
  - models/newexternalpayment.rb