gonebusy-ruby-client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +2 -1
  4. data/lib/gonebusy/controllers/bookings_controller.rb +77 -74
  5. data/lib/gonebusy/controllers/categories_controller.rb +29 -29
  6. data/lib/gonebusy/controllers/pricing_models_controller.rb +47 -47
  7. data/lib/gonebusy/controllers/resources_controller.rb +77 -77
  8. data/lib/gonebusy/controllers/schedules_controller.rb +92 -92
  9. data/lib/gonebusy/controllers/services_controller.rb +86 -86
  10. data/lib/gonebusy/controllers/users_controller.rb +56 -56
  11. data/lib/gonebusy/models/cancel_booking_by_id_response.rb +10 -12
  12. data/lib/gonebusy/models/create_booking_body.rb +78 -80
  13. data/lib/gonebusy/models/create_booking_response.rb +10 -12
  14. data/lib/gonebusy/models/create_category_body.rb +34 -36
  15. data/lib/gonebusy/models/create_category_response.rb +10 -12
  16. data/lib/gonebusy/models/create_pricing_model_body.rb +35 -37
  17. data/lib/gonebusy/models/create_pricing_model_response.rb +10 -12
  18. data/lib/gonebusy/models/create_resource_body.rb +39 -41
  19. data/lib/gonebusy/models/create_resource_response.rb +10 -12
  20. data/lib/gonebusy/models/create_schedule_body.rb +92 -94
  21. data/lib/gonebusy/models/create_schedule_response.rb +10 -12
  22. data/lib/gonebusy/models/create_schedule_time_window_body.rb +64 -66
  23. data/lib/gonebusy/models/create_schedule_time_window_response.rb +10 -12
  24. data/lib/gonebusy/models/create_service_body.rb +57 -59
  25. data/lib/gonebusy/models/create_service_response.rb +10 -12
  26. data/lib/gonebusy/models/create_user_body.rb +40 -42
  27. data/lib/gonebusy/models/create_user_response.rb +10 -12
  28. data/lib/gonebusy/models/delete_resource_by_id_response.rb +10 -12
  29. data/lib/gonebusy/models/delete_schedule_by_id_response.rb +10 -12
  30. data/lib/gonebusy/models/delete_schedule_time_window_by_id_response.rb +10 -12
  31. data/lib/gonebusy/models/delete_service_by_id_response.rb +10 -12
  32. data/lib/gonebusy/models/entities_address_entity.rb +69 -71
  33. data/lib/gonebusy/models/entities_availability_response.rb +21 -23
  34. data/lib/gonebusy/models/entities_booking_response.rb +32 -34
  35. data/lib/gonebusy/models/entities_category_response.rb +52 -54
  36. data/lib/gonebusy/models/entities_pricing_model_response.rb +44 -46
  37. data/lib/gonebusy/models/entities_resource_availabilities.rb +24 -26
  38. data/lib/gonebusy/models/entities_resource_response.rb +60 -62
  39. data/lib/gonebusy/models/entities_schedule_response.rb +26 -28
  40. data/lib/gonebusy/models/entities_search_response.rb +29 -31
  41. data/lib/gonebusy/models/entities_service_response.rb +82 -84
  42. data/lib/gonebusy/models/entities_slots.rb +13 -15
  43. data/lib/gonebusy/models/entities_thing_type_response.rb +13 -15
  44. data/lib/gonebusy/models/entities_time_window_response.rb +81 -83
  45. data/lib/gonebusy/models/entities_user_response.rb +95 -97
  46. data/lib/gonebusy/models/get_booking_by_id_response.rb +10 -12
  47. data/lib/gonebusy/models/get_bookings_response.rb +14 -16
  48. data/lib/gonebusy/models/get_categories_response.rb +14 -16
  49. data/lib/gonebusy/models/get_category_by_id_response.rb +10 -12
  50. data/lib/gonebusy/models/get_pricing_model_by_id_response.rb +10 -12
  51. data/lib/gonebusy/models/get_pricing_models_response.rb +14 -16
  52. data/lib/gonebusy/models/get_resource_by_id_response.rb +10 -12
  53. data/lib/gonebusy/models/get_resource_things_response.rb +14 -16
  54. data/lib/gonebusy/models/get_resources_response.rb +14 -16
  55. data/lib/gonebusy/models/get_schedule_by_id_response.rb +10 -12
  56. data/lib/gonebusy/models/get_schedules_response.rb +14 -16
  57. data/lib/gonebusy/models/get_service_available_slots_by_id_response.rb +10 -12
  58. data/lib/gonebusy/models/get_service_by_id_response.rb +10 -12
  59. data/lib/gonebusy/models/get_services_response.rb +14 -16
  60. data/lib/gonebusy/models/get_user_by_id_response.rb +10 -12
  61. data/lib/gonebusy/models/get_users_response.rb +14 -16
  62. data/lib/gonebusy/models/search_query_response.rb +10 -12
  63. data/lib/gonebusy/models/update_booking_by_id_body.rb +58 -60
  64. data/lib/gonebusy/models/update_booking_by_id_response.rb +10 -12
  65. data/lib/gonebusy/models/update_pricing_model_by_id_body.rb +28 -30
  66. data/lib/gonebusy/models/update_pricing_model_by_id_response.rb +10 -12
  67. data/lib/gonebusy/models/update_resource_by_id_body.rb +33 -35
  68. data/lib/gonebusy/models/update_resource_by_id_response.rb +10 -12
  69. data/lib/gonebusy/models/update_schedule_time_window_by_id_body.rb +71 -73
  70. data/lib/gonebusy/models/update_schedule_time_window_by_id_response.rb +10 -12
  71. data/lib/gonebusy/models/update_service_by_id_body.rb +43 -45
  72. data/lib/gonebusy/models/update_service_by_id_response.rb +10 -12
  73. data/lib/gonebusy/models/update_user_by_id_body.rb +41 -43
  74. data/lib/gonebusy/models/update_user_by_id_response.rb +10 -12
  75. data/lib/gonebusy.rb +67 -67
  76. metadata +2 -3
  77. data/lib/gonebusy/exceptions/entities_error_exception.rb +0 -27
@@ -2,115 +2,113 @@
2
2
 
3
3
  module Gonebusy
4
4
  class EntitiesAddressEntity < BaseModel
5
- # city of Address
5
+ # line 1 of Address
6
6
  # @return [String]
7
- attr_accessor :city
7
+ attr_accessor :line_1
8
8
 
9
- # country of Address
9
+ # line 2 of Address
10
10
  # @return [String]
11
- attr_accessor :country
11
+ attr_accessor :line_2
12
12
 
13
- # country code of Address
13
+ # city of Address
14
14
  # @return [String]
15
- attr_accessor :country_code
15
+ attr_accessor :city
16
16
 
17
- # latitude of Address
17
+ # state of Address
18
18
  # @return [String]
19
- attr_accessor :latitude
19
+ attr_accessor :state
20
20
 
21
- # line 1 of Address
21
+ # province of Address
22
22
  # @return [String]
23
- attr_accessor :line_1
23
+ attr_accessor :province
24
24
 
25
- # line 2 of Address
25
+ # postal code of Address
26
26
  # @return [String]
27
- attr_accessor :line_2
27
+ attr_accessor :postal_code
28
28
 
29
- # longitude of Address
29
+ # country of Address
30
30
  # @return [String]
31
- attr_accessor :longitude
31
+ attr_accessor :country
32
32
 
33
- # postal code of Address
33
+ # country code of Address
34
34
  # @return [String]
35
- attr_accessor :postal_code
35
+ attr_accessor :country_code
36
36
 
37
- # province of Address
37
+ # latitude of Address
38
38
  # @return [String]
39
- attr_accessor :province
39
+ attr_accessor :latitude
40
40
 
41
- # state of Address
41
+ # longitude of Address
42
42
  # @return [String]
43
- attr_accessor :state
43
+ attr_accessor :longitude
44
44
 
45
45
  # A mapping from model property names to API property names
46
46
  def self.names
47
- if @hash.nil?
48
- @hash = {}
49
- @hash["city"] = "city"
50
- @hash["country"] = "country"
51
- @hash["country_code"] = "country_code"
52
- @hash["latitude"] = "latitude"
53
- @hash["line_1"] = "line1"
54
- @hash["line_2"] = "line2"
55
- @hash["longitude"] = "longitude"
56
- @hash["postal_code"] = "postal_code"
57
- @hash["province"] = "province"
58
- @hash["state"] = "state"
47
+ if @_hash.nil?
48
+ @_hash = {}
49
+ @_hash["line_1"] = "line1"
50
+ @_hash["line_2"] = "line2"
51
+ @_hash["city"] = "city"
52
+ @_hash["state"] = "state"
53
+ @_hash["province"] = "province"
54
+ @_hash["postal_code"] = "postal_code"
55
+ @_hash["country"] = "country"
56
+ @_hash["country_code"] = "country_code"
57
+ @_hash["latitude"] = "latitude"
58
+ @_hash["longitude"] = "longitude"
59
59
  end
60
- @hash
60
+ @_hash
61
61
  end
62
62
 
63
- def initialize(city = nil,
63
+ def initialize(line_1 = nil,
64
+ line_2 = nil,
65
+ city = nil,
66
+ state = nil,
67
+ province = nil,
68
+ postal_code = nil,
64
69
  country = nil,
65
70
  country_code = nil,
66
71
  latitude = nil,
67
- line_1 = nil,
68
- line_2 = nil,
69
- longitude = nil,
70
- postal_code = nil,
71
- province = nil,
72
- state = nil)
72
+ longitude = nil)
73
+ @line_1 = line_1
74
+ @line_2 = line_2
73
75
  @city = city
76
+ @state = state
77
+ @province = province
78
+ @postal_code = postal_code
74
79
  @country = country
75
80
  @country_code = country_code
76
81
  @latitude = latitude
77
- @line_1 = line_1
78
- @line_2 = line_2
79
82
  @longitude = longitude
80
- @postal_code = postal_code
81
- @province = province
82
- @state = state
83
83
  end
84
84
 
85
85
  # Creates an instance of the object from a hash
86
86
  def self.from_hash(hash)
87
- if hash == nil
88
- nil
89
- else
90
- # Extract variables from the hash
91
- city = hash['city']
92
- country = hash['country']
93
- country_code = hash['country_code']
94
- latitude = hash['latitude']
95
- line_1 = hash['line1']
96
- line_2 = hash['line2']
97
- longitude = hash['longitude']
98
- postal_code = hash['postal_code']
99
- province = hash['province']
100
- state = hash['state']
87
+ return nil unless hash
101
88
 
102
- # Create object from extracted values
103
- EntitiesAddressEntity.new(city,
104
- country,
105
- country_code,
106
- latitude,
107
- line_1,
108
- line_2,
109
- longitude,
110
- postal_code,
111
- province,
112
- state)
113
- end
89
+ # Extract variables from the hash
90
+ line_1 = hash['line1']
91
+ line_2 = hash['line2']
92
+ city = hash['city']
93
+ state = hash['state']
94
+ province = hash['province']
95
+ postal_code = hash['postal_code']
96
+ country = hash['country']
97
+ country_code = hash['country_code']
98
+ latitude = hash['latitude']
99
+ longitude = hash['longitude']
100
+
101
+ # Create object from extracted values
102
+ EntitiesAddressEntity.new(line_1,
103
+ line_2,
104
+ city,
105
+ state,
106
+ province,
107
+ postal_code,
108
+ country,
109
+ country_code,
110
+ latitude,
111
+ longitude)
114
112
  end
115
113
  end
116
114
  end
@@ -16,13 +16,13 @@ module Gonebusy
16
16
 
17
17
  # A mapping from model property names to API property names
18
18
  def self.names
19
- if @hash.nil?
20
- @hash = {}
21
- @hash["id"] = "id"
22
- @hash["owner_id"] = "owner_id"
23
- @hash["resources"] = "resources"
19
+ if @_hash.nil?
20
+ @_hash = {}
21
+ @_hash["id"] = "id"
22
+ @_hash["owner_id"] = "owner_id"
23
+ @_hash["resources"] = "resources"
24
24
  end
25
- @hash
25
+ @_hash
26
26
  end
27
27
 
28
28
  def initialize(id = nil,
@@ -35,24 +35,22 @@ module Gonebusy
35
35
 
36
36
  # Creates an instance of the object from a hash
37
37
  def self.from_hash(hash)
38
- if hash == nil
39
- nil
40
- else
41
- # Extract variables from the hash
42
- id = hash['id']
43
- owner_id = hash['owner_id']
44
- # Parameter is an array, so we need to iterate through it
45
- resources = nil
46
- if hash['resources'] != nil
47
- resources = Array.new
48
- hash['resources'].each{|structure| resources << (EntitiesResourceAvailabilities.from_hash(structure) if structure)}
49
- end
50
-
51
- # Create object from extracted values
52
- EntitiesAvailabilityResponse.new(id,
53
- owner_id,
54
- resources)
38
+ return nil unless hash
39
+
40
+ # Extract variables from the hash
41
+ id = hash['id']
42
+ owner_id = hash['owner_id']
43
+ # Parameter is an array, so we need to iterate through it
44
+ resources = nil
45
+ if hash['resources'] != nil
46
+ resources = Array.new
47
+ hash['resources'].each{|structure| resources << (EntitiesResourceAvailabilities.from_hash(structure) if structure)}
55
48
  end
49
+
50
+ # Create object from extracted values
51
+ EntitiesAvailabilityResponse.new(id,
52
+ owner_id,
53
+ resources)
56
54
  end
57
55
  end
58
56
  end
@@ -10,62 +10,60 @@ module Gonebusy
10
10
  # @return [Integer]
11
11
  attr_accessor :owner_id
12
12
 
13
- # TimeWindow corresponding to Booking
14
- # @return [EntitiesTimeWindowResponse]
15
- attr_accessor :time_window
13
+ # status of Booking
14
+ # @return [String]
15
+ attr_accessor :workflow_state
16
16
 
17
17
  # user requesting Booking may include a message
18
18
  # @return [String]
19
19
  attr_accessor :user_message
20
20
 
21
- # status of Booking
22
- # @return [String]
23
- attr_accessor :workflow_state
21
+ # TimeWindow corresponding to Booking
22
+ # @return [EntitiesTimeWindowResponse]
23
+ attr_accessor :time_window
24
24
 
25
25
  # A mapping from model property names to API property names
26
26
  def self.names
27
- if @hash.nil?
28
- @hash = {}
29
- @hash["id"] = "id"
30
- @hash["owner_id"] = "owner_id"
31
- @hash["time_window"] = "time_window"
32
- @hash["user_message"] = "user_message"
33
- @hash["workflow_state"] = "workflow_state"
27
+ if @_hash.nil?
28
+ @_hash = {}
29
+ @_hash["id"] = "id"
30
+ @_hash["owner_id"] = "owner_id"
31
+ @_hash["workflow_state"] = "workflow_state"
32
+ @_hash["user_message"] = "user_message"
33
+ @_hash["time_window"] = "time_window"
34
34
  end
35
- @hash
35
+ @_hash
36
36
  end
37
37
 
38
38
  def initialize(id = nil,
39
39
  owner_id = nil,
40
- time_window = nil,
40
+ workflow_state = nil,
41
41
  user_message = nil,
42
- workflow_state = nil)
42
+ time_window = nil)
43
43
  @id = id
44
44
  @owner_id = owner_id
45
- @time_window = time_window
46
- @user_message = user_message
47
45
  @workflow_state = workflow_state
46
+ @user_message = user_message
47
+ @time_window = time_window
48
48
  end
49
49
 
50
50
  # Creates an instance of the object from a hash
51
51
  def self.from_hash(hash)
52
- if hash == nil
53
- nil
54
- else
55
- # Extract variables from the hash
56
- id = hash['id']
57
- owner_id = hash['owner_id']
58
- time_window = EntitiesTimeWindowResponse.from_hash(hash['time_window']) if hash['time_window']
59
- user_message = hash['user_message']
60
- workflow_state = hash['workflow_state']
52
+ return nil unless hash
61
53
 
62
- # Create object from extracted values
63
- EntitiesBookingResponse.new(id,
64
- owner_id,
65
- time_window,
66
- user_message,
67
- workflow_state)
68
- end
54
+ # Extract variables from the hash
55
+ id = hash['id']
56
+ owner_id = hash['owner_id']
57
+ workflow_state = hash['workflow_state']
58
+ user_message = hash['user_message']
59
+ time_window = EntitiesTimeWindowResponse.from_hash(hash['time_window']) if hash['time_window']
60
+
61
+ # Create object from extracted values
62
+ EntitiesBookingResponse.new(id,
63
+ owner_id,
64
+ workflow_state,
65
+ user_message,
66
+ time_window)
69
67
  end
70
68
  end
71
69
  end
@@ -2,33 +2,33 @@
2
2
 
3
3
  module Gonebusy
4
4
  class EntitiesCategoryResponse < BaseModel
5
- # description of Category
6
- # @return [String]
7
- attr_accessor :description
8
-
9
5
  # id of Category
10
6
  # @return [Integer]
11
7
  attr_accessor :id
12
8
 
13
- # status of Category
14
- # @return [Boolean]
15
- attr_accessor :is_active
9
+ # name of Category
10
+ # @return [String]
11
+ attr_accessor :name
12
+
13
+ # abbreviated name for Category
14
+ # @return [String]
15
+ attr_accessor :short_name
16
16
 
17
17
  # extended name for Category
18
18
  # @return [String]
19
19
  attr_accessor :long_name
20
20
 
21
- # name of Category
21
+ # description of Category
22
22
  # @return [String]
23
- attr_accessor :name
23
+ attr_accessor :description
24
24
 
25
25
  # id of parent Category, if any
26
26
  # @return [Integer]
27
27
  attr_accessor :parent_category_id
28
28
 
29
- # abbreviated name for Category
30
- # @return [String]
31
- attr_accessor :short_name
29
+ # status of Category
30
+ # @return [Boolean]
31
+ attr_accessor :is_active
32
32
 
33
33
  # array of subcategory ids, if any
34
34
  # @return [List of Integer]
@@ -36,63 +36,61 @@ module Gonebusy
36
36
 
37
37
  # A mapping from model property names to API property names
38
38
  def self.names
39
- if @hash.nil?
40
- @hash = {}
41
- @hash["description"] = "description"
42
- @hash["id"] = "id"
43
- @hash["is_active"] = "is_active"
44
- @hash["long_name"] = "long_name"
45
- @hash["name"] = "name"
46
- @hash["parent_category_id"] = "parent_category_id"
47
- @hash["short_name"] = "short_name"
48
- @hash["subcategories"] = "subcategories"
39
+ if @_hash.nil?
40
+ @_hash = {}
41
+ @_hash["id"] = "id"
42
+ @_hash["name"] = "name"
43
+ @_hash["short_name"] = "short_name"
44
+ @_hash["long_name"] = "long_name"
45
+ @_hash["description"] = "description"
46
+ @_hash["parent_category_id"] = "parent_category_id"
47
+ @_hash["is_active"] = "is_active"
48
+ @_hash["subcategories"] = "subcategories"
49
49
  end
50
- @hash
50
+ @_hash
51
51
  end
52
52
 
53
- def initialize(description = nil,
54
- id = nil,
55
- is_active = nil,
56
- long_name = nil,
53
+ def initialize(id = nil,
57
54
  name = nil,
58
- parent_category_id = nil,
59
55
  short_name = nil,
56
+ long_name = nil,
57
+ description = nil,
58
+ parent_category_id = nil,
59
+ is_active = nil,
60
60
  subcategories = nil)
61
- @description = description
62
61
  @id = id
63
- @is_active = is_active
64
- @long_name = long_name
65
62
  @name = name
66
- @parent_category_id = parent_category_id
67
63
  @short_name = short_name
64
+ @long_name = long_name
65
+ @description = description
66
+ @parent_category_id = parent_category_id
67
+ @is_active = is_active
68
68
  @subcategories = subcategories
69
69
  end
70
70
 
71
71
  # Creates an instance of the object from a hash
72
72
  def self.from_hash(hash)
73
- if hash == nil
74
- nil
75
- else
76
- # Extract variables from the hash
77
- description = hash['description']
78
- id = hash['id']
79
- is_active = hash['is_active']
80
- long_name = hash['long_name']
81
- name = hash['name']
82
- parent_category_id = hash['parent_category_id']
83
- short_name = hash['short_name']
84
- subcategories = hash['subcategories']
73
+ return nil unless hash
85
74
 
86
- # Create object from extracted values
87
- EntitiesCategoryResponse.new(description,
88
- id,
89
- is_active,
90
- long_name,
91
- name,
92
- parent_category_id,
93
- short_name,
94
- subcategories)
95
- end
75
+ # Extract variables from the hash
76
+ id = hash['id']
77
+ name = hash['name']
78
+ short_name = hash['short_name']
79
+ long_name = hash['long_name']
80
+ description = hash['description']
81
+ parent_category_id = hash['parent_category_id']
82
+ is_active = hash['is_active']
83
+ subcategories = hash['subcategories']
84
+
85
+ # Create object from extracted values
86
+ EntitiesCategoryResponse.new(id,
87
+ name,
88
+ short_name,
89
+ long_name,
90
+ description,
91
+ parent_category_id,
92
+ is_active,
93
+ subcategories)
96
94
  end
97
95
  end
98
96
  end
@@ -2,14 +2,14 @@
2
2
 
3
3
  module Gonebusy
4
4
  class EntitiesPricingModelResponse < BaseModel
5
- # currency symbol, as per ISO-4217
6
- # @return [String]
7
- attr_accessor :currency
8
-
9
5
  # id of PricingModel
10
6
  # @return [Integer]
11
7
  attr_accessor :id
12
8
 
9
+ # id of owner of PricingModel
10
+ # @return [Integer]
11
+ attr_accessor :owner_id
12
+
13
13
  # name of PricingModel
14
14
  # @return [String]
15
15
  attr_accessor :name
@@ -18,72 +18,70 @@ module Gonebusy
18
18
  # @return [String]
19
19
  attr_accessor :notes
20
20
 
21
- # id of owner of PricingModel
22
- # @return [Integer]
23
- attr_accessor :owner_id
21
+ # type of PricingModel
22
+ # @return [String]
23
+ attr_accessor :pricing_model_type
24
24
 
25
25
  # price/rate
26
26
  # @return [String]
27
27
  attr_accessor :price
28
28
 
29
- # type of PricingModel
29
+ # currency symbol, as per ISO-4217
30
30
  # @return [String]
31
- attr_accessor :pricing_model_type
31
+ attr_accessor :currency
32
32
 
33
33
  # A mapping from model property names to API property names
34
34
  def self.names
35
- if @hash.nil?
36
- @hash = {}
37
- @hash["currency"] = "currency"
38
- @hash["id"] = "id"
39
- @hash["name"] = "name"
40
- @hash["notes"] = "notes"
41
- @hash["owner_id"] = "owner_id"
42
- @hash["price"] = "price"
43
- @hash["pricing_model_type"] = "pricing_model_type"
35
+ if @_hash.nil?
36
+ @_hash = {}
37
+ @_hash["id"] = "id"
38
+ @_hash["owner_id"] = "owner_id"
39
+ @_hash["name"] = "name"
40
+ @_hash["notes"] = "notes"
41
+ @_hash["pricing_model_type"] = "pricing_model_type"
42
+ @_hash["price"] = "price"
43
+ @_hash["currency"] = "currency"
44
44
  end
45
- @hash
45
+ @_hash
46
46
  end
47
47
 
48
- def initialize(currency = nil,
49
- id = nil,
48
+ def initialize(id = nil,
49
+ owner_id = nil,
50
50
  name = nil,
51
51
  notes = nil,
52
- owner_id = nil,
52
+ pricing_model_type = nil,
53
53
  price = nil,
54
- pricing_model_type = nil)
55
- @currency = currency
54
+ currency = nil)
56
55
  @id = id
56
+ @owner_id = owner_id
57
57
  @name = name
58
58
  @notes = notes
59
- @owner_id = owner_id
60
- @price = price
61
59
  @pricing_model_type = pricing_model_type
60
+ @price = price
61
+ @currency = currency
62
62
  end
63
63
 
64
64
  # Creates an instance of the object from a hash
65
65
  def self.from_hash(hash)
66
- if hash == nil
67
- nil
68
- else
69
- # Extract variables from the hash
70
- currency = hash['currency']
71
- id = hash['id']
72
- name = hash['name']
73
- notes = hash['notes']
74
- owner_id = hash['owner_id']
75
- price = hash['price']
76
- pricing_model_type = hash['pricing_model_type']
66
+ return nil unless hash
77
67
 
78
- # Create object from extracted values
79
- EntitiesPricingModelResponse.new(currency,
80
- id,
81
- name,
82
- notes,
83
- owner_id,
84
- price,
85
- pricing_model_type)
86
- end
68
+ # Extract variables from the hash
69
+ id = hash['id']
70
+ owner_id = hash['owner_id']
71
+ name = hash['name']
72
+ notes = hash['notes']
73
+ pricing_model_type = hash['pricing_model_type']
74
+ price = hash['price']
75
+ currency = hash['currency']
76
+
77
+ # Create object from extracted values
78
+ EntitiesPricingModelResponse.new(id,
79
+ owner_id,
80
+ name,
81
+ notes,
82
+ pricing_model_type,
83
+ price,
84
+ currency)
87
85
  end
88
86
  end
89
87
  end