Class: StickyIoRestfulApiV2025731::AddCampaignRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::AddCampaignRequest
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb
Overview
AddCampaignRequest Model.
Instance Attribute Summary collapse
-
#channel_id ⇒ Integer
TODO: Write general description for this method.
-
#countries ⇒ Array[Integer]
TODO: Write general description for this method.
-
#coupon_profiles ⇒ Array[Integer]
TODO: Write general description for this method.
-
#description ⇒ String
TODO: Write general description for this method.
-
#gateway_id ⇒ Integer
TODO: Write general description for this method.
-
#is_prepaid_blocked ⇒ Integer
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#offers ⇒ Array[Integer]
TODO: Write general description for this method.
-
#payment_methods ⇒ Array[String]
TODO: Write general description for this method.
-
#postback_profiles ⇒ Array[Integer]
TODO: Write general description for this method.
-
#return_profiles ⇒ Array[String]
TODO: Write general description for this method.
-
#shipping_profiles ⇒ Array[Integer]
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(name:, description:, is_prepaid_blocked:, channel_id:, gateway_id:, payment_methods:, offers:, countries:, shipping_profiles:, return_profiles:, coupon_profiles:, postback_profiles:, additional_properties: nil) ⇒ AddCampaignRequest
constructor
A new instance of AddCampaignRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(name:, description:, is_prepaid_blocked:, channel_id:, gateway_id:, payment_methods:, offers:, countries:, shipping_profiles:, return_profiles:, coupon_profiles:, postback_profiles:, additional_properties: nil) ⇒ AddCampaignRequest
Returns a new instance of AddCampaignRequest.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 88 def initialize(name:, description:, is_prepaid_blocked:, channel_id:, gateway_id:, payment_methods:, offers:, countries:, shipping_profiles:, return_profiles:, coupon_profiles:, postback_profiles:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name @description = description @is_prepaid_blocked = is_prepaid_blocked @channel_id = channel_id @gateway_id = gateway_id @payment_methods = payment_methods @offers = offers @countries = countries @shipping_profiles = shipping_profiles @return_profiles = return_profiles @coupon_profiles = coupon_profiles @postback_profiles = postback_profiles @additional_properties = additional_properties end |
Instance Attribute Details
#channel_id ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 26 def channel_id @channel_id end |
#countries ⇒ Array[Integer]
TODO: Write general description for this method
42 43 44 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 42 def countries @countries end |
#coupon_profiles ⇒ Array[Integer]
TODO: Write general description for this method
54 55 56 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 54 def coupon_profiles @coupon_profiles end |
#description ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 18 def description @description end |
#gateway_id ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 30 def gateway_id @gateway_id end |
#is_prepaid_blocked ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 22 def is_prepaid_blocked @is_prepaid_blocked end |
#name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 14 def name @name end |
#offers ⇒ Array[Integer]
TODO: Write general description for this method
38 39 40 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 38 def offers @offers end |
#payment_methods ⇒ Array[String]
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 34 def payment_methods @payment_methods end |
#postback_profiles ⇒ Array[Integer]
TODO: Write general description for this method
58 59 60 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 58 def postback_profiles @postback_profiles end |
#return_profiles ⇒ Array[String]
TODO: Write general description for this method
50 51 52 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 50 def return_profiles @return_profiles end |
#shipping_profiles ⇒ Array[Integer]
TODO: Write general description for this method
46 47 48 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 46 def shipping_profiles @shipping_profiles end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 111 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : nil description = hash.key?('description') ? hash['description'] : nil is_prepaid_blocked = hash.key?('is_prepaid_blocked') ? hash['is_prepaid_blocked'] : nil channel_id = hash.key?('channel_id') ? hash['channel_id'] : nil gateway_id = hash.key?('gateway_id') ? hash['gateway_id'] : nil payment_methods = hash.key?('payment_methods') ? hash['payment_methods'] : nil offers = hash.key?('offers') ? hash['offers'] : nil countries = hash.key?('countries') ? hash['countries'] : nil shipping_profiles = hash.key?('shipping_profiles') ? hash['shipping_profiles'] : nil return_profiles = hash.key?('return_profiles') ? hash['return_profiles'] : nil coupon_profiles = hash.key?('coupon_profiles') ? hash['coupon_profiles'] : nil postback_profiles = hash.key?('postback_profiles') ? hash['postback_profiles'] : nil # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. AddCampaignRequest.new(name: name, description: description, is_prepaid_blocked: is_prepaid_blocked, channel_id: channel_id, gateway_id: gateway_id, payment_methods: payment_methods, offers: offers, countries: countries, shipping_profiles: shipping_profiles, return_profiles: return_profiles, coupon_profiles: coupon_profiles, postback_profiles: postback_profiles, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['description'] = 'description' @_hash['is_prepaid_blocked'] = 'is_prepaid_blocked' @_hash['channel_id'] = 'channel_id' @_hash['gateway_id'] = 'gateway_id' @_hash['payment_methods'] = 'payment_methods' @_hash['offers'] = 'offers' @_hash['countries'] = 'countries' @_hash['shipping_profiles'] = 'shipping_profiles' @_hash['return_profiles'] = 'return_profiles' @_hash['coupon_profiles'] = 'coupon_profiles' @_hash['postback_profiles'] = 'postback_profiles' @_hash end |
.nullables ⇒ Object
An array for nullable fields
84 85 86 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 84 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
79 80 81 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 79 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
169 170 171 172 173 174 175 176 177 178 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 169 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, description: #{@description.inspect},"\ " is_prepaid_blocked: #{@is_prepaid_blocked.inspect}, channel_id: #{@channel_id.inspect},"\ " gateway_id: #{@gateway_id.inspect}, payment_methods: #{@payment_methods.inspect}, offers:"\ " #{@offers.inspect}, countries: #{@countries.inspect}, shipping_profiles:"\ " #{@shipping_profiles.inspect}, return_profiles: #{@return_profiles.inspect},"\ " coupon_profiles: #{@coupon_profiles.inspect}, postback_profiles:"\ " #{@postback_profiles.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
158 159 160 161 162 163 164 165 166 |
# File 'lib/sticky_io_restful_api_v2025731/models/add_campaign_request.rb', line 158 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, description: #{@description}, is_prepaid_blocked:"\ " #{@is_prepaid_blocked}, channel_id: #{@channel_id}, gateway_id: #{@gateway_id},"\ " payment_methods: #{@payment_methods}, offers: #{@offers}, countries: #{@countries},"\ " shipping_profiles: #{@shipping_profiles}, return_profiles: #{@return_profiles},"\ " coupon_profiles: #{@coupon_profiles}, postback_profiles: #{@postback_profiles},"\ " additional_properties: #{@additional_properties}>" end |