sib-api-v3-sdk 4.0.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/docs/CreateAttribute.md +3 -3
- data/docs/CreateContact.md +5 -5
- data/docs/CreateList.md +1 -1
- data/docs/DeleteHardbounces.md +2 -2
- data/docs/GetCampaignStats.md +3 -3
- data/docs/GetContactDetails.md +1 -1
- data/docs/GetExtendedCampaignStats.md +3 -2
- data/docs/GetExtendedContactDetails.md +1 -1
- data/docs/RequestContactExport.md +2 -2
- data/docs/RequestContactImport.md +5 -2
- data/docs/RequestContactImportNewList.md +1 -1
- data/docs/SMTPApi.md +2 -0
- data/docs/SendEmail.md +8 -7
- data/docs/SendEmailAttachment.md +2 -2
- data/docs/SendSmtpEmail.md +7 -6
- data/docs/SendSmtpEmailAttachment.md +1 -1
- data/docs/SendSmtpEmailSender.md +2 -2
- data/docs/SendTestEmail.md +1 -1
- data/docs/UpdateAttribute.md +2 -2
- data/docs/UpdateContact.md +3 -3
- data/docs/UpdateList.md +2 -2
- data/lib/sib-api-v3-sdk.rb +0 -1
- data/lib/sib-api-v3-sdk/api/smtp_api.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_attribute.rb +3 -3
- data/lib/sib-api-v3-sdk/models/create_contact.rb +5 -5
- data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +1 -1
- data/lib/sib-api-v3-sdk/models/create_email_campaign_sender.rb +1 -1
- data/lib/sib-api-v3-sdk/models/create_list.rb +1 -1
- data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +1 -1
- data/lib/sib-api-v3-sdk/models/delete_hardbounces.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +2 -7
- data/lib/sib-api-v3-sdk/models/get_contact_details.rb +3 -4
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats.rb +20 -5
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +3 -4
- data/lib/sib-api-v3-sdk/models/request_contact_export.rb +2 -2
- data/lib/sib-api-v3-sdk/models/request_contact_import.rb +42 -6
- data/lib/sib-api-v3-sdk/models/request_contact_import_new_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/send_email.rb +25 -15
- data/lib/sib-api-v3-sdk/models/send_email_attachment.rb +16 -3
- data/lib/sib-api-v3-sdk/models/send_report_email.rb +1 -1
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +24 -14
- data/lib/sib-api-v3-sdk/models/send_smtp_email_attachment.rb +1 -1
- data/lib/sib-api-v3-sdk/models/send_smtp_email_reply_to.rb +1 -1
- data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +3 -3
- data/lib/sib-api-v3-sdk/models/send_test_email.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_attribute.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_contact.rb +5 -6
- data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_email_campaign_sender.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_list.rb +2 -2
- data/lib/sib-api-v3-sdk/models/update_smtp_template_sender.rb +1 -1
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/spec/api/smtp_api_spec.rb +1 -1
- data/spec/models/get_extended_campaign_stats_spec.rb +6 -0
- data/spec/models/request_contact_import_spec.rb +18 -0
- data/spec/models/send_email_spec.rb +6 -0
- data/spec/models/send_smtp_email_spec.rb +6 -0
- metadata +2 -6
- data/docs/GetExtendedCampaignStatsLinksStats.md +0 -8
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_stats_links_stats.rb +0 -194
- data/spec/models/get_extended_campaign_stats_links_stats_spec.rb +0 -42
| @@ -13,7 +13,7 @@ Swagger Codegen version: 2.3.1 | |
| 13 13 | 
             
            require 'date'
         | 
| 14 14 |  | 
| 15 15 | 
             
            module SibApiV3Sdk
         | 
| 16 | 
            -
              # Email on which transactional mail recipients will be able to reply  | 
| 16 | 
            +
              # Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {'email':'ann6533@example.com', 'name':'Ann'}.
         | 
| 17 17 | 
             
              class SendSmtpEmailReplyTo
         | 
| 18 18 | 
             
                # Email address in reply to
         | 
| 19 19 | 
             
                attr_accessor :email
         | 
| @@ -13,12 +13,12 @@ Swagger Codegen version: 2.3.1 | |
| 13 13 | 
             
            require 'date'
         | 
| 14 14 |  | 
| 15 15 | 
             
            module SibApiV3Sdk
         | 
| 16 | 
            -
              #  | 
| 16 | 
            +
              # Mandatory if 'templateId' is not passed. Pass name (optional) and email of sender from which emails will be sent. For example, {'name':'Mary from MyShop', 'email':'no-reply@myshop.com'}
         | 
| 17 17 | 
             
              class SendSmtpEmailSender
         | 
| 18 | 
            -
                #  | 
| 18 | 
            +
                # Name of the sender from which the emails will be sent
         | 
| 19 19 | 
             
                attr_accessor :name
         | 
| 20 20 |  | 
| 21 | 
            -
                #  | 
| 21 | 
            +
                # Email of the sender from which the emails will be sent
         | 
| 22 22 | 
             
                attr_accessor :email
         | 
| 23 23 |  | 
| 24 24 |  | 
| @@ -15,7 +15,7 @@ require 'date' | |
| 15 15 | 
             
            module SibApiV3Sdk
         | 
| 16 16 |  | 
| 17 17 | 
             
              class SendTestEmail
         | 
| 18 | 
            -
                #  | 
| 18 | 
            +
                # List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list.
         | 
| 19 19 | 
             
                attr_accessor :email_to
         | 
| 20 20 |  | 
| 21 21 |  | 
| @@ -15,10 +15,10 @@ require 'date' | |
| 15 15 | 
             
            module SibApiV3Sdk
         | 
| 16 16 |  | 
| 17 17 | 
             
              class UpdateAttribute
         | 
| 18 | 
            -
                # Value of the attribute. Use only if the attribute's category is calculated or global
         | 
| 18 | 
            +
                # Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global'
         | 
| 19 19 | 
             
                attr_accessor :value
         | 
| 20 20 |  | 
| 21 | 
            -
                #  | 
| 21 | 
            +
                # List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}]
         | 
| 22 22 | 
             
                attr_accessor :enumeration
         | 
| 23 23 |  | 
| 24 24 |  | 
| @@ -15,12 +15,13 @@ require 'date' | |
| 15 15 | 
             
            module SibApiV3Sdk
         | 
| 16 16 |  | 
| 17 17 | 
             
              class UpdateContact
         | 
| 18 | 
            +
                # Pass the set of attributes to be updated. These attributes must be present in your account. For eg. {'FNAME':'Ellie', 'LNAME':'Roger'}
         | 
| 18 19 | 
             
                attr_accessor :attributes
         | 
| 19 20 |  | 
| 20 | 
            -
                #  | 
| 21 | 
            +
                # Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)
         | 
| 21 22 | 
             
                attr_accessor :email_blacklisted
         | 
| 22 23 |  | 
| 23 | 
            -
                #  | 
| 24 | 
            +
                # Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)
         | 
| 24 25 | 
             
                attr_accessor :sms_blacklisted
         | 
| 25 26 |  | 
| 26 27 | 
             
                # Ids of the lists to add the contact to
         | 
| @@ -48,7 +49,7 @@ module SibApiV3Sdk | |
| 48 49 | 
             
                # Attribute type mapping.
         | 
| 49 50 | 
             
                def self.swagger_types
         | 
| 50 51 | 
             
                  {
         | 
| 51 | 
            -
                    :'attributes' => :' | 
| 52 | 
            +
                    :'attributes' => :'Object',
         | 
| 52 53 | 
             
                    :'email_blacklisted' => :'BOOLEAN',
         | 
| 53 54 | 
             
                    :'sms_blacklisted' => :'BOOLEAN',
         | 
| 54 55 | 
             
                    :'list_ids' => :'Array<Integer>',
         | 
| @@ -66,9 +67,7 @@ module SibApiV3Sdk | |
| 66 67 | 
             
                  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
         | 
| 67 68 |  | 
| 68 69 | 
             
                  if attributes.has_key?(:'attributes')
         | 
| 69 | 
            -
                     | 
| 70 | 
            -
                      self.attributes = value
         | 
| 71 | 
            -
                    end
         | 
| 70 | 
            +
                    self.attributes = attributes[:'attributes']
         | 
| 72 71 | 
             
                  end
         | 
| 73 72 |  | 
| 74 73 | 
             
                  if attributes.has_key?(:'emailBlacklisted')
         | 
| @@ -13,7 +13,7 @@ Swagger Codegen version: 2.3.1 | |
| 13 13 | 
             
            require 'date'
         | 
| 14 14 |  | 
| 15 15 | 
             
            module SibApiV3Sdk
         | 
| 16 | 
            -
             | 
| 16 | 
            +
              # Sender details including email and/or name. For example {'name':'xyz' , 'email':'example@abc.com'}
         | 
| 17 17 | 
             
              class UpdateEmailCampaignSender
         | 
| 18 18 | 
             
                # Sender Name from which the campaign emails are sent
         | 
| 19 19 | 
             
                attr_accessor :name
         | 
| @@ -15,10 +15,10 @@ require 'date' | |
| 15 15 | 
             
            module SibApiV3Sdk
         | 
| 16 16 |  | 
| 17 17 | 
             
              class UpdateList
         | 
| 18 | 
            -
                # Name of the list.  | 
| 18 | 
            +
                # Name of the list. Either of the two parameters (name, folderId) can be updated at a time.
         | 
| 19 19 | 
             
                attr_accessor :name
         | 
| 20 20 |  | 
| 21 | 
            -
                # Id of the folder in which to  | 
| 21 | 
            +
                # Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time.
         | 
| 22 22 | 
             
                attr_accessor :folder_id
         | 
| 23 23 |  | 
| 24 24 |  | 
| @@ -13,7 +13,7 @@ Swagger Codegen version: 2.3.1 | |
| 13 13 | 
             
            require 'date'
         | 
| 14 14 |  | 
| 15 15 | 
             
            module SibApiV3Sdk
         | 
| 16 | 
            -
             | 
| 16 | 
            +
              # Sender details including email and/or name. For example {'name':'xyz' , 'email':'example@abc.com'}
         | 
| 17 17 | 
             
              class UpdateSmtpTemplateSender
         | 
| 18 18 | 
             
                # Name of the sender
         | 
| 19 19 | 
             
                attr_accessor :name
         | 
    
        data/spec/api/smtp_api_spec.rb
    CHANGED
    
    | @@ -149,7 +149,7 @@ describe 'SMTPApi' do | |
| 149 149 |  | 
| 150 150 | 
             
              # unit tests for send_template
         | 
| 151 151 | 
             
              # Send a template
         | 
| 152 | 
            -
              # 
         | 
| 152 | 
            +
              # This endpoint is deprecated. Prefer v3/smtp/email instead.
         | 
| 153 153 | 
             
              # @param template_id Id of the template
         | 
| 154 154 | 
             
              # @param send_email 
         | 
| 155 155 | 
             
              # @param [Hash] opts the optional parameters
         | 
| @@ -32,6 +32,12 @@ describe 'GetExtendedCampaignStats' do | |
| 32 32 | 
             
                  expect(@instance).to be_instance_of(SibApiV3Sdk::GetExtendedCampaignStats)
         | 
| 33 33 | 
             
                end
         | 
| 34 34 | 
             
              end
         | 
| 35 | 
            +
              describe 'test attribute "global_stats"' do
         | 
| 36 | 
            +
                it 'should work' do
         | 
| 37 | 
            +
                   # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         | 
| 38 | 
            +
                end
         | 
| 39 | 
            +
              end
         | 
| 40 | 
            +
             | 
| 35 41 | 
             
              describe 'test attribute "campaign_stats"' do
         | 
| 36 42 | 
             
                it 'should work' do
         | 
| 37 43 | 
             
                   # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         | 
| @@ -62,5 +62,23 @@ describe 'RequestContactImport' do | |
| 62 62 | 
             
                end
         | 
| 63 63 | 
             
              end
         | 
| 64 64 |  | 
| 65 | 
            +
              describe 'test attribute "email_blacklist"' do
         | 
| 66 | 
            +
                it 'should work' do
         | 
| 67 | 
            +
                   # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         | 
| 68 | 
            +
                end
         | 
| 69 | 
            +
              end
         | 
| 70 | 
            +
             | 
| 71 | 
            +
              describe 'test attribute "sms_blacklist"' do
         | 
| 72 | 
            +
                it 'should work' do
         | 
| 73 | 
            +
                   # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         | 
| 74 | 
            +
                end
         | 
| 75 | 
            +
              end
         | 
| 76 | 
            +
             | 
| 77 | 
            +
              describe 'test attribute "update_existing_contacts"' do
         | 
| 78 | 
            +
                it 'should work' do
         | 
| 79 | 
            +
                   # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         | 
| 80 | 
            +
                end
         | 
| 81 | 
            +
              end
         | 
| 82 | 
            +
             | 
| 65 83 | 
             
            end
         | 
| 66 84 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: sib-api-v3-sdk
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version:  | 
| 4 | 
            +
              version: 5.0.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - SendinBlue Developers
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2018- | 
| 11 | 
            +
            date: 2018-05-15 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: typhoeus
         | 
| @@ -266,7 +266,6 @@ files: | |
| 266 266 | 
             
            - docs/GetExtendedCampaignOverview.md
         | 
| 267 267 | 
             
            - docs/GetExtendedCampaignOverviewSender.md
         | 
| 268 268 | 
             
            - docs/GetExtendedCampaignStats.md
         | 
| 269 | 
            -
            - docs/GetExtendedCampaignStatsLinksStats.md
         | 
| 270 269 | 
             
            - docs/GetExtendedClient.md
         | 
| 271 270 | 
             
            - docs/GetExtendedClientAddress.md
         | 
| 272 271 | 
             
            - docs/GetExtendedContactDetails.md
         | 
| @@ -440,7 +439,6 @@ files: | |
| 440 439 | 
             
            - lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb
         | 
| 441 440 | 
             
            - lib/sib-api-v3-sdk/models/get_extended_campaign_overview_sender.rb
         | 
| 442 441 | 
             
            - lib/sib-api-v3-sdk/models/get_extended_campaign_stats.rb
         | 
| 443 | 
            -
            - lib/sib-api-v3-sdk/models/get_extended_campaign_stats_links_stats.rb
         | 
| 444 442 | 
             
            - lib/sib-api-v3-sdk/models/get_extended_client.rb
         | 
| 445 443 | 
             
            - lib/sib-api-v3-sdk/models/get_extended_client_address.rb
         | 
| 446 444 | 
             
            - lib/sib-api-v3-sdk/models/get_extended_contact_details.rb
         | 
| @@ -605,7 +603,6 @@ files: | |
| 605 603 | 
             
            - spec/models/get_email_event_report_spec.rb
         | 
| 606 604 | 
             
            - spec/models/get_extended_campaign_overview_sender_spec.rb
         | 
| 607 605 | 
             
            - spec/models/get_extended_campaign_overview_spec.rb
         | 
| 608 | 
            -
            - spec/models/get_extended_campaign_stats_links_stats_spec.rb
         | 
| 609 606 | 
             
            - spec/models/get_extended_campaign_stats_spec.rb
         | 
| 610 607 | 
             
            - spec/models/get_extended_client_address_spec.rb
         | 
| 611 608 | 
             
            - spec/models/get_extended_client_spec.rb
         | 
| @@ -795,7 +792,6 @@ test_files: | |
| 795 792 | 
             
            - spec/models/get_email_event_report_spec.rb
         | 
| 796 793 | 
             
            - spec/models/get_extended_campaign_overview_sender_spec.rb
         | 
| 797 794 | 
             
            - spec/models/get_extended_campaign_overview_spec.rb
         | 
| 798 | 
            -
            - spec/models/get_extended_campaign_stats_links_stats_spec.rb
         | 
| 799 795 | 
             
            - spec/models/get_extended_campaign_stats_spec.rb
         | 
| 800 796 | 
             
            - spec/models/get_extended_client_address_spec.rb
         | 
| 801 797 | 
             
            - spec/models/get_extended_client_spec.rb
         | 
| @@ -1,194 +0,0 @@ | |
| 1 | 
            -
            =begin
         | 
| 2 | 
            -
            #SendinBlue API
         | 
| 3 | 
            -
             | 
| 4 | 
            -
            #SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to :   - Manage your campaigns and get the statistics   - Manage your contacts   - Send transactional Emails and SMS   - and much more...  You can download our wrappers at https://github.com/orgs/sendinblue  **Possible responses**   | Code | Message |   | :-------------: | ------------- |   | 200  | OK. Successful Request  |   | 201  | OK. Successful Creation |   | 202  | OK. Request accepted |   | 204  | OK. Successful Update/Deletion  |   | 400  | Error. Bad Request  |   | 401  | Error. Authentication Needed  |   | 402  | Error. Not enough credit, plan upgrade needed  |   | 403  | Error. Permission denied  |   | 404  | Error. Object does not exist |   | 405  | Error. Method not allowed  | 
         | 
| 5 | 
            -
             | 
| 6 | 
            -
            OpenAPI spec version: 3.0.0
         | 
| 7 | 
            -
            Contact: contact@sendinblue.com
         | 
| 8 | 
            -
            Generated by: https://github.com/swagger-api/swagger-codegen.git
         | 
| 9 | 
            -
            Swagger Codegen version: 2.3.1
         | 
| 10 | 
            -
             | 
| 11 | 
            -
            =end
         | 
| 12 | 
            -
             | 
| 13 | 
            -
            require 'date'
         | 
| 14 | 
            -
             | 
| 15 | 
            -
            module SibApiV3Sdk
         | 
| 16 | 
            -
              # Statistics about the clicked links
         | 
| 17 | 
            -
              class GetExtendedCampaignStatsLinksStats
         | 
| 18 | 
            -
                # Number of clicks for the link
         | 
| 19 | 
            -
                attr_accessor :nb_click
         | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
                # Attribute mapping from ruby-style variable name to JSON key.
         | 
| 23 | 
            -
                def self.attribute_map
         | 
| 24 | 
            -
                  {
         | 
| 25 | 
            -
                    :'nb_click' => :'nbClick'
         | 
| 26 | 
            -
                  }
         | 
| 27 | 
            -
                end
         | 
| 28 | 
            -
             | 
| 29 | 
            -
                # Attribute type mapping.
         | 
| 30 | 
            -
                def self.swagger_types
         | 
| 31 | 
            -
                  {
         | 
| 32 | 
            -
                    :'nb_click' => :'Integer'
         | 
| 33 | 
            -
                  }
         | 
| 34 | 
            -
                end
         | 
| 35 | 
            -
             | 
| 36 | 
            -
                # Initializes the object
         | 
| 37 | 
            -
                # @param [Hash] attributes Model attributes in the form of hash
         | 
| 38 | 
            -
                def initialize(attributes = {})
         | 
| 39 | 
            -
                  return unless attributes.is_a?(Hash)
         | 
| 40 | 
            -
             | 
| 41 | 
            -
                  # convert string to symbol for hash key
         | 
| 42 | 
            -
                  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
         | 
| 43 | 
            -
             | 
| 44 | 
            -
                  if attributes.has_key?(:'nbClick')
         | 
| 45 | 
            -
                    self.nb_click = attributes[:'nbClick']
         | 
| 46 | 
            -
                  end
         | 
| 47 | 
            -
             | 
| 48 | 
            -
                end
         | 
| 49 | 
            -
             | 
| 50 | 
            -
                # Show invalid properties with the reasons. Usually used together with valid?
         | 
| 51 | 
            -
                # @return Array for valid properties with the reasons
         | 
| 52 | 
            -
                def list_invalid_properties
         | 
| 53 | 
            -
                  invalid_properties = Array.new
         | 
| 54 | 
            -
                  if @nb_click.nil?
         | 
| 55 | 
            -
                    invalid_properties.push("invalid value for 'nb_click', nb_click cannot be nil.")
         | 
| 56 | 
            -
                  end
         | 
| 57 | 
            -
             | 
| 58 | 
            -
                  return invalid_properties
         | 
| 59 | 
            -
                end
         | 
| 60 | 
            -
             | 
| 61 | 
            -
                # Check to see if the all the properties in the model are valid
         | 
| 62 | 
            -
                # @return true if the model is valid
         | 
| 63 | 
            -
                def valid?
         | 
| 64 | 
            -
                  return false if @nb_click.nil?
         | 
| 65 | 
            -
                  return true
         | 
| 66 | 
            -
                end
         | 
| 67 | 
            -
             | 
| 68 | 
            -
                # Checks equality by comparing each attribute.
         | 
| 69 | 
            -
                # @param [Object] Object to be compared
         | 
| 70 | 
            -
                def ==(o)
         | 
| 71 | 
            -
                  return true if self.equal?(o)
         | 
| 72 | 
            -
                  self.class == o.class &&
         | 
| 73 | 
            -
                      nb_click == o.nb_click
         | 
| 74 | 
            -
                end
         | 
| 75 | 
            -
             | 
| 76 | 
            -
                # @see the `==` method
         | 
| 77 | 
            -
                # @param [Object] Object to be compared
         | 
| 78 | 
            -
                def eql?(o)
         | 
| 79 | 
            -
                  self == o
         | 
| 80 | 
            -
                end
         | 
| 81 | 
            -
             | 
| 82 | 
            -
                # Calculates hash code according to all attributes.
         | 
| 83 | 
            -
                # @return [Fixnum] Hash code
         | 
| 84 | 
            -
                def hash
         | 
| 85 | 
            -
                  [nb_click].hash
         | 
| 86 | 
            -
                end
         | 
| 87 | 
            -
             | 
| 88 | 
            -
                # Builds the object from hash
         | 
| 89 | 
            -
                # @param [Hash] attributes Model attributes in the form of hash
         | 
| 90 | 
            -
                # @return [Object] Returns the model itself
         | 
| 91 | 
            -
                def build_from_hash(attributes)
         | 
| 92 | 
            -
                  return nil unless attributes.is_a?(Hash)
         | 
| 93 | 
            -
                  self.class.swagger_types.each_pair do |key, type|
         | 
| 94 | 
            -
                    if type =~ /\AArray<(.*)>/i
         | 
| 95 | 
            -
                      # check to ensure the input is an array given that the the attribute
         | 
| 96 | 
            -
                      # is documented as an array but the input is not
         | 
| 97 | 
            -
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         | 
| 98 | 
            -
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
         | 
| 99 | 
            -
                      end
         | 
| 100 | 
            -
                    elsif !attributes[self.class.attribute_map[key]].nil?
         | 
| 101 | 
            -
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         | 
| 102 | 
            -
                    end # or else data not found in attributes(hash), not an issue as the data can be optional
         | 
| 103 | 
            -
                  end
         | 
| 104 | 
            -
             | 
| 105 | 
            -
                  self
         | 
| 106 | 
            -
                end
         | 
| 107 | 
            -
             | 
| 108 | 
            -
                # Deserializes the data based on type
         | 
| 109 | 
            -
                # @param string type Data type
         | 
| 110 | 
            -
                # @param string value Value to be deserialized
         | 
| 111 | 
            -
                # @return [Object] Deserialized data
         | 
| 112 | 
            -
                def _deserialize(type, value)
         | 
| 113 | 
            -
                  case type.to_sym
         | 
| 114 | 
            -
                  when :DateTime
         | 
| 115 | 
            -
                    DateTime.parse(value)
         | 
| 116 | 
            -
                  when :Date
         | 
| 117 | 
            -
                    Date.parse(value)
         | 
| 118 | 
            -
                  when :String
         | 
| 119 | 
            -
                    value.to_s
         | 
| 120 | 
            -
                  when :Integer
         | 
| 121 | 
            -
                    value.to_i
         | 
| 122 | 
            -
                  when :Float
         | 
| 123 | 
            -
                    value.to_f
         | 
| 124 | 
            -
                  when :BOOLEAN
         | 
| 125 | 
            -
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         | 
| 126 | 
            -
                      true
         | 
| 127 | 
            -
                    else
         | 
| 128 | 
            -
                      false
         | 
| 129 | 
            -
                    end
         | 
| 130 | 
            -
                  when :Object
         | 
| 131 | 
            -
                    # generic object (usually a Hash), return directly
         | 
| 132 | 
            -
                    value
         | 
| 133 | 
            -
                  when /\AArray<(?<inner_type>.+)>\z/
         | 
| 134 | 
            -
                    inner_type = Regexp.last_match[:inner_type]
         | 
| 135 | 
            -
                    value.map { |v| _deserialize(inner_type, v) }
         | 
| 136 | 
            -
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         | 
| 137 | 
            -
                    k_type = Regexp.last_match[:k_type]
         | 
| 138 | 
            -
                    v_type = Regexp.last_match[:v_type]
         | 
| 139 | 
            -
                    {}.tap do |hash|
         | 
| 140 | 
            -
                      value.each do |k, v|
         | 
| 141 | 
            -
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         | 
| 142 | 
            -
                      end
         | 
| 143 | 
            -
                    end
         | 
| 144 | 
            -
                  else # model
         | 
| 145 | 
            -
                    temp_model = SibApiV3Sdk.const_get(type).new
         | 
| 146 | 
            -
                    temp_model.build_from_hash(value)
         | 
| 147 | 
            -
                  end
         | 
| 148 | 
            -
                end
         | 
| 149 | 
            -
             | 
| 150 | 
            -
                # Returns the string representation of the object
         | 
| 151 | 
            -
                # @return [String] String presentation of the object
         | 
| 152 | 
            -
                def to_s
         | 
| 153 | 
            -
                  to_hash.to_s
         | 
| 154 | 
            -
                end
         | 
| 155 | 
            -
             | 
| 156 | 
            -
                # to_body is an alias to to_hash (backward compatibility)
         | 
| 157 | 
            -
                # @return [Hash] Returns the object in the form of hash
         | 
| 158 | 
            -
                def to_body
         | 
| 159 | 
            -
                  to_hash
         | 
| 160 | 
            -
                end
         | 
| 161 | 
            -
             | 
| 162 | 
            -
                # Returns the object in the form of hash
         | 
| 163 | 
            -
                # @return [Hash] Returns the object in the form of hash
         | 
| 164 | 
            -
                def to_hash
         | 
| 165 | 
            -
                  hash = {}
         | 
| 166 | 
            -
                  self.class.attribute_map.each_pair do |attr, param|
         | 
| 167 | 
            -
                    value = self.send(attr)
         | 
| 168 | 
            -
                    next if value.nil?
         | 
| 169 | 
            -
                    hash[param] = _to_hash(value)
         | 
| 170 | 
            -
                  end
         | 
| 171 | 
            -
                  hash
         | 
| 172 | 
            -
                end
         | 
| 173 | 
            -
             | 
| 174 | 
            -
                # Outputs non-array value in the form of hash
         | 
| 175 | 
            -
                # For object, use to_hash. Otherwise, just return the value
         | 
| 176 | 
            -
                # @param [Object] value Any valid value
         | 
| 177 | 
            -
                # @return [Hash] Returns the value in the form of hash
         | 
| 178 | 
            -
                def _to_hash(value)
         | 
| 179 | 
            -
                  if value.is_a?(Array)
         | 
| 180 | 
            -
                    value.compact.map{ |v| _to_hash(v) }
         | 
| 181 | 
            -
                  elsif value.is_a?(Hash)
         | 
| 182 | 
            -
                    {}.tap do |hash|
         | 
| 183 | 
            -
                      value.each { |k, v| hash[k] = _to_hash(v) }
         | 
| 184 | 
            -
                    end
         | 
| 185 | 
            -
                  elsif value.respond_to? :to_hash
         | 
| 186 | 
            -
                    value.to_hash
         | 
| 187 | 
            -
                  else
         | 
| 188 | 
            -
                    value
         | 
| 189 | 
            -
                  end
         | 
| 190 | 
            -
                end
         | 
| 191 | 
            -
             | 
| 192 | 
            -
              end
         | 
| 193 | 
            -
             | 
| 194 | 
            -
            end
         |