Class: Files::As2IncomingMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/as2_incoming_message.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ As2IncomingMessage

Returns a new instance of As2IncomingMessage.



7
8
9
10
# File 'lib/files.com/models/as2_incoming_message.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/as2_incoming_message.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/as2_incoming_message.rb', line 5

def options
  @options
end

Class Method Details

.all(params = {}, options = {}) ⇒ Object



213
214
215
# File 'lib/files.com/models/as2_incoming_message.rb', line 213

def self.all(params = {}, options = {})
  list(params, options)
end

.list(params = {}, options = {}) ⇒ Object

Parameters:

cursor - string - Used for pagination.  When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`.  Send one of those cursor value here to resume an existing list from the next available record.  Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
per_page - int64 - Number of records to show per page.  (Max: 10,000, 1,000 or less is recommended).
sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[created_at]=desc`). Valid fields are `created_at` and `as2_partner_id`.
filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
as2_partner_id - int64 - As2 Partner ID.  If provided, will return message specific to that partner.


197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/files.com/models/as2_incoming_message.rb', line 197

def self.list(params = {}, options = {})
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
  raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
  raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params[:filter_gt] and !params[:filter_gt].is_a?(Hash)
  raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params[:filter_gteq] and !params[:filter_gteq].is_a?(Hash)
  raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
  raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
  raise InvalidParameterError.new("Bad parameter: as2_partner_id must be an Integer") if params[:as2_partner_id] and !params[:as2_partner_id].is_a?(Integer)

  List.new(As2IncomingMessage, params) do
    Api.send_request("/as2_incoming_messages", :get, params, options)
  end
end

Instance Method Details

#activity_logObject

string - JSON Structure of the activity log.



43
44
45
# File 'lib/files.com/models/as2_incoming_message.rb', line 43

def activity_log
  @attributes[:activity_log]
end

#as2_fromObject

string - AS2 FROM header of message



73
74
75
# File 'lib/files.com/models/as2_incoming_message.rb', line 73

def as2_from
  @attributes[:as2_from]
end

#as2_partner_idObject

int64 - Id of the AS2 Partner associated with this message.



18
19
20
# File 'lib/files.com/models/as2_incoming_message.rb', line 18

def as2_partner_id
  @attributes[:as2_partner_id]
end

#as2_station_idObject

int64 - Id of the AS2 Station associated with this message.



23
24
25
# File 'lib/files.com/models/as2_incoming_message.rb', line 23

def as2_station_id
  @attributes[:as2_station_id]
end

#as2_toObject

string - AS2 TO header of message



68
69
70
# File 'lib/files.com/models/as2_incoming_message.rb', line 68

def as2_to
  @attributes[:as2_to]
end

#attachment_filenameObject

string - Filename of the file being received.



98
99
100
# File 'lib/files.com/models/as2_incoming_message.rb', line 98

def attachment_filename
  @attributes[:attachment_filename]
end

#body_sizeObject

string - Encrypted Payload Body Size



93
94
95
# File 'lib/files.com/models/as2_incoming_message.rb', line 93

def body_size
  @attributes[:body_size]
end

#content_typeObject

string - Content Type header of the incoming message.



33
34
35
# File 'lib/files.com/models/as2_incoming_message.rb', line 33

def content_type
  @attributes[:content_type]
end

#created_atObject

date-time - Message creation date/time



108
109
110
# File 'lib/files.com/models/as2_incoming_message.rb', line 108

def created_at
  @attributes[:created_at]
end

#dateObject

string - Date Header



88
89
90
# File 'lib/files.com/models/as2_incoming_message.rb', line 88

def date
  @attributes[:date]
end

#encrypted_uriObject

string - URL to download the encrypted signed smime that is to sent as AS2 body



163
164
165
# File 'lib/files.com/models/as2_incoming_message.rb', line 163

def encrypted_uri
  @attributes[:encrypted_uri]
end

#hex_recipient_serialObject

string - Incoming Message Recipient(the Client Cert used to encrypt this message)‘s serial in hex format.



128
129
130
# File 'lib/files.com/models/as2_incoming_message.rb', line 128

def hex_recipient_serial
  @attributes[:hex_recipient_serial]
end

#http_headersObject

object - HTTP Headers sent with this message.



38
39
40
# File 'lib/files.com/models/as2_incoming_message.rb', line 38

def http_headers
  @attributes[:http_headers]
end

#http_response_codeObject

string - HTTP Response Code sent for this message



113
114
115
# File 'lib/files.com/models/as2_incoming_message.rb', line 113

def http_response_code
  @attributes[:http_response_code]
end

#http_response_headersObject

object - HTTP Headers sent for this message.



118
119
120
# File 'lib/files.com/models/as2_incoming_message.rb', line 118

def http_response_headers
  @attributes[:http_response_headers]
end

#idObject

int64 - Id of the AS2 Partner.



13
14
15
# File 'lib/files.com/models/as2_incoming_message.rb', line 13

def id
  @attributes[:id]
end

#ipObject

string - IP Address of the Sender



103
104
105
# File 'lib/files.com/models/as2_incoming_message.rb', line 103

def ip
  @attributes[:ip]
end

#mdn_response_uriObject

string - URL to download the http response body



183
184
185
# File 'lib/files.com/models/as2_incoming_message.rb', line 183

def mdn_response_uri
  @attributes[:mdn_response_uri]
end

#message_decryptedObject

boolean - Message decrypted successfully?



143
144
145
# File 'lib/files.com/models/as2_incoming_message.rb', line 143

def message_decrypted
  @attributes[:message_decrypted]
end

#message_idObject

string - AS2 Message Id



78
79
80
# File 'lib/files.com/models/as2_incoming_message.rb', line 78

def message_id
  @attributes[:message_id]
end

#message_mdn_returnedObject

boolean - MDN returned?



158
159
160
# File 'lib/files.com/models/as2_incoming_message.rb', line 158

def message_mdn_returned
  @attributes[:message_mdn_returned]
end

#message_processing_successObject

boolean - Message processed successfully?



153
154
155
# File 'lib/files.com/models/as2_incoming_message.rb', line 153

def message_processing_success
  @attributes[:message_processing_success]
end

#message_receivedObject

boolean - Message body received?



138
139
140
# File 'lib/files.com/models/as2_incoming_message.rb', line 138

def message_received
  @attributes[:message_received]
end

#message_signature_verifiedObject

boolean - Message signature verified?



148
149
150
# File 'lib/files.com/models/as2_incoming_message.rb', line 148

def message_signature_verified
  @attributes[:message_signature_verified]
end

#micObject

string - AS2 Message Integrity Check



58
59
60
# File 'lib/files.com/models/as2_incoming_message.rb', line 58

def mic
  @attributes[:mic]
end

#mic_algoObject

string - AS2 Message Integrity Check Algorithm Used



63
64
65
# File 'lib/files.com/models/as2_incoming_message.rb', line 63

def mic_algo
  @attributes[:mic_algo]
end

#processing_resultObject

string - Result of processing.



48
49
50
# File 'lib/files.com/models/as2_incoming_message.rb', line 48

def processing_result
  @attributes[:processing_result]
end

#processing_result_descriptionObject

string - Result of processing description.



53
54
55
# File 'lib/files.com/models/as2_incoming_message.rb', line 53

def processing_result_description
  @attributes[:processing_result_description]
end

#raw_uriObject

string - URL to download the original file contents



178
179
180
# File 'lib/files.com/models/as2_incoming_message.rb', line 178

def raw_uri
  @attributes[:raw_uri]
end

#recipient_issuerObject

string - Incoming Message Recipient(the Client Cert used to encrypt this message)‘s issuer



133
134
135
# File 'lib/files.com/models/as2_incoming_message.rb', line 133

def recipient_issuer
  @attributes[:recipient_issuer]
end

#recipient_serialObject

string - Incoming Message Recipient(the Client Cert used to encrypt this message)‘s serial



123
124
125
# File 'lib/files.com/models/as2_incoming_message.rb', line 123

def recipient_serial
  @attributes[:recipient_serial]
end

#smime_signed_uriObject

string - URL to download the file contents as smime with signature



168
169
170
# File 'lib/files.com/models/as2_incoming_message.rb', line 168

def smime_signed_uri
  @attributes[:smime_signed_uri]
end

#smime_uriObject

string - URL to download the file contents encoded as smime



173
174
175
# File 'lib/files.com/models/as2_incoming_message.rb', line 173

def smime_uri
  @attributes[:smime_uri]
end

#subjectObject

string - AS2 Subject Header



83
84
85
# File 'lib/files.com/models/as2_incoming_message.rb', line 83

def subject
  @attributes[:subject]
end

#uuidObject

string - UUID assigned to this message.



28
29
30
# File 'lib/files.com/models/as2_incoming_message.rb', line 28

def uuid
  @attributes[:uuid]
end