gonebusy-ruby-client 0.0.9 → 0.1.0
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 +4 -4
- data/README.md +29 -68
- data/lib/gonebusy/api_helper.rb +181 -149
- data/lib/gonebusy/configuration.rb +51 -16
- data/lib/gonebusy/controllers/base_controller.rb +46 -45
- data/lib/gonebusy/controllers/bookings_controller.rb +257 -293
- data/lib/gonebusy/controllers/categories_controller.rb +151 -180
- data/lib/gonebusy/controllers/pricing_models_controller.rb +202 -241
- data/lib/gonebusy/controllers/resources_controller.rb +295 -355
- data/lib/gonebusy/controllers/schedules_controller.rb +361 -428
- data/lib/gonebusy/controllers/search_controller.rb +52 -63
- data/lib/gonebusy/controllers/services_controller.rb +310 -367
- data/lib/gonebusy/controllers/users_controller.rb +199 -239
- data/lib/gonebusy/exceptions/api_exception.rb +16 -16
- data/lib/gonebusy/exceptions/entities_error_error_exception.rb +27 -0
- data/lib/gonebusy/exceptions/entities_error_exception.rb +26 -26
- data/lib/gonebusy/gonebusy_client.rb +58 -58
- data/lib/gonebusy/http/auth/custom_auth.rb +15 -15
- data/lib/gonebusy/http/faraday_client.rb +43 -41
- data/lib/gonebusy/http/http_call_back.rb +17 -17
- data/lib/gonebusy/http/http_client.rb +84 -82
- data/lib/gonebusy/http/http_context.rb +15 -15
- data/lib/gonebusy/http/http_method_enum.rb +7 -7
- data/lib/gonebusy/http/http_request.rb +44 -44
- data/lib/gonebusy/http/http_response.rb +19 -19
- data/lib/gonebusy/models/base_model.rb +31 -31
- data/lib/gonebusy/models/cancel_booking_by_id_response.rb +35 -35
- data/lib/gonebusy/models/create_booking_body.rb +134 -80
- data/lib/gonebusy/models/create_booking_response.rb +35 -35
- data/lib/gonebusy/models/create_category_body.rb +71 -71
- data/lib/gonebusy/models/create_category_response.rb +35 -35
- data/lib/gonebusy/models/create_pricing_model_body.rb +80 -80
- data/lib/gonebusy/models/create_pricing_model_response.rb +35 -35
- data/lib/gonebusy/models/create_resource_body.rb +89 -89
- data/lib/gonebusy/models/create_resource_response.rb +35 -35
- data/lib/gonebusy/models/create_schedule_body.rb +143 -144
- data/lib/gonebusy/models/create_schedule_response.rb +35 -35
- data/lib/gonebusy/models/create_schedule_time_window_body.rb +116 -117
- data/lib/gonebusy/models/create_schedule_time_window_response.rb +35 -35
- data/lib/gonebusy/models/create_service_body.rb +107 -107
- data/lib/gonebusy/models/create_service_response.rb +35 -35
- data/lib/gonebusy/models/create_user_body.rb +89 -89
- data/lib/gonebusy/models/create_user_response.rb +35 -35
- data/lib/gonebusy/models/date_recurs_by_enum.rb +12 -12
- data/lib/gonebusy/models/delete_resource_by_id_response.rb +35 -35
- data/lib/gonebusy/models/delete_schedule_by_id_response.rb +35 -35
- data/lib/gonebusy/models/delete_schedule_time_window_by_id_response.rb +35 -35
- data/lib/gonebusy/models/delete_service_by_id_response.rb +35 -35
- data/lib/gonebusy/models/entities_address_entity.rb +116 -116
- data/lib/gonebusy/models/entities_availability_response.rb +58 -58
- data/lib/gonebusy/models/entities_booking_response.rb +71 -71
- data/lib/gonebusy/models/entities_category_response.rb +98 -98
- data/lib/gonebusy/models/entities_pricing_model_response.rb +89 -89
- data/lib/gonebusy/models/entities_resource_availabilities.rb +49 -49
- data/lib/gonebusy/models/entities_resource_response.rb +107 -107
- data/lib/gonebusy/models/entities_schedule_response.rb +76 -76
- data/lib/gonebusy/models/entities_search_response.rb +54 -54
- data/lib/gonebusy/models/entities_service_response.rb +134 -130
- data/lib/gonebusy/models/entities_slots.rb +44 -45
- data/lib/gonebusy/models/entities_thing_type_response.rb +44 -44
- data/lib/gonebusy/models/entities_time_window_response.rb +134 -135
- data/lib/gonebusy/models/entities_user_response.rb +152 -152
- data/lib/gonebusy/models/frequency_enum.rb +17 -17
- data/lib/gonebusy/models/gender_enum.rb +9 -9
- data/lib/gonebusy/models/get_booking_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_bookings_response.rb +40 -40
- data/lib/gonebusy/models/get_categories_response.rb +40 -40
- data/lib/gonebusy/models/get_category_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_pricing_model_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_pricing_models_response.rb +40 -40
- data/lib/gonebusy/models/get_resource_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_resource_things_response.rb +40 -40
- data/lib/gonebusy/models/get_resources_response.rb +40 -40
- data/lib/gonebusy/models/get_schedule_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_schedules_response.rb +40 -40
- data/lib/gonebusy/models/get_service_available_slots_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_service_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_services_response.rb +40 -40
- data/lib/gonebusy/models/get_user_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_users_response.rb +40 -40
- data/lib/gonebusy/models/occurrence_enum.rb +21 -21
- data/lib/gonebusy/models/recurs_by_enum.rb +15 -15
- data/lib/gonebusy/models/search_query_response.rb +35 -35
- data/lib/gonebusy/models/update_booking_by_id_body.rb +116 -0
- data/lib/gonebusy/models/update_booking_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_pricing_model_by_id_body.rb +62 -62
- data/lib/gonebusy/models/update_pricing_model_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_resource_by_id_body.rb +71 -71
- data/lib/gonebusy/models/update_resource_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_schedule_time_window_by_id_body.rb +116 -117
- data/lib/gonebusy/models/update_schedule_time_window_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_service_by_id_body.rb +98 -98
- data/lib/gonebusy/models/update_service_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_user_by_id_body.rb +89 -89
- data/lib/gonebusy/models/update_user_by_id_response.rb +35 -35
- data/lib/gonebusy.rb +108 -104
- metadata +53 -17
@@ -1,18 +1,18 @@
|
|
1
|
-
# This file was automatically generated
|
2
|
-
|
3
|
-
module Gonebusy
|
4
|
-
class FrequencyEnum
|
5
|
-
# TODO: Write general description for SINGLE
|
6
|
-
# TODO: Write general description for EVERY
|
7
|
-
# TODO: Write general description for EVERY_OTHER
|
8
|
-
# TODO: Write general description for EVERY_3RD
|
9
|
-
# TODO: Write general description for EVERY_4TH
|
10
|
-
# TODO: Write general description for EVERY_5TH
|
11
|
-
# TODO: Write general description for EVERY_6TH
|
12
|
-
# TODO: Write general description for EVERY_7TH
|
13
|
-
# TODO: Write general description for EVERY_8TH
|
14
|
-
# TODO: Write general description for EVERY_9TH
|
15
|
-
# TODO: Write general description for EVERY_10TH
|
16
|
-
FREQUENCY_ENUM = [SINGLE = 'single', EVERY = 'every', EVERY_OTHER = 'every_other', EVERY_3RD = 'every_3rd', EVERY_4TH = 'every_4th', EVERY_5TH = 'every_5th', EVERY_6TH = 'every_6th', EVERY_7TH = 'every_7th', EVERY_8TH = 'every_8th', EVERY_9TH = 'every_9th', EVERY_10TH = 'every_10th']
|
17
|
-
end
|
1
|
+
# This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
module Gonebusy
|
4
|
+
class FrequencyEnum
|
5
|
+
# TODO: Write general description for SINGLE
|
6
|
+
# TODO: Write general description for EVERY
|
7
|
+
# TODO: Write general description for EVERY_OTHER
|
8
|
+
# TODO: Write general description for EVERY_3RD
|
9
|
+
# TODO: Write general description for EVERY_4TH
|
10
|
+
# TODO: Write general description for EVERY_5TH
|
11
|
+
# TODO: Write general description for EVERY_6TH
|
12
|
+
# TODO: Write general description for EVERY_7TH
|
13
|
+
# TODO: Write general description for EVERY_8TH
|
14
|
+
# TODO: Write general description for EVERY_9TH
|
15
|
+
# TODO: Write general description for EVERY_10TH
|
16
|
+
FREQUENCY_ENUM = [SINGLE = 'single', EVERY = 'every', EVERY_OTHER = 'every_other', EVERY_3RD = 'every_3rd', EVERY_4TH = 'every_4th', EVERY_5TH = 'every_5th', EVERY_6TH = 'every_6th', EVERY_7TH = 'every_7th', EVERY_8TH = 'every_8th', EVERY_9TH = 'every_9th', EVERY_10TH = 'every_10th']
|
17
|
+
end
|
18
18
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
# This file was automatically generated
|
2
|
-
|
3
|
-
module Gonebusy
|
4
|
-
class GenderEnum
|
5
|
-
# TODO: Write general description for F
|
6
|
-
# TODO: Write general description for M
|
7
|
-
# TODO: Write general description for
|
8
|
-
GENDER_ENUM = [F = 'F', M = 'M',
|
9
|
-
end
|
1
|
+
# This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
module Gonebusy
|
4
|
+
class GenderEnum
|
5
|
+
# TODO: Write general description for F
|
6
|
+
# TODO: Write general description for M
|
7
|
+
# TODO: Write general description for ENUM_TG
|
8
|
+
GENDER_ENUM = [F = 'F', M = 'M', ENUM_TG = 'T/G']
|
9
|
+
end
|
10
10
|
end
|
@@ -1,35 +1,35 @@
|
|
1
|
-
# This file was automatically generated
|
2
|
-
|
3
|
-
module Gonebusy
|
4
|
-
class GetBookingByIdResponse < BaseModel
|
5
|
-
# TODO: Write general description for this method
|
6
|
-
# @return [EntitiesBookingResponse]
|
7
|
-
attr_accessor :booking
|
8
|
-
|
9
|
-
# A mapping from model property names to API property names
|
10
|
-
def self.names
|
11
|
-
if @hash.nil?
|
12
|
-
@hash = {}
|
13
|
-
@hash["booking"] = "booking"
|
14
|
-
end
|
15
|
-
@hash
|
16
|
-
end
|
17
|
-
|
18
|
-
def initialize(booking = nil)
|
19
|
-
@booking = booking
|
20
|
-
end
|
21
|
-
|
22
|
-
# Creates an instance of the object from a hash
|
23
|
-
def self.from_hash(hash)
|
24
|
-
if hash == nil
|
25
|
-
nil
|
26
|
-
else
|
27
|
-
# Extract variables from the hash
|
28
|
-
booking = EntitiesBookingResponse.from_hash(hash[
|
29
|
-
|
30
|
-
# Create object from extracted values
|
31
|
-
GetBookingByIdResponse.new(booking)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
1
|
+
# This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
module Gonebusy
|
4
|
+
class GetBookingByIdResponse < BaseModel
|
5
|
+
# TODO: Write general description for this method
|
6
|
+
# @return [EntitiesBookingResponse]
|
7
|
+
attr_accessor :booking
|
8
|
+
|
9
|
+
# A mapping from model property names to API property names
|
10
|
+
def self.names
|
11
|
+
if @hash.nil?
|
12
|
+
@hash = {}
|
13
|
+
@hash["booking"] = "booking"
|
14
|
+
end
|
15
|
+
@hash
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(booking = nil)
|
19
|
+
@booking = booking
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates an instance of the object from a hash
|
23
|
+
def self.from_hash(hash)
|
24
|
+
if hash == nil
|
25
|
+
nil
|
26
|
+
else
|
27
|
+
# Extract variables from the hash
|
28
|
+
booking = EntitiesBookingResponse.from_hash(hash['booking']) if hash['booking']
|
29
|
+
|
30
|
+
# Create object from extracted values
|
31
|
+
GetBookingByIdResponse.new(booking)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -1,40 +1,40 @@
|
|
1
|
-
# This file was automatically generated
|
2
|
-
|
3
|
-
module Gonebusy
|
4
|
-
class GetBookingsResponse < BaseModel
|
5
|
-
# TODO: Write general description for this method
|
6
|
-
# @return [List of EntitiesBookingResponse]
|
7
|
-
attr_accessor :bookings
|
8
|
-
|
9
|
-
# A mapping from model property names to API property names
|
10
|
-
def self.names
|
11
|
-
if @hash.nil?
|
12
|
-
@hash = {}
|
13
|
-
@hash["bookings"] = "bookings"
|
14
|
-
end
|
15
|
-
@hash
|
16
|
-
end
|
17
|
-
|
18
|
-
def initialize(bookings = nil)
|
19
|
-
@bookings = bookings
|
20
|
-
end
|
21
|
-
|
22
|
-
# Creates an instance of the object from a hash
|
23
|
-
def self.from_hash(hash)
|
24
|
-
if hash == nil
|
25
|
-
nil
|
26
|
-
else
|
27
|
-
# Extract variables from the hash
|
28
|
-
# Parameter is an array, so we need to iterate through it
|
29
|
-
bookings = nil
|
30
|
-
if hash[
|
31
|
-
bookings = Array.new
|
32
|
-
hash[
|
33
|
-
end
|
34
|
-
|
35
|
-
# Create object from extracted values
|
36
|
-
GetBookingsResponse.new(bookings)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
1
|
+
# This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
module Gonebusy
|
4
|
+
class GetBookingsResponse < BaseModel
|
5
|
+
# TODO: Write general description for this method
|
6
|
+
# @return [List of EntitiesBookingResponse]
|
7
|
+
attr_accessor :bookings
|
8
|
+
|
9
|
+
# A mapping from model property names to API property names
|
10
|
+
def self.names
|
11
|
+
if @hash.nil?
|
12
|
+
@hash = {}
|
13
|
+
@hash["bookings"] = "bookings"
|
14
|
+
end
|
15
|
+
@hash
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(bookings = nil)
|
19
|
+
@bookings = bookings
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates an instance of the object from a hash
|
23
|
+
def self.from_hash(hash)
|
24
|
+
if hash == nil
|
25
|
+
nil
|
26
|
+
else
|
27
|
+
# Extract variables from the hash
|
28
|
+
# Parameter is an array, so we need to iterate through it
|
29
|
+
bookings = nil
|
30
|
+
if hash['bookings'] != nil
|
31
|
+
bookings = Array.new
|
32
|
+
hash['bookings'].each{|structure| bookings << (EntitiesBookingResponse.from_hash(structure) if structure)}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Create object from extracted values
|
36
|
+
GetBookingsResponse.new(bookings)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -1,40 +1,40 @@
|
|
1
|
-
# This file was automatically generated
|
2
|
-
|
3
|
-
module Gonebusy
|
4
|
-
class GetCategoriesResponse < BaseModel
|
5
|
-
# TODO: Write general description for this method
|
6
|
-
# @return [List of EntitiesCategoryResponse]
|
7
|
-
attr_accessor :categories
|
8
|
-
|
9
|
-
# A mapping from model property names to API property names
|
10
|
-
def self.names
|
11
|
-
if @hash.nil?
|
12
|
-
@hash = {}
|
13
|
-
@hash["categories"] = "categories"
|
14
|
-
end
|
15
|
-
@hash
|
16
|
-
end
|
17
|
-
|
18
|
-
def initialize(categories = nil)
|
19
|
-
@categories = categories
|
20
|
-
end
|
21
|
-
|
22
|
-
# Creates an instance of the object from a hash
|
23
|
-
def self.from_hash(hash)
|
24
|
-
if hash == nil
|
25
|
-
nil
|
26
|
-
else
|
27
|
-
# Extract variables from the hash
|
28
|
-
# Parameter is an array, so we need to iterate through it
|
29
|
-
categories = nil
|
30
|
-
if hash[
|
31
|
-
categories = Array.new
|
32
|
-
hash[
|
33
|
-
end
|
34
|
-
|
35
|
-
# Create object from extracted values
|
36
|
-
GetCategoriesResponse.new(categories)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
1
|
+
# This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
module Gonebusy
|
4
|
+
class GetCategoriesResponse < BaseModel
|
5
|
+
# TODO: Write general description for this method
|
6
|
+
# @return [List of EntitiesCategoryResponse]
|
7
|
+
attr_accessor :categories
|
8
|
+
|
9
|
+
# A mapping from model property names to API property names
|
10
|
+
def self.names
|
11
|
+
if @hash.nil?
|
12
|
+
@hash = {}
|
13
|
+
@hash["categories"] = "categories"
|
14
|
+
end
|
15
|
+
@hash
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(categories = nil)
|
19
|
+
@categories = categories
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates an instance of the object from a hash
|
23
|
+
def self.from_hash(hash)
|
24
|
+
if hash == nil
|
25
|
+
nil
|
26
|
+
else
|
27
|
+
# Extract variables from the hash
|
28
|
+
# Parameter is an array, so we need to iterate through it
|
29
|
+
categories = nil
|
30
|
+
if hash['categories'] != nil
|
31
|
+
categories = Array.new
|
32
|
+
hash['categories'].each{|structure| categories << (EntitiesCategoryResponse.from_hash(structure) if structure)}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Create object from extracted values
|
36
|
+
GetCategoriesResponse.new(categories)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -1,35 +1,35 @@
|
|
1
|
-
# This file was automatically generated
|
2
|
-
|
3
|
-
module Gonebusy
|
4
|
-
class GetCategoryByIdResponse < BaseModel
|
5
|
-
# TODO: Write general description for this method
|
6
|
-
# @return [EntitiesCategoryResponse]
|
7
|
-
attr_accessor :category
|
8
|
-
|
9
|
-
# A mapping from model property names to API property names
|
10
|
-
def self.names
|
11
|
-
if @hash.nil?
|
12
|
-
@hash = {}
|
13
|
-
@hash["category"] = "category"
|
14
|
-
end
|
15
|
-
@hash
|
16
|
-
end
|
17
|
-
|
18
|
-
def initialize(category = nil)
|
19
|
-
@category = category
|
20
|
-
end
|
21
|
-
|
22
|
-
# Creates an instance of the object from a hash
|
23
|
-
def self.from_hash(hash)
|
24
|
-
if hash == nil
|
25
|
-
nil
|
26
|
-
else
|
27
|
-
# Extract variables from the hash
|
28
|
-
category = EntitiesCategoryResponse.from_hash(hash[
|
29
|
-
|
30
|
-
# Create object from extracted values
|
31
|
-
GetCategoryByIdResponse.new(category)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
1
|
+
# This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
module Gonebusy
|
4
|
+
class GetCategoryByIdResponse < BaseModel
|
5
|
+
# TODO: Write general description for this method
|
6
|
+
# @return [EntitiesCategoryResponse]
|
7
|
+
attr_accessor :category
|
8
|
+
|
9
|
+
# A mapping from model property names to API property names
|
10
|
+
def self.names
|
11
|
+
if @hash.nil?
|
12
|
+
@hash = {}
|
13
|
+
@hash["category"] = "category"
|
14
|
+
end
|
15
|
+
@hash
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(category = nil)
|
19
|
+
@category = category
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates an instance of the object from a hash
|
23
|
+
def self.from_hash(hash)
|
24
|
+
if hash == nil
|
25
|
+
nil
|
26
|
+
else
|
27
|
+
# Extract variables from the hash
|
28
|
+
category = EntitiesCategoryResponse.from_hash(hash['category']) if hash['category']
|
29
|
+
|
30
|
+
# Create object from extracted values
|
31
|
+
GetCategoryByIdResponse.new(category)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -1,35 +1,35 @@
|
|
1
|
-
# This file was automatically generated
|
2
|
-
|
3
|
-
module Gonebusy
|
4
|
-
class GetPricingModelByIdResponse < BaseModel
|
5
|
-
# TODO: Write general description for this method
|
6
|
-
# @return [EntitiesPricingModelResponse]
|
7
|
-
attr_accessor :pricing_model
|
8
|
-
|
9
|
-
# A mapping from model property names to API property names
|
10
|
-
def self.names
|
11
|
-
if @hash.nil?
|
12
|
-
@hash = {}
|
13
|
-
@hash["pricing_model"] = "pricing_model"
|
14
|
-
end
|
15
|
-
@hash
|
16
|
-
end
|
17
|
-
|
18
|
-
def initialize(pricing_model = nil)
|
19
|
-
@pricing_model = pricing_model
|
20
|
-
end
|
21
|
-
|
22
|
-
# Creates an instance of the object from a hash
|
23
|
-
def self.from_hash(hash)
|
24
|
-
if hash == nil
|
25
|
-
nil
|
26
|
-
else
|
27
|
-
# Extract variables from the hash
|
28
|
-
pricing_model = EntitiesPricingModelResponse.from_hash(hash[
|
29
|
-
|
30
|
-
# Create object from extracted values
|
31
|
-
GetPricingModelByIdResponse.new(pricing_model)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
1
|
+
# This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
module Gonebusy
|
4
|
+
class GetPricingModelByIdResponse < BaseModel
|
5
|
+
# TODO: Write general description for this method
|
6
|
+
# @return [EntitiesPricingModelResponse]
|
7
|
+
attr_accessor :pricing_model
|
8
|
+
|
9
|
+
# A mapping from model property names to API property names
|
10
|
+
def self.names
|
11
|
+
if @hash.nil?
|
12
|
+
@hash = {}
|
13
|
+
@hash["pricing_model"] = "pricing_model"
|
14
|
+
end
|
15
|
+
@hash
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(pricing_model = nil)
|
19
|
+
@pricing_model = pricing_model
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates an instance of the object from a hash
|
23
|
+
def self.from_hash(hash)
|
24
|
+
if hash == nil
|
25
|
+
nil
|
26
|
+
else
|
27
|
+
# Extract variables from the hash
|
28
|
+
pricing_model = EntitiesPricingModelResponse.from_hash(hash['pricing_model']) if hash['pricing_model']
|
29
|
+
|
30
|
+
# Create object from extracted values
|
31
|
+
GetPricingModelByIdResponse.new(pricing_model)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -1,40 +1,40 @@
|
|
1
|
-
# This file was automatically generated
|
2
|
-
|
3
|
-
module Gonebusy
|
4
|
-
class GetPricingModelsResponse < BaseModel
|
5
|
-
# TODO: Write general description for this method
|
6
|
-
# @return [List of EntitiesPricingModelResponse]
|
7
|
-
attr_accessor :pricing_models
|
8
|
-
|
9
|
-
# A mapping from model property names to API property names
|
10
|
-
def self.names
|
11
|
-
if @hash.nil?
|
12
|
-
@hash = {}
|
13
|
-
@hash["pricing_models"] = "pricing_models"
|
14
|
-
end
|
15
|
-
@hash
|
16
|
-
end
|
17
|
-
|
18
|
-
def initialize(pricing_models = nil)
|
19
|
-
@pricing_models = pricing_models
|
20
|
-
end
|
21
|
-
|
22
|
-
# Creates an instance of the object from a hash
|
23
|
-
def self.from_hash(hash)
|
24
|
-
if hash == nil
|
25
|
-
nil
|
26
|
-
else
|
27
|
-
# Extract variables from the hash
|
28
|
-
# Parameter is an array, so we need to iterate through it
|
29
|
-
pricing_models = nil
|
30
|
-
if hash[
|
31
|
-
pricing_models = Array.new
|
32
|
-
hash[
|
33
|
-
end
|
34
|
-
|
35
|
-
# Create object from extracted values
|
36
|
-
GetPricingModelsResponse.new(pricing_models)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
1
|
+
# This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
|
2
|
+
|
3
|
+
module Gonebusy
|
4
|
+
class GetPricingModelsResponse < BaseModel
|
5
|
+
# TODO: Write general description for this method
|
6
|
+
# @return [List of EntitiesPricingModelResponse]
|
7
|
+
attr_accessor :pricing_models
|
8
|
+
|
9
|
+
# A mapping from model property names to API property names
|
10
|
+
def self.names
|
11
|
+
if @hash.nil?
|
12
|
+
@hash = {}
|
13
|
+
@hash["pricing_models"] = "pricing_models"
|
14
|
+
end
|
15
|
+
@hash
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(pricing_models = nil)
|
19
|
+
@pricing_models = pricing_models
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates an instance of the object from a hash
|
23
|
+
def self.from_hash(hash)
|
24
|
+
if hash == nil
|
25
|
+
nil
|
26
|
+
else
|
27
|
+
# Extract variables from the hash
|
28
|
+
# Parameter is an array, so we need to iterate through it
|
29
|
+
pricing_models = nil
|
30
|
+
if hash['pricing_models'] != nil
|
31
|
+
pricing_models = Array.new
|
32
|
+
hash['pricing_models'].each{|structure| pricing_models << (EntitiesPricingModelResponse.from_hash(structure) if structure)}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Create object from extracted values
|
36
|
+
GetPricingModelsResponse.new(pricing_models)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|