Class: Line::Bot::V2::ManageAudience::CreateClickBasedAudienceGroupResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb

Overview

Create audience for click-based retargeting

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(audience_group_id: nil, type: nil, description: nil, created: nil, request_id: nil, click_url: nil, create_route: nil, permission: nil, expire_timestamp: nil, is_ifa_audience: false, **dynamic_attributes) ⇒ CreateClickBasedAudienceGroupResponse

Returns a new instance of CreateClickBasedAudienceGroupResponse.

Parameters:

  • audience_group_id (Integer, nil) (defaults to: nil)

    The audience ID.

  • type (String, nil) (defaults to: nil)

    (‘UPLOAD’|‘CLICK’|‘IMP’|‘CHAT_TAG’|‘FRIEND_PATH’|‘RESERVATION’|‘APP_EVENT’|‘VIDEO_VIEW’|‘WEBTRAFFIC’|‘IMAGE_CLICK’|‘RICHMENU_IMP’|‘RICHMENU_CLICK’)

  • description (String, nil) (defaults to: nil)

    The audience’s name.

  • created (Integer, nil) (defaults to: nil)

    When the audience was created (in UNIX time).

  • request_id (String, nil) (defaults to: nil)

    The request ID that was specified when the audience was created.

  • click_url (String, nil) (defaults to: nil)

    The URL that was specified when the audience was created.

  • create_route (String, nil) (defaults to: nil)

    (‘MESSAGING_API’) How the audience was created. ‘MESSAGING_API`: An audience created with Messaging API.

  • permission (String, nil) (defaults to: nil)

    (‘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.

  • expire_timestamp (Integer, nil) (defaults to: nil)

    Time of audience expiration. Only returned for specific audiences.

  • is_ifa_audience (Boolean, nil) (defaults to: false)

    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.



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
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 58

def initialize(
  audience_group_id: nil,
  type: nil,
  description: nil,
  created: nil,
  request_id: nil,
  click_url: nil,
  create_route: nil,
  permission: nil,
  expire_timestamp: nil,
  is_ifa_audience: false,
  **dynamic_attributes
)
  
  @audience_group_id = audience_group_id
  @type = type
  @description = description
  @created = created
  @request_id = request_id
  @click_url = click_url
  @create_route = create_route
  @permission = permission
  @expire_timestamp = 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_idInteger?

Returns The audience ID.

Returns:

  • (Integer, nil)

    The audience ID.



19
20
21
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 19

def audience_group_id
  @audience_group_id
end

#click_urlString?

Returns The URL that was specified when the audience was created.

Returns:

  • (String, nil)

    The URL that was specified when the audience was created.



34
35
36
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 34

def click_url
  @click_url
end

#create_routeString?

Returns (‘MESSAGING_API’) How the audience was created. ‘MESSAGING_API`: An audience created with Messaging API.

Returns:

  • (String, nil)

    (‘MESSAGING_API’) How the audience was created. ‘MESSAGING_API`: An audience created with Messaging API.



37
38
39
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 37

def create_route
  @create_route
end

#createdInteger?

Returns When the audience was created (in UNIX time).

Returns:

  • (Integer, nil)

    When the audience was created (in UNIX time).



28
29
30
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 28

def created
  @created
end

#descriptionString?

Returns The audience’s name.

Returns:

  • (String, nil)

    The audience’s name.



25
26
27
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 25

def description
  @description
end

#expire_timestampInteger?

Returns Time of audience expiration. Only returned for specific audiences.

Returns:

  • (Integer, nil)

    Time of audience expiration. Only returned for specific audiences.



43
44
45
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 43

def expire_timestamp
  @expire_timestamp
end

#is_ifa_audienceBoolean?

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.

Returns:

  • (Boolean, nil)

    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.



46
47
48
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 46

def is_ifa_audience
  @is_ifa_audience
end

#permissionString?

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.

Returns:

  • (String, nil)

    (‘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.



40
41
42
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 40

def permission
  @permission
end

#request_idString?

Returns The request ID that was specified when the audience was created.

Returns:

  • (String, nil)

    The request ID that was specified when the audience was created.



31
32
33
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 31

def request_id
  @request_id
end

#typeString?

Returns (‘UPLOAD’|‘CLICK’|‘IMP’|‘CHAT_TAG’|‘FRIEND_PATH’|‘RESERVATION’|‘APP_EVENT’|‘VIDEO_VIEW’|‘WEBTRAFFIC’|‘IMAGE_CLICK’|‘RICHMENU_IMP’|‘RICHMENU_CLICK’).

Returns:

  • (String, nil)

    (‘UPLOAD’|‘CLICK’|‘IMP’|‘CHAT_TAG’|‘FRIEND_PATH’|‘RESERVATION’|‘APP_EVENT’|‘VIDEO_VIEW’|‘WEBTRAFFIC’|‘IMAGE_CLICK’|‘RICHMENU_IMP’|‘RICHMENU_CLICK’)



22
23
24
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 22

def type
  @type
end

Class Method Details

.create(args) ⇒ Line::Bot::V2::ManageAudience::CreateClickBasedAudienceGroupResponse

Create an instance of the class from a hash

Parameters:

  • args (Hash)

    Hash containing all the required attributes

Returns:



99
100
101
102
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 99

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.

Parameters:

  • other (Object)

    Object to compare

Returns:

  • (Boolean)

    true if the objects are equal, false otherwise



106
107
108
109
110
111
112
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 106

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

#hashInteger

Returns Hash code of the object.

Returns:

  • (Integer)

    Hash code of the object



115
116
117
# File 'lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb', line 115

def hash
  [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
end