Class: Line::Bot::V2::Insight::GetNumberOfMessageDeliveriesResponse

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

Overview

Get number of message deliveries

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status: nil, broadcast: nil, targeting: nil, auto_response: nil, welcome_response: nil, chat: nil, api_broadcast: nil, api_push: nil, api_multicast: nil, api_narrowcast: nil, api_reply: nil, **dynamic_attributes) ⇒ GetNumberOfMessageDeliveriesResponse

Returns a new instance of GetNumberOfMessageDeliveriesResponse.

Parameters:

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

    (‘ready’|‘unready’|‘out_of_service’) Status of the counting process.

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

    Number of messages sent to all of this LINE Official Account’s friends (broadcast messages).

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

    Number of messages sent to some of this LINE Official Account’s friends, based on specific attributes (targeted messages).

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

    Number of auto-response messages sent.

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

    Number of greeting messages sent.

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

    Number of messages sent from LINE Official Account Manager [Chat screen](www.linebiz.com/jp/manual/OfficialAccountManager/chats/) (only available in Japanese).

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

    Number of broadcast messages sent with the ‘Send broadcast message` Messaging API operation.

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

    Number of push messages sent with the ‘Send push message` Messaging API operation.

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

    Number of multicast messages sent with the ‘Send multicast message` Messaging API operation.

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

    Number of narrowcast messages sent with the ‘Send narrowcast message` Messaging API operation.

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

    Number of replies sent with the ‘Send reply message` Messaging API operation.



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
95
96
97
98
99
100
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 62

def initialize(
  status: nil,
  broadcast: nil,
  targeting: nil,
  auto_response: nil,
  welcome_response: nil,
  chat: nil,
  api_broadcast: nil,
  api_push: nil,
  api_multicast: nil,
  api_narrowcast: nil,
  api_reply: nil,
  **dynamic_attributes
)
  
  @status = status
  @broadcast = broadcast
  @targeting = targeting
  @auto_response = auto_response
  @welcome_response = welcome_response
  @chat = chat
  @api_broadcast = api_broadcast
  @api_push = api_push
  @api_multicast = api_multicast
  @api_narrowcast = api_narrowcast
  @api_reply = api_reply

  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

#api_broadcastInteger?

Returns Number of broadcast messages sent with the ‘Send broadcast message` Messaging API operation.

Returns:

  • (Integer, nil)

    Number of broadcast messages sent with the ‘Send broadcast message` Messaging API operation.



37
38
39
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 37

def api_broadcast
  @api_broadcast
end

#api_multicastInteger?

Returns Number of multicast messages sent with the ‘Send multicast message` Messaging API operation.

Returns:

  • (Integer, nil)

    Number of multicast messages sent with the ‘Send multicast message` Messaging API operation.



43
44
45
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 43

def api_multicast
  @api_multicast
end

#api_narrowcastInteger?

Returns Number of narrowcast messages sent with the ‘Send narrowcast message` Messaging API operation.

Returns:

  • (Integer, nil)

    Number of narrowcast messages sent with the ‘Send narrowcast message` Messaging API operation.



46
47
48
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 46

def api_narrowcast
  @api_narrowcast
end

#api_pushInteger?

Returns Number of push messages sent with the ‘Send push message` Messaging API operation.

Returns:

  • (Integer, nil)

    Number of push messages sent with the ‘Send push message` Messaging API operation.



40
41
42
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 40

def api_push
  @api_push
end

#api_replyInteger?

Returns Number of replies sent with the ‘Send reply message` Messaging API operation.

Returns:

  • (Integer, nil)

    Number of replies sent with the ‘Send reply message` Messaging API operation.



49
50
51
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 49

def api_reply
  @api_reply
end

#auto_responseInteger?

Returns Number of auto-response messages sent.

Returns:

  • (Integer, nil)

    Number of auto-response messages sent.



28
29
30
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 28

def auto_response
  @auto_response
end

#broadcastInteger?

Returns Number of messages sent to all of this LINE Official Account’s friends (broadcast messages).

Returns:

  • (Integer, nil)

    Number of messages sent to all of this LINE Official Account’s friends (broadcast messages).



22
23
24
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 22

def broadcast
  @broadcast
end

#chatInteger?

Returns Number of messages sent from LINE Official Account Manager [Chat screen](www.linebiz.com/jp/manual/OfficialAccountManager/chats/) (only available in Japanese).

Returns:



34
35
36
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 34

def chat
  @chat
end

#statusString?

Returns (‘ready’|‘unready’|‘out_of_service’) Status of the counting process.

Returns:

  • (String, nil)

    (‘ready’|‘unready’|‘out_of_service’) Status of the counting process.



19
20
21
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 19

def status
  @status
end

#targetingInteger?

Returns Number of messages sent to some of this LINE Official Account’s friends, based on specific attributes (targeted messages).

Returns:

  • (Integer, nil)

    Number of messages sent to some of this LINE Official Account’s friends, based on specific attributes (targeted messages).



25
26
27
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 25

def targeting
  @targeting
end

#welcome_responseInteger?

Returns Number of greeting messages sent.

Returns:

  • (Integer, nil)

    Number of greeting messages sent.



31
32
33
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 31

def welcome_response
  @welcome_response
end

Class Method Details

.create(args) ⇒ Line::Bot::V2::Insight::GetNumberOfMessageDeliveriesResponse

Create an instance of the class from a hash

Parameters:

  • args (Hash)

    Hash containing all the required attributes

Returns:



105
106
107
108
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 105

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



112
113
114
115
116
117
118
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 112

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



121
122
123
# File 'lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb', line 121

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