Class: Line::Bot::V2::ManageAudience::CreateAudienceGroupResponse
- Inherits:
-
Object
- Object
- Line::Bot::V2::ManageAudience::CreateAudienceGroupResponse
- Defined in:
- lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb
Overview
Create audience for uploading user IDs (by JSON)
Instance Attribute Summary collapse
-
#audience_group_id ⇒ Integer?
The audience ID.
-
#create_route ⇒ String?
(‘MESSAGING_API’) How the audience was created.
-
#created ⇒ Integer?
When the audience was created (in UNIX time).
-
#description ⇒ String?
The audience’s name.
-
#expire_timestamp ⇒ Integer?
Time of audience expiration.
-
#is_ifa_audience ⇒ Boolean?
The value indicating the type of account to be sent, as specified when creating the audience for uploading user IDs.
-
#permission ⇒ String?
(‘READ’|‘READ_WRITE’) Audience’s update permission.
-
#type ⇒ String?
(‘UPLOAD’|‘CLICK’|‘IMP’|‘CHAT_TAG’|‘FRIEND_PATH’|‘RESERVATION’|‘APP_EVENT’|‘VIDEO_VIEW’|‘WEBTRAFFIC’|‘IMAGE_CLICK’|‘RICHMENU_IMP’|‘RICHMENU_CLICK’).
Class Method Summary collapse
-
.create(args) ⇒ Line::Bot::V2::ManageAudience::CreateAudienceGroupResponse
Create an instance of the class from a hash.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
True if the objects are equal, false otherwise.
-
#hash ⇒ Integer
Hash code of the object.
-
#initialize(audience_group_id: nil, create_route: nil, type: nil, description: nil, created: nil, permission: nil, expire_timestamp: nil, is_ifa_audience: nil, **dynamic_attributes) ⇒ CreateAudienceGroupResponse
constructor
A new instance of CreateAudienceGroupResponse.
Constructor Details
#initialize(audience_group_id: nil, create_route: nil, type: nil, description: nil, created: nil, permission: nil, expire_timestamp: nil, is_ifa_audience: nil, **dynamic_attributes) ⇒ CreateAudienceGroupResponse
Returns a new instance of CreateAudienceGroupResponse.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 50 def initialize( audience_group_id: nil, create_route: nil, type: nil, description: nil, created: nil, permission: nil, expire_timestamp: nil, is_ifa_audience: nil, **dynamic_attributes ) @audience_group_id = audience_group_id @create_route = create_route @type = type @description = description @created = created @permission = @expire_timestamp = @is_ifa_audience = is_ifa_audience dynamic_attributes.each do |key, value| self.class.attr_accessor key if value.is_a?(Hash) struct_klass = Struct.new(*value.keys.map(&:to_sym)) struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v } instance_variable_set("@#{key}", struct_klass.new(*struct_values)) else instance_variable_set("@#{key}", value) end end end |
Instance Attribute Details
#audience_group_id ⇒ Integer?
Returns The audience ID.
19 20 21 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 19 def audience_group_id @audience_group_id end |
#create_route ⇒ String?
Returns (‘MESSAGING_API’) How the audience was created. ‘MESSAGING_API`: An audience created with Messaging API.
22 23 24 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 22 def create_route @create_route end |
#created ⇒ Integer?
Returns When the audience was created (in UNIX time).
31 32 33 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 31 def created @created end |
#description ⇒ String?
Returns The audience’s name.
28 29 30 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 28 def description @description end |
#expire_timestamp ⇒ Integer?
Returns Time of audience expiration. Only returned for specific audiences.
37 38 39 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 37 def @expire_timestamp end |
#is_ifa_audience ⇒ Boolean?
Returns The value indicating the type of account to be sent, as specified when creating the audience for uploading user IDs. One of: ‘true`: Accounts are specified with IFAs. `false` (default): Accounts are specified with user IDs.
40 41 42 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 40 def is_ifa_audience @is_ifa_audience end |
#permission ⇒ String?
Returns (‘READ’|‘READ_WRITE’) Audience’s update permission. Audiences linked to the same channel will be READ_WRITE. ‘READ`: Can use only. `READ_WRITE`: Can use and update.
34 35 36 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 34 def @permission end |
#type ⇒ String?
Returns (‘UPLOAD’|‘CLICK’|‘IMP’|‘CHAT_TAG’|‘FRIEND_PATH’|‘RESERVATION’|‘APP_EVENT’|‘VIDEO_VIEW’|‘WEBTRAFFIC’|‘IMAGE_CLICK’|‘RICHMENU_IMP’|‘RICHMENU_CLICK’).
25 26 27 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 25 def type @type end |
Class Method Details
.create(args) ⇒ Line::Bot::V2::ManageAudience::CreateAudienceGroupResponse
Create an instance of the class from a hash
87 88 89 90 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 87 def self.create(args) # steep:ignore symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) return new(**symbolized_args) # steep:ignore end |
Instance Method Details
#==(other) ⇒ Boolean
Returns true if the objects are equal, false otherwise.
94 95 96 97 98 99 100 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 94 def ==(other) return false unless self.class == other.class instance_variables.all? do |var| instance_variable_get(var) == other.instance_variable_get(var) end end |
#hash ⇒ Integer
Returns Hash code of the object.
103 104 105 |
# File 'lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb', line 103 def hash [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash end |